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
03b36b5d
Commit
03b36b5d
authored
Jul 13, 2020
by
Paul Ganssle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove warnings
With the new `.pth` file, these warnings are no longer necessary.
parent
28e1b5ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
18 deletions
+1
-18
setuptools/distutils_patch.py
setuptools/distutils_patch.py
+1
-18
No files found.
setuptools/distutils_patch.py
View file @
03b36b5d
...
...
@@ -12,26 +12,10 @@ import importlib
import
warnings
is_pypy
=
'__pypy__'
in
sys
.
builtin_module_names
def
warn_distutils_present
():
if
'distutils'
not
in
sys
.
modules
:
return
if
is_pypy
and
sys
.
version_info
<
(
3
,
7
):
# PyPy for 3.6 unconditionally imports distutils, so bypass the warning
# https://foss.heptapod.net/pypy/pypy/-/blob/be829135bc0d758997b3566062999ee8b23872b4/lib-python/3/site.py#L250
return
warnings
.
warn
(
"Distutils was imported before Setuptools. This usage is discouraged "
"and may exhibit undesirable behaviors or errors. Please use "
"Setuptools' objects directly or at least import Setuptools first."
)
def
clear_distutils
():
if
'distutils'
not
in
sys
.
modules
:
return
warnings
.
warn
(
"Setuptools is replacing distutils."
)
mods
=
[
name
for
name
in
sys
.
modules
if
re
.
match
(
r'distutils\b'
,
name
)]
for
name
in
mods
:
del
sys
.
modules
[
name
]
...
...
@@ -56,6 +40,5 @@ def ensure_local_distutils():
assert
'_distutils'
in
core
.
__file__
,
core
.
__file__
warn_distutils_present
()
if
enabled
():
ensure_local_distutils
()
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