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
e3068ee2
Commit
e3068ee2
authored
Oct 27, 2019
by
Jason R. Coombs
Committed by
GitHub
Oct 27, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1824 from asottile/python310
Fixes for python3.10
parents
230d1f74
43add1d3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
10 deletions
+11
-10
changelog.d/1824.change.rst
changelog.d/1824.change.rst
+1
-0
pkg_resources/__init__.py
pkg_resources/__init__.py
+1
-1
pkg_resources/api_tests.txt
pkg_resources/api_tests.txt
+1
-1
pkg_resources/tests/test_resources.py
pkg_resources/tests/test_resources.py
+1
-1
setup.py
setup.py
+1
-1
setuptools/command/bdist_egg.py
setuptools/command/bdist_egg.py
+1
-1
setuptools/command/easy_install.py
setuptools/command/easy_install.py
+3
-3
setuptools/package_index.py
setuptools/package_index.py
+1
-1
setuptools/tests/test_bdist_egg.py
setuptools/tests/test_bdist_egg.py
+1
-1
No files found.
changelog.d/1824.change.rst
0 → 100644
View file @
e3068ee2
Fix tests when running under ``python3.10``.
pkg_resources/__init__.py
View file @
e3068ee2
...
...
@@ -333,7 +333,7 @@ class UnknownExtra(ResolutionError):
_provider_factories
=
{}
PY_MAJOR
=
sys
.
version
[:
3
]
PY_MAJOR
=
'{}.{}'
.
format
(
*
sys
.
version_info
)
EGG_DIST
=
3
BINARY_DIST
=
2
SOURCE_DIST
=
1
...
...
pkg_resources/api_tests.txt
View file @
e3068ee2
...
...
@@ -36,7 +36,7 @@ Distributions have various introspectable attributes::
>>> dist.version
'0.9'
>>> dist.py_version ==
sys.version[:3]
>>> dist.py_version ==
'{}.{}'.format(*sys.version_info)
True
>>> print(dist.platform)
...
...
pkg_resources/tests/test_resources.py
View file @
e3068ee2
...
...
@@ -116,7 +116,7 @@ class TestDistro:
self
.
checkFooPkg
(
d
)
d
=
Distribution
(
"/some/path"
)
assert
d
.
py_version
==
sys
.
version
[:
3
]
assert
d
.
py_version
==
'{}.{}'
.
format
(
*
sys
.
version_info
)
assert
d
.
platform
is
None
def
testDistroParse
(
self
):
...
...
setup.py
View file @
e3068ee2
...
...
@@ -44,7 +44,7 @@ def _gen_console_scripts():
if
any
(
os
.
environ
.
get
(
var
)
not
in
(
None
,
""
,
"0"
)
for
var
in
var_names
):
return
tmpl
=
"easy_install-{shortver} = setuptools.command.easy_install:main"
yield
tmpl
.
format
(
shortver
=
sys
.
version
[:
3
]
)
yield
tmpl
.
format
(
shortver
=
'{}.{}'
.
format
(
*
sys
.
version_info
)
)
package_data
=
dict
(
...
...
setuptools/command/bdist_egg.py
View file @
e3068ee2
...
...
@@ -284,7 +284,7 @@ class bdist_egg(Command):
"or refer to a module" % (ep,)
)
pyver =
sys.version[:3]
pyver =
'
{}.{}
'.format(*sys.version_info)
pkg = ep.module_name
full = '
.
'.join(ep.attrs)
base = ep.attrs[0]
...
...
setuptools/command/easy_install.py
View file @
e3068ee2
...
...
@@ -241,7 +241,7 @@ class easy_install(Command):
"""
Render the Setuptools version and installation details, then exit.
"""
ver
=
sys
.
version
[:
3
]
ver
=
'{}.{}'
.
format
(
*
sys
.
version_info
)
dist
=
get_distribution
(
'setuptools'
)
tmpl
=
'setuptools {dist.version} from {dist.location} (Python {ver})'
print
(
tmpl
.
format
(
**
locals
()))
...
...
@@ -1411,7 +1411,7 @@ def get_site_dirs():
os
.
path
.
join
(
prefix
,
"lib"
,
"python
"
+
sys
.
version
[:
3
]
,
"python
{}.{}"
.
format
(
*
sys
.
version_info
)
,
"site-packages"
,
),
os
.
path
.
join
(
prefix
,
"lib"
,
"site-python"
),
...
...
@@ -1432,7 +1432,7 @@ def get_site_dirs():
home
,
'Library'
,
'Python'
,
sys
.
version
[:
3
]
,
'{}.{}'
.
format
(
*
sys
.
version_info
)
,
'site-packages'
,
)
sitedirs
.
append
(
home_sp
)
...
...
setuptools/package_index.py
View file @
e3068ee2
...
...
@@ -46,7 +46,7 @@ __all__ = [
_SOCKET_TIMEOUT = 15
_tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}"
user_agent = _tmpl.format(py_major=
sys.version[:3]
, setuptools=setuptools)
user_agent = _tmpl.format(py_major=
'
{}.{}
'.format(*sys.version_info)
, setuptools=setuptools)
def parse_requirement_arg(spec):
...
...
setuptools/tests/test_bdist_egg.py
View file @
e3068ee2
...
...
@@ -42,7 +42,7 @@ class Test:
# let's see if we got our egg link at the right place
[
content
]
=
os
.
listdir
(
'dist'
)
assert
re
.
match
(
r'foo-0.0.0-py[23].\
d.egg$
', content)
assert
re
.
match
(
r'foo-0.0.0-py[23].\
d
+
.egg$
', content)
@pytest.mark.xfail(
os.environ.get('
PYTHONDONTWRITEBYTECODE
'),
...
...
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