Skip to content

Added compatibility with Python 3.13 v2 (with poetry 2.x)#649

Merged
enricostragiotti merged 12 commits intomasterfrom
python-313
Nov 18, 2025
Merged

Added compatibility with Python 3.13 v2 (with poetry 2.x)#649
enricostragiotti merged 12 commits intomasterfrom
python-313

Conversation

@enricostragiotti
Copy link
Copy Markdown
Contributor

@enricostragiotti enricostragiotti commented Aug 19, 2025

Summary

This PR brings compatibility with Python 3.13.
This PR supersede #575

Main changes

  • Updated pyproject.toml
  • Added Python 3.13 to the matrix for unit and integration tests
  • Set Python 3.13 as the default version for Watchman tests
  • Regenerated the Poetry lock file
  • Rewrote the __eq__ method for the InputDefinition class
    (as already done by Christophe in #575)
  • Reworked the integration test for memory leaks:
    • Instead of comparing only the final memory value, the test now checks:
      • The increased use between successive fastoad calls
      • The average increase per call
    • This change was required because Python 3.13 introduced modifications in the garbage collector, which caused the previous version of the test to fail.
    • Initially, I tested with 10 calls (run link), all successful.
      For production, the number of calls was reduced to 2 to keep CI time reasonable.

New memory leak thresholds (MiB)

MEMORY_DIFF_THRESHOLD = 20.0
MEMORY_DIFF_THRESHOLD_AVG = 10.0
FINAL_MEMORY_THRESHOLD = 20.0

@enricostragiotti enricostragiotti force-pushed the python-313 branch 8 times, most recently from 36a0431 to edcd20d Compare August 26, 2025 09:20
@codecov
Copy link
Copy Markdown

codecov bot commented Aug 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.59%. Comparing base (45403df) to head (2f18736).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #649      +/-   ##
==========================================
- Coverage   91.65%   91.59%   -0.07%     
==========================================
  Files          99       99              
  Lines        6265     6267       +2     
  Branches      821      821              
==========================================
- Hits         5742     5740       -2     
- Misses        353      356       +3     
- Partials      170      171       +1     

☔ 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.

@enricostragiotti enricostragiotti force-pushed the python-313 branch 4 times, most recently from 5aed956 to 38c46e5 Compare August 26, 2025 14:05
Copy link
Copy Markdown
Contributor

@esnguyenvan esnguyenvan left a comment

Choose a reason for hiding this comment

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

Hey, thanks for this update!
I trust the test for memory leaks. I haven't gone through the detailed of it, you master it better than me.
I only see that a lot of code is commented in both workflows/test.yml and test_multiple_uns.py. Is this made on purpose?

@enricostragiotti
Copy link
Copy Markdown
Contributor Author

@esnguyenvan you are definitely right ! I forgot that sorry! If only a tool could look for that....... 😉
Ah, I saw that I commented also the github action caching mechanism. I reworked it a little because before it was not working..

@enricostragiotti
Copy link
Copy Markdown
Contributor Author

I'll wait @florentLutz on this one before merging

Copy link
Copy Markdown
Contributor

@florentLutz florentLutz left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, the memory usage test is a whole new aspect for me so I have a few questions of understanding here and there, nothing that prevents closing this PR though

@enricostragiotti enricostragiotti merged commit d0a81a9 into master Nov 18, 2025
13 checks passed
@enricostragiotti enricostragiotti deleted the python-313 branch November 18, 2025 09:26
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