Support python 3.12
- typing: remove types-pkg-resources package
- fix: recursive_guard is a KW_ONLY arg in 3.12.4+
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
4e656d9) to head (cabee1f). Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #1395 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 207 207
Lines 14942 14942
=========================================
Hits 14942 14942
| Files with missing lines | Coverage Δ | |
|---|---|---|
| ormar/fields/foreign_key.py | 100.00% <ø> (ø) |
CodSpeed Performance Report
Merging #1395 will degrade performances by 23.78%
Comparing ChristopherMacGown:support/python3.12 (cabee1f) with master (4e656d9)
Summary
⚡ 2 improvements
❌ 1 (👁 1) regressions
✅ 81 untouched benchmarks
Benchmarks breakdown
| Benchmark | master |
ChristopherMacGown:support/python3.12 |
Change | |
|---|---|---|---|---|
| 👁 | test_first[250] |
2.7 ms | 3.5 ms | -23.78% |
| ⚡ | test_get_or_none[250] |
3.6 ms | 2.8 ms | +29% |
| ⚡ | test_values_list[250] |
8 ms | 7.1 ms | +12.02% |
Please also add 3.12 to the test matrix in https://github.com/collerek/ormar/blob/1cd9204665767e05b480fc3fbfd9d820a340772b/.github/workflows/test-package.yml#L20
Regarding the failed test, distutils was deprecated in Python 3.10 and removed in Python 3.12. The test job pins poetry to 1.4.2, but the first version of poetry that supports 3.12 is 1.7.0. I would bump the poetry version in the PR, but I noticed that the version is pinned to different versions in different workflows and that don't want to bump them all without a discussion.
Regarding the failed test,
distutilswas deprecated in Python 3.10 and removed in Python 3.12. The test job pins poetry to 1.4.2, but the first version of poetry that supports 3.12 is 1.7.0. I would bump the poetry version in the PR, but I noticed that the version is pinned to different versions in different workflows and that don't want to bump them all without a discussion.
I guess we can bump it and unify the version, note that you will have to relock the file with new version probably.
I added Python 3.13 to the test matrix to try and get coverage there but it looks like there aren't ~~ryu wheels for it yet~~. The uvloop dependency was broken on python 3.13 until version 0.21.0 I'll push up a commit removing it soon
The CodeFactor report is about a vulnerability in multipart/form-data in starlette versions prior to 0.40.0. In order to clear that report and update starlette, the fastapi pin will need to be relaxed to allow 0.115.3 to be installed, currently it is pinned to versions below 0.112.0.