Skip to content

FIxed the python version error#27

Merged
anaslimem merged 1 commit intomainfrom
python_bindings
Mar 16, 2026
Merged

FIxed the python version error#27
anaslimem merged 1 commit intomainfrom
python_bindings

Conversation

@anaslimem
Copy link
Owner

Description

The core problem was that the cortexadb-py Python bindings use a Rust crate called PyO3 (specifically version 0.24.2) to bridge between Rust and Python. PyO3 has strict version compatibility checks. Version 0.24.2 officially only supports up to Python 3.13. When I tried to build the project on Python 3.14, PyO3's built-in compiler script intentionally crashed, stating:
error: the configured Python interpreter version (3.14) is newer than PyO3's maximum supported version (3.13)
By creating the .cargo/config.toml file with PYO3_USE_ABI3_FORWARD_COMPATIBILITY="1", I explicitly instructed the Rust compiler to suppress this check and build the bindings using Python's stable ABI (Application Binary Interface).

Copilot AI review requested due to automatic review settings March 16, 2026 19:48
@vercel
Copy link

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cortexa-db Ready Ready Preview, Comment Mar 16, 2026 7:48pm

@anaslimem anaslimem merged commit 2742bca into main Mar 16, 2026
4 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses build failures of the cortexadb-py bindings on Python 3.14 by configuring Cargo to set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1, which suppresses PyO3’s maximum-supported-Python version check.

Changes:

  • Add a workspace-level .cargo/config.toml that sets PYO3_USE_ABI3_FORWARD_COMPATIBILITY = "1" for all Cargo builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +2
[env]
PYO3_USE_ABI3_FORWARD_COMPATIBILITY = "1"
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.

2 participants