|
8 | 8 | msgstr "" |
9 | 9 | "Project-Id-Version: Python Packaging User Guide \n" |
10 | 10 | "Report-Msgid-Bugs-To: \n" |
11 | | -"POT-Creation-Date: 2024-06-26 13:09+0000\n" |
| 11 | +"POT-Creation-Date: 2024-07-29 08:56+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 < [email protected]>\n" |
@@ -2939,151 +2939,127 @@ msgid "Dropping support for older Python versions" |
2939 | 2939 | msgstr "" |
2940 | 2940 |
|
2941 | 2941 | #: ../source/guides/dropping-older-python-versions.rst:7 |
2942 | | -msgid "Dropping support for older Python versions is supported by the standard :ref:`core-metadata` 1.2 specification via a \"Requires-Python\" attribute." |
| 2942 | +msgid "The ability to drop support for older Python versions is enabled by the standard :ref:`core-metadata` 1.2 specification via the :ref:`\"Requires-Python\" <core-metadata-requires-python>` attribute." |
2943 | 2943 | msgstr "" |
2944 | 2944 |
|
2945 | 2945 | #: ../source/guides/dropping-older-python-versions.rst:9 |
2946 | | -msgid "Metadata 1.2+ clients, such as Pip 9.0+, will adhere to this specification by matching the current Python runtime and comparing it with the required version in the package metadata. If they do not match, it will attempt to install the last package distribution that supported that Python runtime." |
| 2946 | +msgid "Metadata 1.2+ installers, such as Pip, will adhere to this specification by matching the current Python runtime and comparing it with the required version in the package metadata. If they do not match, it will attempt to install the last package distribution that supported that Python runtime." |
2947 | 2947 | msgstr "" |
2948 | 2948 |
|
2949 | 2949 | #: ../source/guides/dropping-older-python-versions.rst:12 |
2950 | | -msgid "This mechanism can be used to drop support for older Python versions, by amending the \"Requires-Python\" attribute in the package metadata." |
| 2950 | +msgid "This mechanism can be used to drop support for older Python versions, by amending the ``Requires-Python`` attribute in the package metadata." |
2951 | 2951 | msgstr "" |
2952 | 2952 |
|
2953 | | -#: ../source/guides/dropping-older-python-versions.rst:14 |
2954 | | -msgid "This guide is specifically for users of :ref:`setuptools`, other packaging tools such as ``flit`` may offer similar functionality but users will need to consult relevant documentation." |
2955 | | -msgstr "" |
2956 | | - |
2957 | | -#: ../source/guides/dropping-older-python-versions.rst:17 |
| 2953 | +#: ../source/guides/dropping-older-python-versions.rst:15 |
2958 | 2954 | msgid "Requirements" |
2959 | 2955 | msgstr "" |
2960 | 2956 |
|
2961 | | -#: ../source/guides/dropping-older-python-versions.rst:19 |
2962 | | -msgid "This workflow requires that:" |
2963 | | -msgstr "" |
2964 | | - |
2965 | | -#: ../source/guides/dropping-older-python-versions.rst:21 |
2966 | | -msgid "The publisher is using the latest version of :ref:`setuptools`," |
2967 | | -msgstr "" |
2968 | | - |
2969 | | -#: ../source/guides/dropping-older-python-versions.rst:22 |
2970 | | -msgid "The latest version of :ref:`twine` is used to upload the package," |
2971 | | -msgstr "" |
2972 | | - |
2973 | | -#: ../source/guides/dropping-older-python-versions.rst:23 |
2974 | | -msgid "The user installing the package has at least Pip 9.0, or a client that supports the Metadata 1.2 specification." |
| 2957 | +#: ../source/guides/dropping-older-python-versions.rst:17 |
| 2958 | +msgid "This workflow requires that the user installing the package uses Pip [#]_, or another installer that supports the Metadata 1.2 specification." |
2975 | 2959 | msgstr "" |
2976 | 2960 |
|
2977 | | -#: ../source/guides/dropping-older-python-versions.rst:26 |
| 2961 | +#: ../source/guides/dropping-older-python-versions.rst:20 |
2978 | 2962 | msgid "Dealing with the universal wheels" |
2979 | 2963 | msgstr "" |
2980 | 2964 |
|
2981 | | -#: ../source/guides/dropping-older-python-versions.rst:28 |
2982 | | -msgid "Traditionally, projects providing Python code that is semantically compatible with both Python 2 and Python 3, produce :term:`wheels <Wheel>` that have a ``py2.py3`` tag in their names. When dropping support for Python 2, it is important not to forget to change this tag to just ``py3``. It is often configured within :file:`setup.cfg` under the ``[bdist_wheel]`` section by setting ``universal = 1`` if they use setuptools." |
| 2965 | +#: ../source/guides/dropping-older-python-versions.rst:22 |
| 2966 | +msgid "Traditionally, :ref:`setuptools` projects providing Python code that is semantically compatible with both Python 2 and Python 3, produce :term:`wheels <Wheel>` that have a ``py2.py3`` tag in their names. When dropping support for Python 2, it is important not to forget to change this tag to just ``py3``. It is often configured within :file:`setup.cfg` under the ``[bdist_wheel]`` section by setting ``universal = 1``." |
2983 | 2967 | msgstr "" |
2984 | 2968 |
|
2985 | | -#: ../source/guides/dropping-older-python-versions.rst:36 |
| 2969 | +#: ../source/guides/dropping-older-python-versions.rst:29 |
2986 | 2970 | msgid "If you use this method, either remove this option or section, or explicitly set ``universal`` to ``0``:" |
2987 | 2971 | msgstr "" |
2988 | 2972 |
|
2989 | | -#: ../source/guides/dropping-older-python-versions.rst:48 |
2990 | | -msgid "Since it is possible to override the :file:`setup.cfg` settings via CLI flags, make sure that your scripts don't have ``--universal`` in your package creation scripts." |
| 2973 | +#: ../source/guides/dropping-older-python-versions.rst:41 |
| 2974 | +msgid "Regarding :ref:`deprecated <setup-py-deprecated>` direct ``setup.py`` invocations, passing the ``--universal`` flag on the command line could override this setting." |
2991 | 2975 | msgstr "" |
2992 | 2976 |
|
2993 | | -#: ../source/guides/dropping-older-python-versions.rst:53 |
| 2977 | +#: ../source/guides/dropping-older-python-versions.rst:45 |
2994 | 2978 | msgid "Defining the Python version required" |
2995 | 2979 | msgstr "" |
2996 | 2980 |
|
2997 | | -#: ../source/guides/dropping-older-python-versions.rst:56 |
2998 | | -msgid "1. Download the newest version of Setuptools" |
2999 | | -msgstr "" |
3000 | | - |
3001 | | -#: ../source/guides/dropping-older-python-versions.rst:58 |
3002 | | -msgid "Ensure that before you generate source distributions or binary distributions, you update Setuptools and install twine." |
| 2981 | +#: ../source/guides/dropping-older-python-versions.rst:48 |
| 2982 | +msgid "1. Install twine" |
3003 | 2983 | msgstr "" |
3004 | 2984 |
|
3005 | | -#: ../source/guides/dropping-older-python-versions.rst:60 |
3006 | | -msgid "Steps:" |
| 2985 | +#: ../source/guides/dropping-older-python-versions.rst:50 |
| 2986 | +msgid "Ensure that you have twine available at its latest version. Steps:" |
3007 | 2987 | msgstr "" |
3008 | 2988 |
|
3009 | | -#: ../source/guides/dropping-older-python-versions.rst:74 |
3010 | | -msgid "``setuptools`` version should be above 24.0.0." |
| 2989 | +#: ../source/guides/dropping-older-python-versions.rst:66 |
| 2990 | +msgid "2. Specify the version ranges for supported Python distributions" |
3011 | 2991 | msgstr "" |
3012 | 2992 |
|
3013 | | -#: ../source/guides/dropping-older-python-versions.rst:77 |
3014 | | -msgid "2. Specify the version ranges for supported Python distributions" |
| 2993 | +#: ../source/guides/dropping-older-python-versions.rst:68 |
| 2994 | +msgid "Set the version ranges declaring which Python distributions are supported within your project's :file:`pyproject.toml`. The :ref:`requires-python` configuration field corresponds to the :ref:`Requires-Python <core-metadata-requires-python>` core metadata field:" |
3015 | 2995 | msgstr "" |
3016 | 2996 |
|
3017 | | -#: ../source/guides/dropping-older-python-versions.rst:79 |
3018 | | -msgid "You can specify version ranges and exclusion rules, such as at least Python 3. Or, Python 2.7, 3.4 and beyond." |
| 2997 | +#: ../source/guides/dropping-older-python-versions.rst:80 |
| 2998 | +msgid "You can specify version ranges and exclusion rules (complying with the :ref:`version-specifiers` specification), such as at least Python 3.9. Or, at least Python 3.7 and beyond, skipping the 3.7.0 and 3.7.1 point releases:" |
3019 | 2999 | msgstr "" |
3020 | 3000 |
|
3021 | | -#: ../source/guides/dropping-older-python-versions.rst:81 |
3022 | | -msgid "Examples:" |
| 3001 | +#: ../source/guides/dropping-older-python-versions.rst:89 |
| 3002 | +msgid "If using the :ref:`setuptools` build backend, consult the `dependency-management`_ documentation for more options." |
3023 | 3003 | msgstr "" |
3024 | 3004 |
|
3025 | | -#: ../source/guides/dropping-older-python-versions.rst:88 |
3026 | | -msgid "The way to set those values is within the call to ``setup`` within your :file:`setup.py` script. This will insert the ``Requires-Python`` metadata values based on the argument you provide in ``python_requires``." |
| 3005 | +#: ../source/guides/dropping-older-python-versions.rst:92 |
| 3006 | +msgid "Avoid adding upper bounds to the version ranges, e. g. ``\">= 3.8, < 3.10\"``. Doing so can cause different errors and version conflicts. See the `discourse-discussion`_ for more information." |
3027 | 3007 | msgstr "" |
3028 | 3008 |
|
3029 | | -#: ../source/guides/dropping-older-python-versions.rst:103 |
| 3009 | +#: ../source/guides/dropping-older-python-versions.rst:96 |
3030 | 3010 | msgid "3. Validating the Metadata before publishing" |
3031 | 3011 | msgstr "" |
3032 | 3012 |
|
3033 | | -#: ../source/guides/dropping-older-python-versions.rst:105 |
| 3013 | +#: ../source/guides/dropping-older-python-versions.rst:98 |
3034 | 3014 | msgid "Within a Python source package (the zip or the tar-gz file you download) is a text file called PKG-INFO." |
3035 | 3015 | msgstr "" |
3036 | 3016 |
|
3037 | | -#: ../source/guides/dropping-older-python-versions.rst:107 |
3038 | | -msgid "This file is generated by :ref:`distutils` or :ref:`setuptools` when it generates the source package. The file contains a set of keys and values, the list of keys is part of the PyPa standard metadata format." |
| 3017 | +#: ../source/guides/dropping-older-python-versions.rst:100 |
| 3018 | +msgid "This file is generated by the :term:`build backend <Build Backend>` when it generates the source package. The file contains a set of keys and values, the list of keys is part of the PyPA standard metadata format." |
3039 | 3019 | msgstr "" |
3040 | 3020 |
|
3041 | | -#: ../source/guides/dropping-older-python-versions.rst:110 |
| 3021 | +#: ../source/guides/dropping-older-python-versions.rst:103 |
3042 | 3022 | msgid "You can see the contents of the generated file like this:" |
3043 | 3023 | msgstr "" |
3044 | 3024 |
|
3045 | | -#: ../source/guides/dropping-older-python-versions.rst:116 |
| 3025 | +#: ../source/guides/dropping-older-python-versions.rst:109 |
3046 | 3026 | msgid "Validate that the following is in place, before publishing the package:" |
3047 | 3027 | msgstr "" |
3048 | 3028 |
|
3049 | | -#: ../source/guides/dropping-older-python-versions.rst:118 |
3050 | | -msgid "If you have upgraded correctly, the Metadata-Version value should be 1.2 or higher." |
3051 | | -msgstr "" |
3052 | | - |
3053 | | -#: ../source/guides/dropping-older-python-versions.rst:119 |
3054 | | -msgid "The Requires-Python field is set and matches your specification in setup.py." |
| 3029 | +#: ../source/guides/dropping-older-python-versions.rst:111 |
| 3030 | +msgid "If you have upgraded correctly, the ``Metadata-Version`` value should be 1.2 or higher." |
3055 | 3031 | msgstr "" |
3056 | 3032 |
|
3057 | | -#: ../source/guides/dropping-older-python-versions.rst:122 |
3058 | | -msgid "4. Using Twine to publish" |
| 3033 | +#: ../source/guides/dropping-older-python-versions.rst:112 |
| 3034 | +msgid "The ``Requires-Python`` field is set and matches your specification in the configuration file." |
3059 | 3035 | msgstr "" |
3060 | 3036 |
|
3061 | | -#: ../source/guides/dropping-older-python-versions.rst:124 |
3062 | | -msgid "Twine has a number of advantages, apart from being faster it is now the supported method for publishing packages." |
| 3037 | +#: ../source/guides/dropping-older-python-versions.rst:115 |
| 3038 | +msgid "4. Publishing the package" |
3063 | 3039 | msgstr "" |
3064 | 3040 |
|
3065 | | -#: ../source/guides/dropping-older-python-versions.rst:126 |
3066 | | -msgid "Make sure you are using the newest version of Twine, at least 1.9." |
| 3041 | +#: ../source/guides/dropping-older-python-versions.rst:117 |
| 3042 | +msgid "Proceed as suggested in :ref:`Uploading your Project to PyPI`." |
3067 | 3043 | msgstr "" |
3068 | 3044 |
|
3069 | | -#: ../source/guides/dropping-older-python-versions.rst:129 |
3070 | | -msgid "Dropping a Python release" |
| 3045 | +#: ../source/guides/dropping-older-python-versions.rst:120 |
| 3046 | +msgid "Dropping a Python version" |
3071 | 3047 | msgstr "" |
3072 | 3048 |
|
3073 | | -#: ../source/guides/dropping-older-python-versions.rst:131 |
3074 | | -msgid "Once you have published a package with the Requires-Python metadata, you can then make a further update removing that Python runtime from support." |
| 3049 | +#: ../source/guides/dropping-older-python-versions.rst:122 |
| 3050 | +msgid "In principle, at least metadata support for Python versions should be kept as long as possible, because once that has been dropped, people still depending on a version will be forced to downgrade. If however supporting a specific version becomes a blocker for a new feature or other issues occur, the metadata ``Requires-Python`` should be amended. Of course this also depends on whether the project needs to be stable and well-covered for a wider range of users." |
3075 | 3051 | msgstr "" |
3076 | 3052 |
|
3077 | | -#: ../source/guides/dropping-older-python-versions.rst:133 |
3078 | | -msgid "It must be done in this order for the automated fallback to work." |
| 3053 | +#: ../source/guides/dropping-older-python-versions.rst:128 |
| 3054 | +msgid "Each version compatibility change should have its own release." |
3079 | 3055 | msgstr "" |
3080 | 3056 |
|
3081 | | -#: ../source/guides/dropping-older-python-versions.rst:135 |
3082 | | -msgid "For example, you published the Requires-Python: \">=2.7\" as version 1.0.0 of your package." |
| 3057 | +#: ../source/guides/dropping-older-python-versions.rst:132 |
| 3058 | +msgid "When dropping a Python version, it might also be rewarding to upgrade the project's code syntax generally, apart from updating the versions used in visible places (like the testing environment). Tools like pyupgrade_ or `ruff <https://docs.astral.sh/ruff/linter/>`_ can automate some of this work." |
3083 | 3059 | msgstr "" |
3084 | 3060 |
|
3085 | | -#: ../source/guides/dropping-older-python-versions.rst:137 |
3086 | | -msgid "If you were then to update the version string to \">=3.5\", and publish a new version 2.0.0 of your package, any users running Pip 9.0+ from version 2.7 will have version 1.0.0 of the package installed, and any >=3.5 users will receive version 2.0.0." |
| 3061 | +#: ../source/guides/dropping-older-python-versions.rst:138 |
| 3062 | +msgid "Support for the Metadata 1.2 specification has been added in Pip 9.0." |
3087 | 3063 | msgstr "" |
3088 | 3064 |
|
3089 | 3065 | #: ../source/guides/hosting-your-own-index.rst:5 |
@@ -3565,7 +3541,7 @@ msgid "To install pip and wheel for the system Python, there are two options:" |
3565 | 3541 | msgstr "" |
3566 | 3542 |
|
3567 | 3543 | #: ../source/guides/installing-using-linux-tools.rst:52 |
3568 | | -msgid "Enable the `EPEL repository <https://fedoraproject.org/wiki/EPEL>`_ using `these instructions <https://docs.fedoraproject.org/en-US/epel/#how_can_i_use_these_extra_packages>`__. On EPEL 7, you can install pip and wheel like so:" |
| 3544 | +msgid "Enable the `EPEL repository <https://fedoraproject.org/wiki/EPEL>`_ using `these instructions <https://docs.fedoraproject.org/en-US/epel/getting-started/>`__. On EPEL 7, you can install pip and wheel like so:" |
3569 | 3545 | msgstr "" |
3570 | 3546 |
|
3571 | 3547 | #: ../source/guides/installing-using-linux-tools.rst:61 |
|
0 commit comments