Build Python 3.13 wheels (not free-threaded)#711
Build Python 3.13 wheels (not free-threaded)#711jcrist merged 15 commits intojcrist:mainfrom edgarrmondragon:py313
Conversation
edgarrmondragon
left a comment
There was a problem hiding this comment.
I think this is ready for an initial review.
Mostly followed advice from
msgspec/_utils.py
Outdated
| value = type(None) | ||
| elif isinstance(value, str): | ||
| value = _forward_ref(value) | ||
| # TODO: Pass `type_params` to `_eval_type` to fix deprecation warning |
There was a problem hiding this comment.
This missing parameter is causing a ton of warnings like this:
msgspec/_utils.py:130: DeprecationWarning: Failing to pass a value to the 'type_params' parameter of 'typing._eval_type' is deprecated, as it leads to incorrect behaviour when calling typing._eval_type on a stringified annotation that references a PEP 695 type parameter. It will be disallowed in Python 3.15.
FWIW I think this is hiding an actual error: in Lines 790 to 793 in 2c37da0 |
|
macos-11 runners aren't available anymore, so I updated it to macos-14 in 748f4bb. |
With that change, the wheels are finally built instead of the workflow getting stuck forever: https://github.com/edgarrmondragon/msgspec/actions/runs/10030128227/job/27719084757 |
|
I can also get msgspec to build with py313 with this branch, but not the branch in #703 |
|
@jcrist This is ready for review at your convenience :) |
|
Updated to use Python 3.13.0rc1 |
|
Updated to use Python 3.13.0rc2 |
|
@jcrist Can you please run the CI? |
|
Python 3.13 release is scheduled for then upcoming Monday. Are there any plans to merge this PR and publish a new version? |
|
Python 3.13 is out there. |
|
I was building on debian 13 trixie which uses GCC 14, I therefore had a few more required adjustments on top of yours: To build this locally, I used conda: |
|
I do get a segfault though when importing msgspec.. Even with GIL enabled |
@maurerle thanks for finding that. I'll give a read to https://py-free-threading.github.io/porting/, unless someone beats me to it and knows what's wrong here. |
|
When executing this on a gil build (e.g. So make sure to execute this not in the build directory :) The segfault also occurs when starting the above mentioned freethreading build with an active GIL as in |
Keeps around the semantic meaning for when this function is added back in Python 3.14.
|
Thanks for the PR (and everyone for their patience). With a new kid and recent layoff, I've been a bit busy and msgspec maintenance has languished. I really appreciate the help and patience here. I have a few small fixups I want to land with this release, but I'd expect a release supporting Python 3.13 (not with freethreading) out in the next day or two. I'll work on adding freethreading support after getting that initial release out. |
|
You are missing the python3-dev dependency. |
|
It was merged but not released or am I mistaken? An install from main should work for sure: install from vcs |
|
thank you. I wait for the release. Do you know when it is planned? |
|
No, but soon I guess. |
|
@jcrist Is there anything the community can do to help to get a release out? There is probably some collective spare hacking time available during the break now. Let us know if you need help testing or writing release notes, etc. |

I can close this if #703 gets more attention, but I've confirmed changes here allow the wheels to be built in 3.8-3.13, and all tests are passing.
This warning is currently raised, but fixing it might be beyond the scope of this PR:
python/cpython#106004