poetry-core icon indicating copy to clipboard operation
poetry-core copied to clipboard

Fixing platform_release pep440

Open npapapietro opened this issue 10 months ago • 9 comments

Resolves: python-poetry/poetry#7418

  • [x] Added tests for changed code.
  • [ ] Updated documentation for changed code.

Can add more tests if requested. Any feedback welcome as well, attempted to fix with smallest changes and no side effects.

Examples of conditions this should fix

  • 'tegra' in platform_release
  • 'platform_release <= 5.10.123-tegra

When parsing versions, I added an additional semver-ish regex that will catch patterns that match certain platform_release versions that aren't quite pep440 or semver. Examples are either WSL2 builds, raspi builds or nvidia edge device builds

  • 5.15.146.1-microsoft-standard-WSL2
  • 6.6.20+rpt-rpi-v8
  • 5.10.120-tegra

npapapietro avatar Apr 17 '24 23:04 npapapietro