Skip to content

Commit

Permalink
#139: Fix compatibility with poetry-core 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Aug 21, 2023
1 parent 572fc57 commit 807de06
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- '1.3.2'
- '1.4.2'
- '1.5.1'
- '1.6.0'
steps:
- uses: actions/checkout@v3
with:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## Unreleased

* Fixed:
* Compatibility with poetry-core 1.7.0, which removed the `poetry.core.semver` module.

## v1.0.0 (2023-08-18)

* Fixed:
Expand Down
5 changes: 4 additions & 1 deletion poetry_dynamic_versioning/patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@


def _patch_poetry_create(factory_mod) -> None:
from poetry.core.semver.version import Version as PoetryVersion
try:
from poetry.core.constraints.version import Version as PoetryVersion
except ImportError:
from poetry.core.semver.version import Version as PoetryVersion

original_poetry_create = getattr(factory_mod, "Factory").create_poetry

Expand Down

0 comments on commit 807de06

Please sign in to comment.