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

ci: Do not merge: Research Python 3.13 compatibility #337

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Purpose

Research which CDK dependencies are not compatible with Python 3.13.

Changes

  • Bump max Python version to 3.14 to allow testing with 3.13
  • Add Python 3.13 to CI test matrix
  • Update CI runner to Ubuntu 22.04

Link to Devin run

https://app.devin.ai/sessions/893114c5dc344f13af3048917ca33bf2

Requested by

Aaron

DO NOT MERGE - This is an exploratory PR to identify incompatible dependencies.

Copy link
Contributor Author

🤖 Devin AI Engineer

Original prompt from Aaron:

@Devin - Can you create an exploratory PR to tell us which of our CDK dependencies are not compatible with Python 3.13? Don't try to resolve anything, just try bumping our max Python version, add Py3.13 to the CI test matrix, and report back what cannot install.

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration devin-ai-integration bot changed the title Do not merge: Research Python 3.13 compatibility ci: Do not merge: Research Python 3.13 compatibility Feb 13, 2025

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Contributor Author

Python 3.13 Compatibility Research - Final Update

After thorough investigation:

  1. Main Compatibility Blocker:

  2. CI Results:

    • Poetry lock completed successfully with Python >=3.10,<3.14 constraint
    • Python 3.13 CI job fails during dependency installation
    • Python 3.10 and 3.11 jobs are passing
  3. Key Findings:

    • The dependency resolution works at the Poetry level
    • Installation fails at runtime, similar to the Python 3.12 issue
    • No additional blockers identified beyond the known requests-cache issue

Recommendation:
Wait for the requests-cache issue to be resolved before attempting Python 3.13 support, as it's already a known blocker for Python 3.12.

Note: This PR should not be merged as it was created for research purposes only.

Copy link
Contributor Author

Additional Python 3.13 Compatibility Issue Found

The fastavro package (version 1.8.2) fails to build with Python 3.13 due to several C API changes:

  1. Use of deprecated Unicode APIs:

    • Py_UNICODE type (deprecated)
    • _PyUnicode_FastCopyCharacters (should use PyUnicode_CopyCharacters)
  2. Missing or changed internal C APIs:

    • _PyDict_SetItem_KnownHash undefined
    • _PyObject_NextNotImplemented undefined
    • _PyLong_AsByteArray signature change

This appears to be a compatibility issue with fastavro's Cython-generated C code and Python 3.13's internal C API changes. This is a more fundamental blocker than the previously identified requests-cache issue.

Copy link
Contributor Author

Closing this research PR. The investigation revealed two key blockers for Python 3.13 compatibility:

  1. fastavro package (1.8.2) fails to build due to Python 3.13 C API changes (see detailed CI failure: https://github.com/airbytehq/airbyte-python-cdk/actions/runs/13314288230/job/37184392678?pr=337)
  2. requests-cache package has known compatibility issues (ref: Third party requests-cache breaks Python 3.12 compatibility #299)

Thank you for the opportunity to investigate this compatibility research.

@aaronsteers
Copy link
Contributor

Posting here for posterity - it looks like newer versions of fastavro (starting with 1.10.0) are compatible with Python 3.13.

https://github.com/fastavro/fastavro/blob/master/ChangeLog

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