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
9bfc5fa5
Commit
9bfc5fa5
authored
Feb 16, 2020
by
Hugo
Committed by
Paul Ganssle
Apr 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate bdist_wininst
parent
53c284b3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
setuptools/command/bdist_wininst.py
setuptools/command/bdist_wininst.py
+9
-0
setuptools/tests/test_bdist_deprecations.py
setuptools/tests/test_bdist_deprecations.py
+23
-0
No files found.
setuptools/command/bdist_wininst.py
View file @
9bfc5fa5
import
distutils.command.bdist_wininst
as
orig
import
warnings
from
setuptools
import
SetuptoolsDeprecationWarning
class
bdist_wininst
(
orig
.
bdist_wininst
):
...
...
@@ -14,6 +17,12 @@ class bdist_wininst(orig.bdist_wininst):
return
cmd
def
run
(
self
):
warnings
.
warn
(
"bdist_wininst is deprecated and will be removed in a future "
"version. Use bdist_wheel (wheel packages) instead."
,
SetuptoolsDeprecationWarning
)
self
.
_is_running
=
True
try
:
orig
.
bdist_wininst
.
run
(
self
)
...
...
setuptools/tests/test_bdist_deprecations.py
0 → 100644
View file @
9bfc5fa5
"""develop tests
"""
import
mock
import
pytest
from
setuptools.dist
import
Distribution
from
setuptools
import
SetuptoolsDeprecationWarning
@
mock
.
patch
(
"distutils.command.bdist_wininst.bdist_wininst"
)
def
test_bdist_wininst_warning
(
distutils_cmd
):
dist
=
Distribution
(
dict
(
script_name
=
'setup.py'
,
script_args
=
[
'bdist_wininst'
],
name
=
'foo'
,
py_modules
=
[
'hi'
],
))
dist
.
parse_command_line
()
with
pytest
.
warns
(
SetuptoolsDeprecationWarning
):
dist
.
run_commands
()
distutils_cmd
.
run
.
assert_called_once
()
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