Skip to content

Commit a3a9e2b

Browse files
authored
Merge pull request #2002 from pypa/ww/fix
Remove dead link to pkg_resources
2 parents 11477a6 + 5911ea3 commit a3a9e2b

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

source/guides/multi-version-installs.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,3 @@ time, but that approach does mean that standard command line invocations of
3737
the affected tools can't be used - it's necessary to write a custom
3838
wrapper script or use ``python3 -c '<command>'`` to invoke the application's
3939
main entry point directly.
40-
41-
Refer to the `pkg_resources documentation
42-
<https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects>`__
43-
for more details.

source/guides/packaging-namespace-packages.rst

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,7 @@ Legacy namespace packages
159159

160160
These two methods, that were used to create namespace packages prior to :pep:`420`,
161161
are now considered to be obsolete and should not be used unless you need compatibility
162-
with packages already using this method. Also, :doc:`pkg_resources <setuptools:pkg_resources>`
163-
has been deprecated.
162+
with packages already using one of these methods.
164163

165164
To migrate an existing package, all packages sharing the namespace must be migrated simultaneously.
166165

@@ -176,7 +175,7 @@ pkgutil-style namespace packages
176175
Python 2.3 introduced the :doc:`pkgutil <python:library/pkgutil>` module and the
177176
:py:func:`python:pkgutil.extend_path` function. This can be used to declare namespace
178177
packages that need to be compatible with both Python 2.3+ and Python 3. This
179-
is the recommended approach for the highest level of compatibility.
178+
was the recommended approach for the highest level of compatibility.
180179

181180
To create a pkgutil-style namespace package, you need to provide an
182181
:file:`__init__.py` file for the namespace package:
@@ -216,10 +215,18 @@ in the `pkgutil namespace example project`_.
216215
pkg_resources-style namespace packages
217216
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218217

219-
:doc:`Setuptools <setuptools:index>` provides the `pkg_resources.declare_namespace`_ function and
218+
.. warning::
219+
220+
The information in this section is obsolete and is no longer functional
221+
(as of Setuptools 82.0.0). It is only retained for historical reference.
222+
223+
``pkg_resources`` has been deprecated and was fully removed in Setuptools 82.0.0.
224+
225+
:doc:`Setuptools <setuptools:index>` previously provided the ``pkg_resources.declare_namespace`` function and
220226
the ``namespace_packages`` argument to :func:`~setuptools.setup`. Together
221-
these can be used to declare namespace packages. While this approach is no
222-
longer recommended, it is widely present in most existing namespace packages.
227+
these could be used to declare namespace packages. While this approach is no
228+
longer supported, it may still be encountered in environments using older
229+
``setuptools`` versions.
223230
If you are creating a new distribution within an existing namespace package that
224231
uses this method then it's recommended to continue using this as the different
225232
methods are not cross-compatible and it's not advisable to try to migrate an
@@ -281,11 +288,3 @@ to :func:`~setuptools.setup` in :file:`setup.py`. For example:
281288
packages=find_packages()
282289
namespace_packages=['mynamespace']
283290
)
284-
285-
A complete working example of two pkg_resources-style namespace packages can be found
286-
in the `pkg_resources namespace example project`_.
287-
288-
.. _pkg_resources.declare_namespace:
289-
https://setuptools.readthedocs.io/en/latest/pkg_resources.html#namespace-package-support
290-
.. _pkg_resources namespace example project:
291-
https://github.com/pypa/sample-namespace-packages/tree/master/pkg_resources

0 commit comments

Comments
 (0)