layerindex-web/layerindex
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 models.py: add updates_enabled to LayerBranch 2023-10-19 10:32:58 -07:00
static bootstrap: fix typo in minified file name 2023-10-19 14:01:47 -07:00
templatetags Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
tools layerindex/tools: add mark_yp_compatible_layers.py 2023-11-16 07:09:09 -08:00
__init__.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
admin.py admin.py: Remove has_delete_permission() 2022-12-16 08:59:37 -08:00
auth_forms.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
auth_views.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
bulkchange.py layerindex/*: make all shebangs python3 2022-01-13 20:58:28 -08:00
context_processors.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
forms.py layerindex: Add actual_branch to forms and views 2024-01-03 13:33:37 -08:00
layerconfparse.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
middleware.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
models.py layerindex/models.py: fix Inactive-Upstream check 2023-11-17 12:15:49 -08:00
querysethelper.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
recipedesc.py global: replace deprecated distutils 2022-12-16 08:59:37 -08:00
recipeparse.py recipe{desc,parse}.py: BB_ENV_PASSTHROUGH_ADDITIONS 2022-04-28 08:15:22 -07:00
restperm.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
restviews.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
securityquestions.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
tasks.py Add SPDX license headers to layerindex-web source files 2021-04-21 08:22:51 +12:00
update_layer.py global: deprecated pkg_resources parse_version 2024-01-22 16:08:37 -08:00
update.py global: deprecated pkg_resources parse_version 2024-01-22 16:08:37 -08:00
urls_branch.py layerindex: add Update Layer UI feature 2024-01-03 13:33:37 -08:00
urls.py layerindex: add Update Layer UI feature 2024-01-03 13:33:37 -08:00
utils.py layerindex: improve updates for actual_branch 2024-01-03 13:33:37 -08:00
views.py global: deprecated pkg_resources parse_version 2024-01-22 16:08:37 -08:00