layerindex-web/rrs
Tim Orling 83378f2f9c global: deprecated pkg_resources parse_version
Since we are only using parse_version for comparison (typically checking
that we are greater than some minimum version for tool or package), one
would think we can use packaging.version.parse as if it was parse_version

Unfortunately, this requires conforming to PEP-440 version definitions,
which does not work for e.g. autotools (2.72d) nor older openssl (1.1.1p).
We rely in these (and to be sure other) cases on the LegacyVersion behavior.

https://packaging.python.org/en/latest/specifications/version-specifiers/#summary-of-differences-from-pkg-resources-parse-version

"This specification purposely restricts the syntax which constitutes a
valid version while pkg_resources.parse_version attempts to provide some
meaning from any arbitrary string."

In order to have the least impact to the overall code, we instead add
packaging_legacy to requirements.txt and use packaging_legacy.version.parse
as if it was parse_version.

https://pypi.org/project/packaging-legacy/
https://github.com/pypa/packaging/pull/407

Since pypi.org itself is depending on packaging_legacy (in fact, a pypi dev
developed the package), we can expect it to be supported for quite some time.

https://github.com/pypi/warehouse/pull/13500

[YOCTO #15348]

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
2024-01-22 16:08:37 -08:00
..
migrations rrs: add 0030_alter_recipeupgrade_maintainer.py miagration 2022-01-13 21:00:36 -08:00
static Update TableSorter to latest version of active fork 2019-07-17 11:31:01 +12:00
tools global: deprecated pkg_resources parse_version 2024-01-22 16:08:37 -08:00
__init__.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
admin.py rrs/admin.py: drop curry import 2022-01-13 21:00:14 -08:00
apps.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
context_processors.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
models.py rrs: make changes to support Django 2.2 2021-10-20 10:02:58 +13:00
urls.py Refactor usage of django.conf.urls 2023-10-05 20:10:09 -07:00
views.py Report charset for text & CSV views 2021-10-20 11:07:46 +13:00
wsgi.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00