Skip to content

Support Python 3.13 #2844

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

Merged
merged 8 commits into from
Jun 2, 2025
Merged

Support Python 3.13 #2844

merged 8 commits into from
Jun 2, 2025

Conversation

lucasgomide
Copy link
Contributor

@lucasgomide lucasgomide commented May 15, 2025

Closes #1687

@joaomdmoura
Copy link
Collaborator

Disclaimer: This review was made by a crew of AI Agents.

Code Review Comment for PR #2844

Summary

This PR introduces essential enhancements to the crewAI project, focusing on dependency management through version updates, updates to CI configurations, and necessary documentation adjustments. Here are the key areas requiring further attention and improvement:

Dependency Version Upgrades

The following critical updates have been made in pyproject.toml:

  1. Python Version Specification:

    • Changed from >=3.10,<3.13 to >=3.10,<=3.13. This change should be clearly noted as it now explicitly includes Python 3.13, enhancing clarity on supported versions.
  2. Major Upgrades of Dependencies:

    • fastembed: Upgraded from v0.4.1 to v0.7.0
    • onnxruntime: Upgraded from v1.19.2 to v1.22.0
    • numpy: A transitive dependency upgrade from v1.26.4 to v2.2.5
    • Note: Removal of onnx v1.17.0 as it is no longer necessary.

Recommendations for Dependency Management:

  • It would be prudent to impose explicit upper bounds on the critical dependencies to prevent compatibility issues in the future. For instance:

    [project.dependencies]
    fastembed = ">=0.7.0,<0.8.0"
    onnxruntime = ">=1.22.0,<2.0.0"

CI Configuration Changes

  • The CI configuration has been updated to include Python 3.13 in the test matrix, which is commendable. However, it’s important to ensure thorough testing across all supported Python versions.

Documentation Updates

  • The documentation correctly reflects new Python version support. However, we recommend enhancing the commit messages to provide context about breaking changes in the upgraded dependencies as follows:

    feat: upgrade fastembed & onnxruntime
    
    The following dependencies were upgraded:
    1. fastembed: v0.4.1 -> v0.7.0
       - Release notes: [link]
       - Breaking changes: [summary]
    2. onnxruntime: v1.19.2 -> v1.22.0
       - Release notes: [link]
    3. numpy: v1.26.4 -> v2.2.5 (transitive dependency)
       - Impact analysis: [summary]
    
    Removed dependencies:
    - onnx v1.17.0 (no longer needed)
    
    Testing:
    - Compatibility verified across Python versions 3.10-3.13
    - Full test suite executed with updated dependencies
    

Testing Implications

  • Specific tests validating compatibility with Python 3.13 and integration tests around the fastembed and onnxruntime functionality should be included.
  • Document any known issues or limitations arising from the Python 3.13 updates.

Security Considerations

  • Ensure that the security advisories for the newly upgraded dependencies are reviewed. Verify that there are no known vulnerabilities in the newer packages.
  • If a SECURITY.md file is absent, consider creating one to align with best practices.

Conclusion

The PR contains essential updates with respect to dependency management and documentation alignment that significantly improve the project’s clarity regarding support for Python 3.13. Overall, the changes are well-structured. However, addressing the recommendations stated above will enhance code quality and ensure a robust and maintainable codebase for future development.

Action Required Before Merging:

  1. Introduce specific version upper bounds for critical dependencies.
  2. Enhance commit messages with detailed changelog information.
  3. Validate test coverage for Python 3.13.
  4. Confirm there are no breaking changes introduced by the dependency upgrades.

Looking forward to seeing these adjustments made!

pyproject.toml Outdated
@@ -50,7 +50,7 @@ embeddings = [
"tiktoken~=0.7.0"
]
agentops = ["agentops>=0.3.0"]
fastembed = ["fastembed>=0.4.1"]
fastembed = ["fastembed>=0.7.0"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

i feel like we can drop this? no files use this, outside of fastembed.py but nothing is using it iirc

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's awesome! I'm going to double check that

@lucasgomide lucasgomide force-pushed the lg-python-3-13 branch 2 times, most recently from 9639172 to ad7d8cc Compare June 2, 2025 18:37
Copy link
Collaborator

@lorenzejay lorenzejay left a comment

Choose a reason for hiding this comment

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

lfg

@lucasgomide lucasgomide merged commit 66b7628 into main Jun 2, 2025
10 checks passed
joaomdmoura pushed a commit that referenced this pull request Jun 8, 2025
* ci: support python 3.13 on CI

* docs: update docs about support python version

* build: adds requires python <3.14

* build: explicit tokenizers dependency

Added explicit tokenizers dependency: Added tokenizers>=0.20.3 to ensure a version compatible with Python 3.13 is used.

* build: drop fastembed is not longer used

* build: attempt to build PyTorch on Python 3.13

* feat: upgrade fastavro, pyarrow and lancedb

* build: ensure tiktoken greather than 0.8.0 due Python 3.13 compatibility
didier-durand pushed a commit to didier-durand/crewAI that referenced this pull request Jun 12, 2025
* ci: support python 3.13 on CI

* docs: update docs about support python version

* build: adds requires python <3.14

* build: explicit tokenizers dependency

Added explicit tokenizers dependency: Added tokenizers>=0.20.3 to ensure a version compatible with Python 3.13 is used.

* build: drop fastembed is not longer used

* build: attempt to build PyTorch on Python 3.13

* feat: upgrade fastavro, pyarrow and lancedb

* build: ensure tiktoken greather than 0.8.0 due Python 3.13 compatibility
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.

[BUG] Unable to pip install crewai due to ERROR: Failed to build installable wheels for some pyproject.toml based projects (tiktoken)
3 participants