Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit c39a440

Browse files
authoredJul 2, 2024
fix: fixed regression with older Python due to imcompatible type annotation (#115)
* Ensure type annotation is compatible with python 3.8 * Run tests against minimum version of python supported * Update version
1 parent 8690bed commit c39a440

File tree

6 files changed

+1171
-99
lines changed

6 files changed

+1171
-99
lines changed
 

‎.github/workflows/test.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@ jobs:
2222
src: "./anypytools"
2323

2424
test:
25+
strategy:
26+
matrix:
27+
env: ["test", "test-py37"]
2528
runs-on: windows-latest
2629
needs: lint
2730
steps:
2831
- uses: actions/checkout@v4
2932

3033
- uses: prefix-dev/setup-pixi@v0.8.1
3134
with:
32-
environments: test
35+
environments: ${{ matrix.env }}
3336
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
3437
activate-environment: test
3538

‎CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# AnyPyTools Change Log
22

3+
## v1.12.2
4+
5+
**Fixed:**
6+
* Fixed type annotation which broke compability with older versions of Python.
7+
8+
39
## v1.12.1
410

511
**Fixed:**

‎anypytools/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"NORMAL_PRIORITY_CLASS",
3737
]
3838

39-
__version__ = "1.12.1"
39+
__version__ = "1.12.2"
4040

4141

4242
def print_versions():

‎anypytools/abcutils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ def _worker(self, task, task_queue):
915915
task_queue.put(task)
916916

917917
def _schedule_processes(
918-
self, tasklist: list[_Task]
918+
self, tasklist: List[_Task]
919919
) -> Generator[_Task, None, None]:
920920
# Make a shallow copy of the task list,
921921
# so we don't mess with the callers list.

‎pixi.lock

+1,146-87
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pixi.toml

+13-9
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,11 @@ channels = ["conda-forge", "anybody" ]
66
platforms = ["win-64", "linux-64"]
77

88
[tasks]
9-
develop = "pip install -e ."
10-
install = "pip install ."
11-
12-
clean-build = "rm -rf build dist"
13-
pipy-upload = {cmd="twine upload dist/*"}
14-
release = {cmd="", depends-on=["test", "clean-build", "build", "pipy-upload"]}
159

1610

1711

1812
[dependencies]
19-
python= ">=3.8"
13+
python= ">=3.7"
2014
pip="*"
2115
h5py="*"
2216
setuptools="*"
@@ -37,13 +31,22 @@ anypytools = {path=".", editable=false}
3731
build="*"
3832
twine="*"
3933

34+
35+
[feature.build.tasks]
36+
clean-build = "rm -rf build dist"
37+
pipy-upload = {cmd="twine upload dist/*"}
38+
build = {cmd="python -m build . --sdist"}
39+
40+
4041
[feature.jupyter.dependencies]
4142
jupyterlab = "*"
4243

4344
[feature.test.dependencies]
4445
pytest="*"
4546
pytest-xdist = "*"
46-
debugpy = ">=1.8.1,<1.9"
47+
48+
[feature.py37.dependencies]
49+
python = "3.7.*"
4750

4851
[feature.test.target.win-64.dependencies]
4952
anybodycon = "*"
@@ -74,6 +77,7 @@ pytest = ">=8.2.1,<8.3"
7477

7578
[environments]
7679
docs = ["docs"]
77-
test = ["test", "build"]
80+
test = ["test"]
81+
test-py37 = ["test", "py37",]
7882
build = ["build"]
7983
jupyter = ["jupyter"]

0 commit comments

Comments
 (0)
Please sign in to comment.