a968919ebe
There are a number of backport packages in place for packages in stdlib that are still evolving. One such package is 'importlib-metadata' which is a backport of 'importlib.metadata'. The README [1] for this package shows a mapping of versions of the 'importlib-metadata' third party library to versions of stdlib 'importlib.metadata': importlib_metadata stdlib 4.8 3.11 4.4 3.10 1.4 3.8 A project may want to use a shiny new feature only found in the Python 3.11 stdlib version while continuing to support Python 3.8, 3.9 and 3.10. If so, they could specify something like so: importlib-metadata>=4.8;python_version<3.11 Meanwhile, other packages might require features found in the Python 3.10 stdlib version. They would want to specify something like so: importlib-metadata>=4.4;python_version<3.10 Currently this is not possible as it is not possible to specify arbitrary 'python_version' markers. Since 'importlib-metadata' does not have a 'python_version' marker in 'global-requirements.txt' (not since change I5febaed02e95ff27accd946abc32f3bcbb1a5ead anyway), both projects would have to specify importlib-metadata>={required_version} Which means they'll use importlib-metadata even where they don't need it. Fix this issue by allowing a list of particular modules to specify a project-specific 'python_version' marker. Currently this list only includes 'importlib-metadata', but in the future we may wish to enhance it to include other rolling backport libraries (e.g. mock). [1] https://pypi.org/project/importlib-metadata/ Change-Id: I85501b4bff97d1c1e1873c3329ef998a8e501134 Signed-off-by: Stephen Finucane <stephenfin@redhat.com> |
||
---|---|---|
.. | ||
cmds | ||
tests | ||
__init__.py | ||
check.py | ||
constraints.py | ||
project.py | ||
project_config.py | ||
requirement.py |