Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
16ee3060
Commit
16ee3060
authored
Feb 03, 2019
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Plain Diff
Merge tag 'v40.7.3'
Bump version: 40.7.2 → 40.7.3
parents
0e2dd1ac
a08cf8bc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
CHANGES.rst
CHANGES.rst
+6
-0
setup.cfg
setup.cfg
+1
-1
setup.py
setup.py
+1
-1
setuptools/package_index.py
setuptools/package_index.py
+12
-8
No files found.
CHANGES.rst
View file @
16ee3060
v40
.7.3
-------
*
#
1670
:
In
package_index
,
revert
to
using
a
copy
of
splituser
from
Python
3.8
.
Attempts
to
use
``
urllib
.
parse
.
urlparse
``
led
to
problems
as
reported
in
#
1663
and
#
1668.
This
change
serves
as
an
alternative
to
#
1499
and
fixes
#
1668.
v40
.7.2
v40
.7.2
-------
-------
...
...
setup.cfg
View file @
16ee3060
[bumpversion]
[bumpversion]
current_version = 40.7.
2
current_version = 40.7.
3
commit = True
commit = True
tag = True
tag = True
...
...
setup.py
View file @
16ee3060
...
@@ -89,7 +89,7 @@ def pypi_link(pkg_filename):
...
@@ -89,7 +89,7 @@ def pypi_link(pkg_filename):
setup_params
=
dict
(
setup_params
=
dict
(
name
=
"setuptools"
,
name
=
"setuptools"
,
version
=
"40.7.
2
"
,
version
=
"40.7.
3
"
,
description
=
(
description
=
(
"Easily download, build, install, upgrade, and uninstall "
"Easily download, build, install, upgrade, and uninstall "
"Python packages"
"Python packages"
...
...
setuptools/package_index.py
View file @
16ee3060
...
@@ -850,16 +850,13 @@ class PackageIndex(Environment):
...
@@ -850,16 +850,13 @@ class PackageIndex(Environment):
def _download_svn(self, url, filename):
def _download_svn(self, url, filename):
warnings.warn("SVN download support is deprecated", UserWarning)
warnings.warn("SVN download support is deprecated", UserWarning)
def splituser(host):
user, delim, host = host.rpartition('@')
return user, host
url = url.split('#', 1)[0] # remove any fragment for svn's sake
url = url.split('#', 1)[0] # remove any fragment for svn's sake
creds = ''
creds = ''
if url.lower().startswith('svn:') and '@' in url:
if url.lower().startswith('svn:') and '@' in url:
scheme, netloc, path, p, q, f = urllib.parse.urlparse(url)
scheme, netloc, path, p, q, f = urllib.parse.urlparse(url)
if not netloc and path.startswith('//') and '/' in path[2:]:
if not netloc and path.startswith('//') and '/' in path[2:]:
netloc, path = path[2:].split('/', 1)
netloc, path = path[2:].split('/', 1)
auth, host = splituser(netloc)
auth, host =
_
splituser(netloc)
if auth:
if auth:
if ':' in auth:
if ':' in auth:
user, pw = auth.split(':', 1)
user, pw = auth.split(':', 1)
...
@@ -1058,8 +1055,8 @@ def open_with_auth(url, opener=urllib.request.urlopen):
...
@@ -1058,8 +1055,8 @@ def open_with_auth(url, opener=urllib.request.urlopen):
if netloc.endswith(':'):
if netloc.endswith(':'):
raise http_client.InvalidURL("nonnumeric port: ''")
raise http_client.InvalidURL("nonnumeric port: ''")
if scheme in ('http', 'https')
and parsed.username
:
if scheme in ('http', 'https'):
auth
= ':'.join((parsed.username, parsed.password)
)
auth
, address = _splituser(netloc
)
else:
else:
auth = None
auth = None
...
@@ -1072,7 +1069,7 @@ def open_with_auth(url, opener=urllib.request.urlopen):
...
@@ -1072,7 +1069,7 @@ def open_with_auth(url, opener=urllib.request.urlopen):
if auth:
if auth:
auth = "Basic " + _encode_auth(auth)
auth = "Basic " + _encode_auth(auth)
parts = scheme,
netloc
, path, params, query, frag
parts = scheme,
address
, path, params, query, frag
new_url = urllib.parse.urlunparse(parts)
new_url = urllib.parse.urlunparse(parts)
request = urllib.request.Request(new_url)
request = urllib.request.Request(new_url)
request.add_header("Authorization", auth)
request.add_header("Authorization", auth)
...
@@ -1086,13 +1083,20 @@ def open_with_auth(url, opener=urllib.request.urlopen):
...
@@ -1086,13 +1083,20 @@ def open_with_auth(url, opener=urllib.request.urlopen):
# Put authentication info back into request URL if same host,
# Put authentication info back into request URL if same host,
# so that links found on the page will work
# so that links found on the page will work
s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url)
s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url)
if s2 == scheme and h2 ==
parsed.hostname
:
if s2 == scheme and h2 ==
address
:
parts = s2, netloc, path2, param2, query2, frag2
parts = s2, netloc, path2, param2, query2, frag2
fp.url = urllib.parse.urlunparse(parts)
fp.url = urllib.parse.urlunparse(parts)
return fp
return fp
# copy of urllib.parse._splituser from Python 3.8
def _splituser(host):
"""
splituser
(
'user[:passwd]@host[:port]'
)
-->
'user[:passwd]'
,
'host[:port]'
.
"""
user, delim, host = host.rpartition('@')
return (user if delim else None), host
# adding a timeout to avoid freezing package_index
# adding a timeout to avoid freezing package_index
open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)
open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment