Skip to content

Add Python 3.13 support #9566

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 2 commits into from
Jun 26, 2025

Conversation

mahdirahimi1999
Copy link
Contributor

@mahdirahimi1999 mahdirahimi1999 commented Jun 21, 2025

Add Python 3.13 Support

This PR adds official support for Python 3.13 to the AWS CLI, ensuring compatibility with the latest Python release.

Changes Made

Package Configuration

  • setup.py: Added 'Programming Language :: Python :: 3.13' classifier
  • pyproject.toml: Updated target-version from "py38" to "py39" to align with minimum Python requirement

CI/CD Pipeline Updates

  • run-tests.yml: Added Python 3.13 to test matrix
  • run-dep-tests.yml: Added Python 3.13 to dependency test matrix
  • run-bundle-test.yml: Added Python 3.13 to bundle test matrix

Local Development

  • tox.ini: Added py313 environment for local testing

Documentation

  • CONTRIBUTING.md: Updated Python version requirement from python3.7 to python3.9

Bug Fixes

  • test_artifact_exporter.py: Fixed Windows path handling issue that caused test failures on Python 3.13
    • Replaced os.path.sep with os.path.abspath(os.path.sep) to ensure proper absolute paths
    • Fixes 5 test methods that were failing on Windows with Python 3.13

Verification Completed

Before implementing these changes, we verified:

  • Dependency Compatibility: All core dependencies (botocore, s3transfer, PyYAML, etc.) support Python 3.13
  • Code Compatibility: No deprecated features or syntax issues found
  • Test Suite: All 2,734 unit tests pass successfully
  • CI Infrastructure: Python 3.13 is available in GitHub Actions

Impact

  • Backward Compatible: No breaking changes
  • Enhanced Coverage: AWS CLI now supports Python 3.9 through 3.13
  • Future Ready: Ready for Python 3.13 adoption by users
  • CI Assurance: Automated testing ensures ongoing compatibility
  • Cross-Platform: Fixed Windows-specific path handling issues

Test Results

  • Unit Tests: 2,734 passed
  • Syntax Check: All Python files compile successfully
  • Import Test: AWS CLI imports without issues
  • Windows Compatibility: Fixed path handling issues for Python 3.13

Note: This change is purely additive and maintains full backward compatibility with existing Python 3.9+ installations. The Windows path fix ensures proper cross-platform compatibility with Python 3.13.

- Add Python 3.13 classifier to setup.py
- Update CI workflows to test Python 3.13
- Add py313 environment to tox.ini
- Update CONTRIBUTING.md Python version requirement
- Update pyproject.toml target-version to py39
- Replace os.path.sep with os.path.abspath(os.path.sep) to ensure proper absolute paths
- Fixes Python 3.13 compatibility issue on Windows where \ is not a valid absolute path
- Affects 5 test methods that were failing on Windows with Python 3.13
@mahdirahimi1999
Copy link
Contributor Author

Could you please check this PR?
@hssyoo
@AndrewAsseily

@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.40%. Comparing base (68039fa) to head (570f626).
Report is 76 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #9566   +/-   ##
========================================
  Coverage    93.40%   93.40%           
========================================
  Files          211      211           
  Lines        17012    17020    +8     
========================================
+ Hits         15890    15898    +8     
  Misses        1122     1122           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@hssyoo hssyoo left a comment

Choose a reason for hiding this comment

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

@hssyoo hssyoo merged commit c33351d into aws:develop Jun 26, 2025
40 checks passed
aws-sdk-python-automation added a commit that referenced this pull request Jun 26, 2025
* release-1.40.44:
  Bumping version to 1.40.44
  Update changelog based on model updates
  Merge customizations for KMS
  Add Python 3.13 to test matrix (#9566)
@mahdirahimi1999 mahdirahimi1999 deleted the feature/python-3.13-support branch June 27, 2025 14:21
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.

3 participants