Skip to content

Commit d480dc7

Browse files
committed
fix: dynamic Mapping import based on Python version
1 parent 96c13d1 commit d480dc7

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Upload
5252
run: python -m twine upload dist/*
5353
env:
54-
TWINE_USERNAME: ${{ secrets.PYPI_USERANAME }}
54+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
5555
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
5656

5757
- name: Get Version

tuprolog/solve/_ktadapt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
from collections import Mapping
1+
import sys
2+
if sys.version_info < (3, 10):
3+
from collections import Mapping # for Python 3.9 and earlier
4+
else:
5+
from collections.abc import Mapping # for Python 3.10 and later
26
from itertools import chain
37

48
from tuprolog import logger

0 commit comments

Comments
 (0)