Move type aliases outside TYPE_CHECKING and replace deprecated interface usage#501
Move type aliases outside TYPE_CHECKING and replace deprecated interface usage#501lan496 merged 8 commits intospglib:developfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #501 +/- ##
========================================
Coverage 83.90% 83.90%
========================================
Files 25 25
Lines 8185 8185
Branches 1709 1701 -8
========================================
Hits 6868 6868
Misses 1317 1317
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
We can still keep the Can you add Line 115 in 3486a6d We should also do something similar for the CMake builds and tests, the examples are using deprecated api as well. |
|
I didn't find ny more usage in |
No, python 3.9 complains "TypeError: unsupported operand type(s) for |: 'types.GenericAlias' and 'types.GenericAlias'" |
|
About the Fedora failures, update Subject: [PATCH] Relax numpy requirements
---
Index: pyproject.toml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/pyproject.toml b/pyproject.toml
--- a/pyproject.toml (revision c4f576776c61725f90bd6becfb57b26a8c223883)
+++ b/pyproject.toml (date 1720423830036)
@@ -1,7 +1,7 @@
[build-system]
# Numpy build and runtime dependencies are linked to ABI compatibility
# A new wheel rebuild is needed when changing these
-requires = ["scikit-build-core", "numpy~=2.0"]
+requires = ["scikit-build-core", "numpy"]
build-backend = "scikit_build_core.build"
[project]
@@ -13,7 +13,7 @@
readme = "python/README.rst"
dynamic = ["version"]
dependencies = [
- "numpy>=1.20,<3",
+ "numpy>=1.20",
"importlib-resources; python_version<'3.10'",
"typing-extensions; python_version<'3.10'",
]I still see issues with --- a/test/example/CMakeLists.txt (revision c4f576776c61725f90bd6becfb57b26a8c223883)
+++ b/test/example/CMakeLists.txt (date 1720425410296)
@@ -20,10 +20,10 @@
if (SPGLIB_WITH_Python)
add_test(NAME example-python
- COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/python_api/example.py
+ COMMAND ${Python_EXECUTABLE} -Werror ${CMAKE_CURRENT_SOURCE_DIR}/python_api/example.py
)
add_test(NAME example-python-full
- COMMAND ${Python_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/python_api/example_full.py
+ COMMAND ${Python_EXECUTABLE} -Werror ${CMAKE_CURRENT_SOURCE_DIR}/python_api/example_full.py
)
set_property(TEST example-python example-python-full
APPEND PROPERTYI will try to address them properly later together with the cmake tests. |
LecrisUT
left a comment
There was a problem hiding this comment.
Ok, I've tested locally and -Werror worked, just that get_symmetry is not converted. I don't think that one should be converted to a dataclass in that form though.
Should I wait for your work before releasing the next version? |
Resolves #486 (comment)