canonical / data-platform-libs

A collection of charm libraries curated by the Data Platform Team
https://charmhub.io/data-platform-libs
Apache License 2.0
9 stars 9 forks source link

Use poetry-core to parse version constraints #93

Closed carlcsaposs-canonical closed 10 months ago

marcoppenheimer commented 11 months ago

Such a good addition, though it breaks my heart that it was that easy.

carlcsaposs-canonical commented 11 months ago

Can we keep tests untouched to guaranties full compatibility?

There were two reasons I touched tests:

  1. Some tests (e.g. test_verify_tilde_requirements) verified that invalid caret requirements returned True (presumably since a different function would test the caret requirements, so the function for tilde requirements shouldn't check caret requirements). This was testing an internal implementation detail
  2. 1.2.3 is a valid poetry version constraint (it means ==1.2.3). Before, it was not accepted as a version constraint