diff options
| author | Dave Hibberd <d@vehibberd.com> | 2024-01-23 00:29:48 +0000 |
|---|---|---|
| committer | Dave Hibberd <d@vehibberd.com> | 2024-01-23 00:29:48 +0000 |
| commit | bd933b3c7d6b702bebb123511ad55adea01fe102 (patch) | |
| tree | 338699f41163fb2a9727537d4867547424e2dade /debian/patches/remove-future.patch | |
| parent | f5e142a4e54bfda24bec40e923c643b434948a04 (diff) | |
| parent | 7d3d9d4a1808ea0a76a3263a91de7eee892b42cc (diff) | |
Merge branch 'master' into 'master'
Master
See merge request debian-hamradio-team/chirp!4
Diffstat (limited to 'debian/patches/remove-future.patch')
| -rw-r--r-- | debian/patches/remove-future.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/debian/patches/remove-future.patch b/debian/patches/remove-future.patch new file mode 100644 index 0000000..553775b --- /dev/null +++ b/debian/patches/remove-future.patch @@ -0,0 +1,70 @@ +Description: Replacement for python3-future. +Author: Yogeswaran Umasankar <kd8mbd@gmail.com> +Last-Update: 2024-01-19 + +--- 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 + six + pep8 + pyserial +-future + 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): |
