Skip to content

Remove Python 3.13 from supported versions#599

Closed
lalten wants to merge 1 commit into
mvukov:mainfrom
lalten:patch-2
Closed

Remove Python 3.13 from supported versions#599
lalten wants to merge 1 commit into
mvukov:mainfrom
lalten:patch-2

Conversation

@lalten

@lalten lalten commented Jan 30, 2026

Copy link
Copy Markdown
Contributor

Numpy 2.1.0 (https://numpy.org/devdocs/release/2.1.0-notes.html) is the first Numpy to support Python 3.13.

However ROS2 Humble requires Numpy <2. To my understanding this is mostly due to cv_bridge / OpenCV dependencies which are compiled against Numpy 1 ABI.

Numpy 1.x is also pinned in

numpy~=1.23

I'm trying to upgrade our Python interpreter to 3.13 currently and am running into an issue where some bazel query based checks choke on rules_ros2 failing to build a Numpy 2.3.5 from source due to bazel-contrib/rules_python#824

This is a simple fix for our queries.

I'm not really sure how Python 3.13 would work with ROS2 Humble (@mering vis / #474)

But hopefully we can get #558 at some point (promise to try it soon :D)

Remove Python version 3.13 from the supported versions list.
@lalten

lalten commented Jan 30, 2026

Copy link
Copy Markdown
Contributor Author

Actually I'm now seeing issues in our build with this patch applied

ERROR: /mnt/data/bazel-user-root/45ef7d2bd11527ab6fca94135f0ad0a0/external/rules_python++pip+rules_ros2_pip_deps/empy/BUILD.bazel:5:12: configurable attribute "actual" in @@rules_python++pip+rules_ros2_pip_deps//empy:_no_matching_repository doesn't match this configuration: No matching wheel for current configuration's Python version.

The current build configuration's Python version doesn't match any of the Python
wheels available for this distribution. This distribution supports the following Python
configuration settings:
    //_config:is_cp310
    //_config:is_cp311
    //_config:is_cp312

So this is also not a good solution...

@lalten

lalten commented Jan 30, 2026

Copy link
Copy Markdown
Contributor Author

Another option would be to upgrade rules_ros2 to Numpy 2.

ros2/BUILD.bazel would need

 whl_filegroup(
     name = "numpy_includes",
-    pattern = "numpy/core/include/numpy",
+    pattern = "numpy/_core/include/numpy",
     whl = "@rules_ros2_pip_deps//numpy:whl",
 )

 cc_library(
     name = "rules_ros2_pip_deps_numpy_headers",
     hdrs = [":numpy_includes"],
-    includes = ["numpy_includes/numpy/core/include"],
+    includes = ["numpy_includes/numpy/_core/include"],
     visibility = ["//visibility:public"],
     deps = ["@rules_python//python/cc:current_py_cc_headers"],
 )

And drop Python 3.10 support (Numpy 2 has prebuilt wheels only for Python 3.11+)

I'm not super sure about the implications of the Numpy ABI linkage that I mentioned.

@lalten

lalten commented Jan 30, 2026

Copy link
Copy Markdown
Contributor Author

related: #424

@lalten

lalten commented Jan 30, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #600

@lalten lalten closed this Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant