Skip to content

Commit 64f4d76

Browse files
authored
Require typing_extensions with Self support on Python 3.10 (#233)
## Summary On Python 3.10, `spatialmath.base._types_39` imports `Self` from `typing_extensions`. The current unbounded dependency allows `typing_extensions==3.10.0.2`, which lacks `Self` and makes `import spatialmath` fail. Require `typing_extensions>=4.0.0`, the first release with `Self`, so the package metadata reflects this import requirement. ## Validation - With `typing_extensions==3.10.0.2`, reproduced `ImportError: cannot import name 'Self' from 'typing_extensions'` before the metadata change. - Reinstalled the editable package after the change; dependency resolution upgraded `typing_extensions` to 4.16.0 and `import spatialmath` succeeded. - Also checked that `import spatialmath` succeeds with the minimum allowed version, 4.0.0. - With the resolved current dependency set, `pytest -q --disable-warnings`: **347 passed, 3 skipped** (Python 3.10.12); `git diff --check` passed. Fixes #78. Prepared and validated with OpenAI Codex assistance. Signed-off-by: 李永祺 <doribelove@gmail.com>
1 parent 61a6c4f commit 64f4d76

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies = [
3737
"scipy",
3838
"matplotlib",
3939
"ansitable",
40-
"typing_extensions",
40+
"typing_extensions>=4.0.0",
4141
"pre-commit",
4242
]
4343

0 commit comments

Comments
 (0)