Skip to content

Commit b19c2ad

Browse files
thomas-chauchefoin-tobdguidoclaude
authored
Bump minimum numpy to 2.2.6 (#201)
* Bump minimum numpy to 2.2.6 This version solves the build error with Python 3.13 (and the associated failing test) while maintaining compatibility with Python 3.10. * Use explicit version requirements for numpy * Add documentation explaining test_zip_properties fix history Document that this test was previously skipped for Python 3.13 due to numpy private API usage in check_numpy(), and reference commit 50e206b which fixed the issue by switching to public numpy.lib.format APIs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Dan Guido <dan@trailofbits.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent cd54389 commit b19c2ad

File tree

3 files changed

+75
-52
lines changed

3 files changed

+75
-52
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ requires-python = ">=3.10"
3131
torch = [
3232
"torch >= 2.1.0",
3333
"torchvision >= 0.24.1",
34-
"numpy >= 1.24.0; python_version < '3.14'",
35-
"numpy >= 2.3.5; python_version >= '3.14'",
36-
]
34+
"numpy >= 2.2.6, < 2.3; python_version == '3.10'",
35+
"numpy >= 2.3.5; python_version >= '3.11'",
36+
]
3737
lint = [
3838
"ruff >= 0.8.0",
3939
"mypy >= 1.10.0",

test/test_polyglot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,8 @@ def test_torchscript_properties(self):
309309
}
310310
self.assertEqual(properties, proper_result)
311311

312-
@unittest.skip("FIXME: Failing for python 3.13")
312+
# Previously skipped for Python 3.13 due to numpy private API usage in check_numpy().
313+
# Fixed in commit 50e206b by switching to public numpy.lib.format APIs.
313314
def test_zip_properties(self):
314315
properties = polyglot.find_file_properties(self.zip_filename)
315316
proper_result = {

0 commit comments

Comments
 (0)