Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c071c1

Browse files
committed
Issue #27919: Deprecate extra_path option in distutils.
1 parent 2f9cc7a commit 5c071c1

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

Doc/whatsnew/3.6.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,12 @@ Deprecated features
782782
now deprecated.
783783
(Contributed by Serhiy Storchaka in :issue:`25791` and :issue:`26754`.)
784784

785+
* The undocumented ``extra_path`` argument to a distutils Distribution
786+
is now considered
787+
deprecated, will raise a warning during install if set. Support for this
788+
parameter will be dropped in a future Python release and likely earlier
789+
through third party tools. See :issue:`27919` for details.
790+
785791

786792
Deprecated Python behavior
787793
--------------------------

Lib/distutils/command/install.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def initialize_options(self):
175175
self.compile = None
176176
self.optimize = None
177177

178+
# Deprecated
178179
# These two are for putting non-packagized distributions into their
179180
# own directory and creating a .pth file if it makes sense.
180181
# 'extra_path' comes from the setup file; 'install_path_file' can
@@ -344,6 +345,7 @@ def finalize_options(self):
344345
'scripts', 'data', 'headers',
345346
'userbase', 'usersite')
346347

348+
# Deprecated
347349
# Well, we're not actually fully completely finalized yet: we still
348350
# have to deal with 'extra_path', which is the hack for allowing
349351
# non-packagized module distributions (hello, Numerical Python!) to
@@ -490,6 +492,10 @@ def handle_extra_path(self):
490492
self.extra_path = self.distribution.extra_path
491493

492494
if self.extra_path is not None:
495+
log.warn(
496+
"Distribution option extra_path is deprecated. "
497+
"See issue27919 for details."
498+
)
493499
if isinstance(self.extra_path, str):
494500
self.extra_path = self.extra_path.split(',')
495501

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ Core and Builtins
6060
Library
6161
-------
6262

63+
- Issue #27919: Deprecated ``extra_path`` distribution option in distutils
64+
packaging.
65+
6366
- Issue #23229: Add new ``cmath`` constants: ``cmath.inf`` and ``cmath.nan`` to
6467
match ``math.inf`` and ``math.nan``, and also ``cmath.infj`` and
6568
``cmath.nanj`` to match the format used by complex repr.

0 commit comments

Comments
 (0)