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
43add1d3
Commit
43add1d3
authored
Aug 17, 2019
by
Anthony Sottile
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for python3.10
parent
2cd2fdcb
Changes
9
Show 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 @
43add1d3
Fix tests when running under ``python3.10``.
pkg_resources/__init__.py
View file @
43add1d3
...
@@ -333,7 +333,7 @@ class UnknownExtra(ResolutionError):
...
@@ -333,7 +333,7 @@ class UnknownExtra(ResolutionError):
_provider_factories
=
{}
_provider_factories
=
{}
PY_MAJOR
=
sys
.
version
[:
3
]
PY_MAJOR
=
'{}.{}'
.
format
(
*
sys
.
version_info
)
EGG_DIST
=
3
EGG_DIST
=
3
BINARY_DIST
=
2
BINARY_DIST
=
2
SOURCE_DIST
=
1
SOURCE_DIST
=
1
...
...
pkg_resources/api_tests.txt
View file @
43add1d3
...
@@ -36,7 +36,7 @@ Distributions have various introspectable attributes::
...
@@ -36,7 +36,7 @@ Distributions have various introspectable attributes::
>>> dist.version
>>> dist.version
'0.9'
'0.9'
>>> dist.py_version ==
sys.version[:3]
>>> dist.py_version ==
'{}.{}'.format(*sys.version_info)
True
True
>>> print(dist.platform)
>>> print(dist.platform)
...
...
pkg_resources/tests/test_resources.py
View file @
43add1d3
...
@@ -116,7 +116,7 @@ class TestDistro:
...
@@ -116,7 +116,7 @@ class TestDistro:
self
.
checkFooPkg
(
d
)
self
.
checkFooPkg
(
d
)
d
=
Distribution
(
"/some/path"
)
d
=
Distribution
(
"/some/path"
)
assert
d
.
py_version
==
sys
.
version
[:
3
]
assert
d
.
py_version
==
'{}.{}'
.
format
(
*
sys
.
version_info
)
assert
d
.
platform
is
None
assert
d
.
platform
is
None
def
testDistroParse
(
self
):
def
testDistroParse
(
self
):
...
...
setup.py
View file @
43add1d3
...
@@ -44,7 +44,7 @@ def _gen_console_scripts():
...
@@ -44,7 +44,7 @@ def _gen_console_scripts():
if
any
(
os
.
environ
.
get
(
var
)
not
in
(
None
,
""
,
"0"
)
for
var
in
var_names
):
if
any
(
os
.
environ
.
get
(
var
)
not
in
(
None
,
""
,
"0"
)
for
var
in
var_names
):
return
return
tmpl
=
"easy_install-{shortver} = setuptools.command.easy_install:main"
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
(
package_data
=
dict
(
...
...
setuptools/command/bdist_egg.py
View file @
43add1d3
...
@@ -284,7 +284,7 @@ class bdist_egg(Command):
...
@@ -284,7 +284,7 @@ class bdist_egg(Command):
"or refer to a module" % (ep,)
"or refer to a module" % (ep,)
)
)
pyver =
sys.version[:3]
pyver =
'
{}.{}
'.format(*sys.version_info)
pkg = ep.module_name
pkg = ep.module_name
full = '
.
'.join(ep.attrs)
full = '
.
'.join(ep.attrs)
base = ep.attrs[0]
base = ep.attrs[0]
...
...
setuptools/command/easy_install.py
View file @
43add1d3
...
@@ -241,7 +241,7 @@ class easy_install(Command):
...
@@ -241,7 +241,7 @@ class easy_install(Command):
"""
"""
Render the Setuptools version and installation details, then exit.
Render the Setuptools version and installation details, then exit.
"""
"""
ver
=
sys
.
version
[:
3
]
ver
=
'{}.{}'
.
format
(
*
sys
.
version_info
)
dist
=
get_distribution
(
'setuptools'
)
dist
=
get_distribution
(
'setuptools'
)
tmpl
=
'setuptools {dist.version} from {dist.location} (Python {ver})'
tmpl
=
'setuptools {dist.version} from {dist.location} (Python {ver})'
print
(
tmpl
.
format
(
**
locals
()))
print
(
tmpl
.
format
(
**
locals
()))
...
@@ -1412,7 +1412,7 @@ def get_site_dirs():
...
@@ -1412,7 +1412,7 @@ def get_site_dirs():
os
.
path
.
join
(
os
.
path
.
join
(
prefix
,
prefix
,
"lib"
,
"lib"
,
"python
"
+
sys
.
version
[:
3
]
,
"python
{}.{}"
.
format
(
*
sys
.
version_info
)
,
"site-packages"
,
"site-packages"
,
),
),
os
.
path
.
join
(
prefix
,
"lib"
,
"site-python"
),
os
.
path
.
join
(
prefix
,
"lib"
,
"site-python"
),
...
@@ -1433,7 +1433,7 @@ def get_site_dirs():
...
@@ -1433,7 +1433,7 @@ def get_site_dirs():
home
,
home
,
'Library'
,
'Library'
,
'Python'
,
'Python'
,
sys
.
version
[:
3
]
,
'{}.{}'
.
format
(
*
sys
.
version_info
)
,
'site-packages'
,
'site-packages'
,
)
)
sitedirs
.
append
(
home_sp
)
sitedirs
.
append
(
home_sp
)
...
...
setuptools/package_index.py
View file @
43add1d3
...
@@ -46,7 +46,7 @@ __all__ = [
...
@@ -46,7 +46,7 @@ __all__ = [
_SOCKET_TIMEOUT = 15
_SOCKET_TIMEOUT = 15
_tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}"
_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):
def parse_requirement_arg(spec):
...
...
setuptools/tests/test_bdist_egg.py
View file @
43add1d3
...
@@ -42,7 +42,7 @@ class Test:
...
@@ -42,7 +42,7 @@ class Test:
# let's see if we got our egg link at the right place
# let's see if we got our egg link at the right place
[
content
]
=
os
.
listdir
(
'dist'
)
[
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(
@pytest.mark.xfail(
os.environ.get('
PYTHONDONTWRITEBYTECODE
'),
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