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
37e1ca6d
Commit
37e1ca6d
authored
Mar 08, 2020
by
Jason R. Coombs
Committed by
GitHub
Mar 08, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1899 from pypa/feature/1823-fail-warnings
Error on warnings.
parents
cbfd4181
d8e103d1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
changelog.d/1899.change.rst
changelog.d/1899.change.rst
+1
-0
pkg_resources/__init__.py
pkg_resources/__init__.py
+6
-5
pytest.ini
pytest.ini
+15
-2
No files found.
changelog.d/1899.change.rst
0 → 100644
View file @
37e1ca6d
Test suite now fails on warnings.
pkg_resources/__init__.py
View file @
37e1ca6d
...
...
@@ -1235,12 +1235,13 @@ class ResourceManager:
mode = os.stat(path).st_mode
if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
msg = (
"%s is writable by group/others and vulnerable to attack "
"when "
"used with get_resource_filename. Consider a more secure "
"Extraction path is writable by group/others "
"and vulnerable to attack when "
"used with get_resource_filename ({path}). "
"Consider a more secure "
"location (set with .set_extraction_path or the "
"PYTHON_EGG_CACHE environment variable)."
% path
)
"PYTHON_EGG_CACHE environment variable)."
)
.format(**locals())
warnings.warn(msg, UserWarning)
def postprocess(self, tempname, filename):
...
...
pytest.ini
View file @
37e1ca6d
...
...
@@ -3,5 +3,18 @@ addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt -r
norecursedirs
=
dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* setuptools/_vendor pkg_resources/_vendor
doctest_optionflags
=
ELLIPSIS ALLOW_UNICODE
filterwarnings
=
# Fail on warnings
error
# https://github.com/pypa/setuptools/issues/1823
ignore:bdist_wininst
command
is
deprecated
# Suppress this error; unimportant for CI tests
ignore:Extraction
path
is
writable
by
group/others:UserWarning
# Suppress Python 2 deprecation warning
ignore:Setuptools
will
stop
working
on
Python
2:UserWarning
# Suppress weird RuntimeWarning.
ignore:Parent
module
'setuptools'
not
found
while
handling
absolute
import:RuntimeWarning
# Suppress use of bytes for filenames on Windows until fixed #2016
ignore:The
Windows
bytes
API
has
been
deprecated:DeprecationWarning
# Suppress other Python 2 UnicodeWarnings
ignore:Unicode
equal
comparison
failed
to
convert:UnicodeWarning
ignore:Unicode
unequal
comparison
failed
to
convert:UnicodeWarning
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