Conversation
Signed-off-by: William Woodruff <william@astral.sh>
|
CC @pypa/packaging-user-guide-editors |
|
It's linked to in other places unfortunately: packaging.python.org/source/guides/multi-version-installs.rst Lines 41 to 43 in 11477a6 packaging.python.org/source/guides/packaging-namespace-packages.rst Lines 288 to 289 in 11477a6 |
Grumble, thanks 🙂 |
Signed-off-by: William Woodruff <william@astral.sh>
ncoghlan
left a comment
There was a problem hiding this comment.
The "request changes" is because pkgutil based namespace packages have nothing to do with pkg_resources, so the legacy namespace package warning is misplaced.
The other suggestions are because I think we should salt this earth more thoroughly :)
| .. warning:: | ||
|
|
||
| The information in this section is obsolete and is no longer functional | ||
| (as of Setuptools 82.0.0). It is only retained for historical reference. |
There was a problem hiding this comment.
This warning is misplaced - it should be down in the pkg_resources subsection.
pkgutil based legacy namespace packages have no connection to setuptools, they rely solely on the standard library (and we don't have any plans to break them that I'm aware of).
| :doc:`Setuptools <setuptools:index>` provides the `pkg_resources.declare_namespace`_ function and | ||
| :doc:`Setuptools <setuptools:index>` previously provided the ``pkg_resources.declare_namespace`` function and | ||
| the ``namespace_packages`` argument to :func:`~setuptools.setup`. Together | ||
| these can be used to declare namespace packages. While this approach is no |
There was a problem hiding this comment.
| these can be used to declare namespace packages. While this approach is no | |
| these could be used to declare namespace packages. While this approach is no |
| :doc:`Setuptools <setuptools:index>` previously provided the ``pkg_resources.declare_namespace`` function and | ||
| the ``namespace_packages`` argument to :func:`~setuptools.setup`. Together | ||
| these can be used to declare namespace packages. While this approach is no | ||
| longer recommended, it is widely present in most existing namespace packages. |
There was a problem hiding this comment.
| longer recommended, it is widely present in most existing namespace packages. | |
| longer supported, it may still be encountered in environments using older `setuptools` versions. |
| A complete working example of two pkg_resources-style namespace packages can be found | ||
| in the `pkg_resources namespace example project`_. | ||
|
|
There was a problem hiding this comment.
| A complete working example of two pkg_resources-style namespace packages can be found | |
| in the `pkg_resources namespace example project`_. |
We shouldn't link to an example that no longer works.
| .. _pkg_resources namespace example project: | ||
| https://github.com/pypa/sample-namespace-packages/tree/master/pkg_resources |
There was a problem hiding this comment.
| .. _pkg_resources namespace example project: | |
| https://github.com/pypa/sample-namespace-packages/tree/master/pkg_resources |
| are now considered to be obsolete and should not be used unless you need compatibility | ||
| with packages already using this method. Also, :doc:`pkg_resources <setuptools:pkg_resources>` | ||
| has been deprecated. | ||
| with packages already using this method. |
There was a problem hiding this comment.
| with packages already using this method. | |
| with packages already using one of these methods. |
| packages that need to be compatible with both Python 2.3+ and Python 3. This | ||
| is the recommended approach for the highest level of compatibility. |
There was a problem hiding this comment.
| packages that are compatible with both Python 2.3+ and Python 3. This was the | |
| recommended approach for the highest level of compatibility when Python 2.7 | |
| was still supported, but native namespace packages (available since Python 3.3) | |
| are now the preferred approach. |
pkg_resourcesis no longer provided by setuptools, so this link is dead (and breaks the build). I've removed the link but kept the term itself, along with a mention of the removal.Ref: https://discuss.python.org/t/pkg-resources-removal-how-to-go-from-there/106079
📚 Documentation preview 📚: https://python-packaging-user-guide--2002.org.readthedocs.build/en/2002/