Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.4

* Replace urllib.request.URLopener import, defunct in Python 3.14, with urlretrieve.

## 1.0.3

* Remediated security vulnerability caused by messaging complete file path in
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def read(*parts):

setup(
name='wagon',
version='1.0.3',
version='1.0.4',
url='https://github.com/cloudify-cosmo/wagon',
author='Cloudify',
author_email='[email protected]',
Expand Down
1 change: 1 addition & 0 deletions test_env/lib64
7 changes: 3 additions & 4 deletions wagon.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
try:
import urllib.error
from urllib.request import urlopen
from urllib.request import URLopener
from urllib.request import urlretrieve
except ImportError:
import urllib
from urllib import urlopen
from urllib import URLopener
from urllib import urlretrieve

try:
from distro import linux_distribution
Expand Down Expand Up @@ -320,8 +320,7 @@ def _download_file(url, destination):
final_url = response.geturl()
if final_url != url and is_verbose():
logger.debug('Redirected to %s', final_url)
f = URLopener()
f.retrieve(final_url, destination)
urlretrieve(final_url, destination)


def _http_request(url):
Expand Down