Skip to content

Commit 66cbd98

Browse files
committed
Remove some deprecated code (#3948)
2 parents 718493c + 6ef81fe commit 66cbd98

20 files changed

+35
-286
lines changed

changelog.d/3948.breaking.1.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed verification for existing ``depends.txt`` file (deprecated since v0.5a4).

changelog.d/3948.breaking.2.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Remove autofixing of broken ``.egg-info`` directories containing the ``-``
2+
character in their base name (without suffix).
3+
They should no longer be produced by sufficiently new versions of ``setuptools``
4+
(warning introduced in 2005).

changelog.d/3948.breaking.3.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Remove deprecated APIs in ``easy_install``: ``get_script_args``,
2+
``get_script_header`` and ``get_writer``.
3+
The direct usage of ``easy_install`` has been deprecated since v58.3.0,
4+
and the warnings regarding these APIs predate that version.

changelog.d/3948.breaking.4.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed ``egg_info.get_pkg_info_revision`` (deprecated since 2015).

changelog.d/3948.breaking.5.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed ``setuptools.dist._get_unpatched`` (deprecated since 2016)

changelog.d/3948.breaking.6.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Removed support for SVN in ``setuptools.package_index`` (deprecated since 2018).

changelog.d/3948.breaking.7.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Removed support for invalid ``pyproject.toml`` files.
2+
During the implementation of PEP 621, it was identified that some users were
3+
producing invalid files. As a transitional measure, the validation was relaxed
4+
for a few use cases. The grace period, however, came to an end.

setup.cfg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ egg_info.writers =
161161
eager_resources.txt = setuptools.command.egg_info:overwrite_arg
162162
namespace_packages.txt = setuptools.command.egg_info:overwrite_arg
163163
top_level.txt = setuptools.command.egg_info:write_toplevel_names
164-
depends.txt = setuptools.command.egg_info:warn_depends_obsolete
165164
dependency_links.txt = setuptools.command.egg_info:overwrite_arg
166165

167166
[egg_info]

setuptools/command/develop.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from distutils.util import convert_path
22
from distutils import log
3-
from distutils.errors import DistutilsError, DistutilsOptionError
3+
from distutils.errors import DistutilsOptionError
44
import os
55
import glob
66
import io
@@ -45,10 +45,6 @@ def finalize_options(self):
4545
import pkg_resources
4646

4747
ei = self.get_finalized_command("egg_info")
48-
if ei.broken_egg_info:
49-
template = "Please rename %r to %r before using 'develop'"
50-
args = ei.egg_info, ei.broken_egg_info
51-
raise DistutilsError(template % args)
5248
self.args = [ei.egg_name]
5349

5450
easy_install.finalize_options(self)

setuptools/command/easy_install.py

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2115,24 +2115,6 @@ def importlib_load_entry_point(spec, group, name):
21152115

21162116
command_spec_class = CommandSpec
21172117

2118-
@classmethod
2119-
def get_script_args(cls, dist, executable=None, wininst=False):
2120-
# for backward compatibility
2121-
EasyInstallDeprecationWarning.emit("Use get_args", due_date=(2023, 6, 1))
2122-
# This is a direct API call, it should be safe to remove soon.
2123-
writer = (WindowsScriptWriter if wininst else ScriptWriter).best()
2124-
header = cls.get_script_header("", executable, wininst)
2125-
return writer.get_args(dist, header)
2126-
2127-
@classmethod
2128-
def get_script_header(cls, script_text, executable=None, wininst=False):
2129-
# for backward compatibility
2130-
EasyInstallDeprecationWarning.emit("Use get_header", due_date=(2023, 6, 1))
2131-
# This is a direct API call, it should be safe to remove soon.
2132-
if wininst:
2133-
executable = "python.exe"
2134-
return cls.get_header(script_text, executable)
2135-
21362118
@classmethod
21372119
def get_args(cls, dist, header=None):
21382120
"""
@@ -2160,13 +2142,6 @@ def _ensure_safe_name(name):
21602142
if has_path_sep:
21612143
raise ValueError("Path separators not allowed in script names")
21622144

2163-
@classmethod
2164-
def get_writer(cls, force_windows):
2165-
# for backward compatibility
2166-
EasyInstallDeprecationWarning.emit("Use best", due_date=(2023, 6, 1))
2167-
# This is a direct API call, it should be safe to remove soon.
2168-
return WindowsScriptWriter.best() if force_windows else cls.best()
2169-
21702145
@classmethod
21712146
def best(cls):
21722147
"""
@@ -2193,13 +2168,6 @@ def get_header(cls, script_text="", executable=None):
21932168
class WindowsScriptWriter(ScriptWriter):
21942169
command_spec_class = WindowsCommandSpec
21952170

2196-
@classmethod
2197-
def get_writer(cls):
2198-
# for backward compatibility
2199-
EasyInstallDeprecationWarning.emit("Use best", due_date=(2023, 6, 1))
2200-
# This is a direct API call, it should be safe to remove soon.
2201-
return cls.best()
2202-
22032171
@classmethod
22042172
def best(cls):
22052173
"""
@@ -2287,11 +2255,6 @@ def _get_script_args(cls, type_, name, header, script_text):
22872255
yield (m_name, load_launcher_manifest(name), 't')
22882256

22892257

2290-
# for backward-compatibility
2291-
get_script_args = ScriptWriter.get_script_args
2292-
get_script_header = ScriptWriter.get_script_header
2293-
2294-
22952258
def get_win_launcher(type):
22962259
"""
22972260
Load the Windows launcher (executable) suitable for launching a script.

0 commit comments

Comments
 (0)