Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add python3.13 support #103

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ FIND_PACKAGE (pybind11 2.12.0 REQUIRED)
### Python

# Python versions to build for and support
SET (PYTHON_SEARCH_VERSIONS 3.9 3.10 3.11 3.12 CACHE STRING "Versions of Python bindings to build.")
SET (PYTHON_SEARCH_VERSIONS 3.9 3.10 3.11 3.12 3.13 CACHE STRING "Versions of Python bindings to build.")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Based on the search results and the earlier GitHub issue search that revealed an open issue "Python v3.13 related things to look into" (#4870), I can now generate the final response:

Python 3.13 support needs further investigation

The addition of Python 3.13 to PYTHON_SEARCH_VERSIONS may be premature as:

  1. There's an open issue in pybind11 (#4870) specifically about Python 3.13 compatibility
  2. Python 3.13 support is still being investigated by the pybind11 team
  3. The CMake configuration will safely skip Python 3.13 if it's not found, but enabling it now might create expectations of support

Recommendation:

  • Consider waiting for official Python 3.13 support in pybind11 before adding it to PYTHON_SEARCH_VERSIONS
  • Alternatively, add a comment indicating that Python 3.13 support is experimental
🔗 Analysis chain

Verify pybind11 compatibility with Python 3.13

The addition of Python 3.13 support aligns with the PR objective. However, since Python 3.13 is relatively new, please ensure:

  1. The project's pybind11 version (2.12.0) supports Python 3.13
  2. All binding features work correctly with Python 3.13

Let's verify pybind11's Python 3.13 support:


Let me try another approach to verify pybind11's Python 3.13 support by checking their source code directly:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check pybind11's Python version support in their repository

# Check if pybind11 2.12.0 mentions Python 3.13 support in their changelog
gh api repos/pybind/pybind11/contents/docs/changelog.rst | jq -r '.content' | base64 -d | grep -A 5 "v2.12.0"

# Check for any open/closed issues related to Python 3.13 support
gh api graphql -f query='
{
  search(query: "repo:pybind/pybind11 Python 3.13", type: ISSUE, first: 5) {
    nodes {
      ... on Issue {
        title
        state
        url
      }
    }
  }
}'

Length of output: 982


Script:

#!/bin/bash
# Check pybind11's Python version support in their CMake configuration
fd CMakeLists.txt | xargs rg -A 5 "PYTHON_VERSION|Python version"

# Check if there are any Python version checks or limitations in pybind11 headers
fd "\.h$" | xargs rg -A 5 "PY_VERSION|Python 3.13"

# Look for any Python version related tests
fd "test" | xargs rg -A 5 "Python 3.13|py3.13"

Length of output: 7903


MESSAGE (STATUS "Looking for available python versions...")
FOREACH (PYTHON_VERSION ${PYTHON_SEARCH_VERSIONS})
Expand Down
2 changes: 1 addition & 1 deletion bindings/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Apache License 2.0

open-space-toolkit-core~=4.0
open-space-toolkit-core~=4.1
Loading