|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python Packaging User Guide \n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2026-02-04 00:18+0000\n" |
| 11 | +"POT-Creation-Date: 2026-03-02 12:07+0000\n" |
12 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
13 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
14 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" |
@@ -5176,10 +5176,6 @@ msgstr "" |
5176 | 5176 | msgid "This can be worked around by setting all dependencies in ``__main__.__requires__`` before importing ``pkg_resources`` for the first time, but that approach does mean that standard command line invocations of the affected tools can't be used - it's necessary to write a custom wrapper script or use ``python3 -c '<command>'`` to invoke the application's main entry point directly." |
5177 | 5177 | msgstr "" |
5178 | 5178 |
|
5179 | | -#: ../source/guides/multi-version-installs.rst:41 |
5180 | | -msgid "Refer to the `pkg_resources documentation <https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects>`__ for more details." |
5181 | | -msgstr "" |
5182 | | - |
5183 | 5179 | #: ../source/guides/packaging-binary-extensions.rst:5 |
5184 | 5180 | msgid "Packaging binary extensions" |
5185 | 5181 | msgstr "" |
@@ -5589,71 +5585,75 @@ msgid "Legacy namespace packages" |
5589 | 5585 | msgstr "" |
5590 | 5586 |
|
5591 | 5587 | #: ../source/guides/packaging-namespace-packages.rst:160 |
5592 | | -msgid "These two methods, that were used to create namespace packages prior to :pep:`420`, 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." |
| 5588 | +msgid "These two methods, that were used to create namespace packages prior to :pep:`420`, are now considered to be obsolete and should not be used unless you need compatibility with packages already using one of these methods." |
5593 | 5589 | msgstr "" |
5594 | 5590 |
|
5595 | | -#: ../source/guides/packaging-namespace-packages.rst:165 |
| 5591 | +#: ../source/guides/packaging-namespace-packages.rst:164 |
5596 | 5592 | msgid "To migrate an existing package, all packages sharing the namespace must be migrated simultaneously." |
5597 | 5593 | msgstr "" |
5598 | 5594 |
|
5599 | | -#: ../source/guides/packaging-namespace-packages.rst:167 |
| 5595 | +#: ../source/guides/packaging-namespace-packages.rst:166 |
5600 | 5596 | msgid "While native namespace packages and pkgutil-style namespace packages are largely compatible, pkg_resources-style namespace packages are not compatible with the other methods. It's inadvisable to use different methods in different distributions that provide packages to the same namespace." |
5601 | 5597 | msgstr "" |
5602 | 5598 |
|
5603 | | -#: ../source/guides/packaging-namespace-packages.rst:174 |
| 5599 | +#: ../source/guides/packaging-namespace-packages.rst:173 |
5604 | 5600 | msgid "pkgutil-style namespace packages" |
5605 | 5601 | msgstr "" |
5606 | 5602 |
|
5607 | | -#: ../source/guides/packaging-namespace-packages.rst:176 |
5608 | | -msgid "Python 2.3 introduced the :doc:`pkgutil <python:library/pkgutil>` module and the :py:func:`python:pkgutil.extend_path` function. This can be used to declare namespace 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." |
| 5603 | +#: ../source/guides/packaging-namespace-packages.rst:175 |
| 5604 | +msgid "Python 2.3 introduced the :doc:`pkgutil <python:library/pkgutil>` module and the :py:func:`python:pkgutil.extend_path` function. This can be used to declare namespace packages that need to be compatible with both Python 2.3+ and Python 3. This was the recommended approach for the highest level of compatibility." |
5609 | 5605 | msgstr "" |
5610 | 5606 |
|
5611 | | -#: ../source/guides/packaging-namespace-packages.rst:181 |
| 5607 | +#: ../source/guides/packaging-namespace-packages.rst:180 |
5612 | 5608 | msgid "To create a pkgutil-style namespace package, you need to provide an :file:`__init__.py` file for the namespace package:" |
5613 | 5609 | msgstr "" |
5614 | 5610 |
|
5615 | | -#: ../source/guides/packaging-namespace-packages.rst:195 |
5616 | | -#: ../source/guides/packaging-namespace-packages.rst:242 |
| 5611 | +#: ../source/guides/packaging-namespace-packages.rst:194 |
| 5612 | +#: ../source/guides/packaging-namespace-packages.rst:249 |
5617 | 5613 | msgid "The :file:`__init__.py` file for the namespace package needs to contain the following:" |
5618 | 5614 | msgstr "" |
5619 | 5615 |
|
5620 | | -#: ../source/guides/packaging-namespace-packages.rst:202 |
5621 | | -#: ../source/guides/packaging-namespace-packages.rst:249 |
| 5616 | +#: ../source/guides/packaging-namespace-packages.rst:201 |
| 5617 | +#: ../source/guides/packaging-namespace-packages.rst:256 |
5622 | 5618 | msgid "**Every** distribution that uses the namespace package must include such an :file:`__init__.py`. If any distribution does not, it will cause the namespace logic to fail and the other sub-packages will not be importable. Any additional code in :file:`__init__.py` will be inaccessible." |
5623 | 5619 | msgstr "" |
5624 | 5620 |
|
5625 | | -#: ../source/guides/packaging-namespace-packages.rst:207 |
| 5621 | +#: ../source/guides/packaging-namespace-packages.rst:206 |
5626 | 5622 | msgid "A complete working example of two pkgutil-style namespace packages can be found in the `pkgutil namespace example project`_." |
5627 | 5623 | msgstr "" |
5628 | 5624 |
|
5629 | | -#: ../source/guides/packaging-namespace-packages.rst:217 |
| 5625 | +#: ../source/guides/packaging-namespace-packages.rst:216 |
5630 | 5626 | msgid "pkg_resources-style namespace packages" |
5631 | 5627 | msgstr "" |
5632 | 5628 |
|
5633 | | -#: ../source/guides/packaging-namespace-packages.rst:219 |
5634 | | -msgid ":doc:`Setuptools <setuptools:index>` provides 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. If you are creating a new distribution within an existing namespace package that uses this method then it's recommended to continue using this as the different methods are not cross-compatible and it's not advisable to try to migrate an existing package." |
| 5629 | +#: ../source/guides/packaging-namespace-packages.rst:220 |
| 5630 | +msgid "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." |
| 5631 | +msgstr "" |
| 5632 | + |
| 5633 | +#: ../source/guides/packaging-namespace-packages.rst:223 |
| 5634 | +msgid "``pkg_resources`` has been deprecated and was fully removed in Setuptools 82.0.0." |
5635 | 5635 | msgstr "" |
5636 | 5636 |
|
5637 | | -#: ../source/guides/packaging-namespace-packages.rst:228 |
| 5637 | +#: ../source/guides/packaging-namespace-packages.rst:225 |
| 5638 | +msgid ":doc:`Setuptools <setuptools:index>` previously provided the ``pkg_resources.declare_namespace`` function and the ``namespace_packages`` argument to :func:`~setuptools.setup`. Together these could be used to declare namespace packages. While this approach is no longer supported, it may still be encountered in environments using older ``setuptools`` versions. If you are creating a new distribution within an existing namespace package that uses this method then it's recommended to continue using this as the different methods are not cross-compatible and it's not advisable to try to migrate an existing package." |
| 5639 | +msgstr "" |
| 5640 | + |
| 5641 | +#: ../source/guides/packaging-namespace-packages.rst:235 |
5638 | 5642 | msgid "To create a pkg_resources-style namespace package, you need to provide an :file:`__init__.py` file for the namespace package:" |
5639 | 5643 | msgstr "" |
5640 | 5644 |
|
5641 | | -#: ../source/guides/packaging-namespace-packages.rst:254 |
| 5645 | +#: ../source/guides/packaging-namespace-packages.rst:261 |
5642 | 5646 | msgid "Some older recommendations advise the following in the namespace package :file:`__init__.py`:" |
5643 | 5647 | msgstr "" |
5644 | 5648 |
|
5645 | | -#: ../source/guides/packaging-namespace-packages.rst:264 |
| 5649 | +#: ../source/guides/packaging-namespace-packages.rst:271 |
5646 | 5650 | msgid "The idea behind this was that in the rare case that setuptools isn't available packages would fall-back to the pkgutil-style packages. This isn't advisable because pkgutil and pkg_resources-style namespace packages are not cross-compatible. If the presence of setuptools is a concern then the package should just explicitly depend on setuptools via ``install_requires``." |
5647 | 5651 | msgstr "" |
5648 | 5652 |
|
5649 | | -#: ../source/guides/packaging-namespace-packages.rst:271 |
| 5653 | +#: ../source/guides/packaging-namespace-packages.rst:278 |
5650 | 5654 | msgid "Finally, every distribution must provide the ``namespace_packages`` argument to :func:`~setuptools.setup` in :file:`setup.py`. For example:" |
5651 | 5655 | msgstr "" |
5652 | 5656 |
|
5653 | | -#: ../source/guides/packaging-namespace-packages.rst:285 |
5654 | | -msgid "A complete working example of two pkg_resources-style namespace packages can be found in the `pkg_resources namespace example project`_." |
5655 | | -msgstr "" |
5656 | | - |
5657 | 5657 | #: ../source/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows.rst:5 |
5658 | 5658 | msgid "Publishing package distribution releases using GitHub Actions CI/CD workflows" |
5659 | 5659 | msgstr "" |
|
0 commit comments