diff options
| author | Dave Hibberd <hibby@debian.org> | 2024-02-24 13:53:03 +0000 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2024-02-24 13:53:03 +0000 |
| commit | 3218b13c89bfc31e22a5a7ecfa65c29292b18788 (patch) | |
| tree | cecf6af1bea9486d01a9ec88c6ed7d0198bbb1e1 /debian/patches/remove-future.patch | |
| parent | 22d82ba3c0d6bd591c135290d88adcc2414ba588 (diff) | |
First pass of post-update updates
Diffstat (limited to 'debian/patches/remove-future.patch')
| -rw-r--r-- | debian/patches/remove-future.patch | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/debian/patches/remove-future.patch b/debian/patches/remove-future.patch index 553775b..7e41bb0 100644 --- a/debian/patches/remove-future.patch +++ b/debian/patches/remove-future.patch @@ -1,30 +1,10 @@ Description: Replacement for python3-future. Author: Yogeswaran Umasankar <kd8mbd@gmail.com> -Last-Update: 2024-01-19 +Last-Update: 2024-02-24 ---- a/requirements.txt -+++ b/requirements.txt -@@ -2,7 +2,6 @@ six - wxPython>=4.0,<4.2.0 ; platform_system=="Linux" # See https://github.com/wxWidgets/Phoenix/issues/2225 - wxPython==4.2.0 ; platform_system!="Linux" - pyserial --future - requests - pywin32; platform_system=="Windows" - suds ---- a/setup.py -+++ b/setup.py -@@ -12,7 +12,6 @@ setup(name='chirp', - 'pyserial', - 'requests', - 'six', -- 'future', - 'importlib-resources;python_version<"3.10"', - 'yattag', - ], --- a/test-requirements.txt +++ b/test-requirements.txt -@@ -5,7 +5,6 @@ pytest-html +@@ -5,7 +5,6 @@ six pep8 pyserial @@ -32,39 +12,3 @@ Last-Update: 2024-01-19 requests pyyaml pywin32; platform_system=="Windows" ---- a/chirp/chirp_common.py -+++ b/chirp/chirp_common.py -@@ -14,7 +14,7 @@ - # along with this program. If not, see <http://www.gnu.org/licenses/>. - - from builtins import bytes --from future import standard_library -+#from future import standard_library - - import base64 - import json -@@ -1959,17 +1959,19 @@ def http_user_agent(): - def urlretrieve(url, fn): - """Grab an URL and save it in a specified file""" - -- standard_library.install_aliases() -+ #standard_library.install_aliases() - import urllib.request -- import urllib.error -+ from urllib.error import URLError, HTTPError - - headers = { - 'User-Agent': http_user_agent(), - } - req = urllib.request.Request(url, headers=headers) -- resp = urllib.request.urlopen(req) -- with open(fn, 'wb') as f: -- f.write(resp.read()) -+ -+ try: -+ urllib.request.urlretrieve(req, fn) -+ except (URLError, HTTPError) as e: -+ print(f"Error downloading {url}: {e}") - - - def mem_from_text(text): |
