Skip to content
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

Migration to Python 3.13 #777

Closed
tarsil opened this issue Nov 29, 2024 · 5 comments
Closed

Migration to Python 3.13 #777

tarsil opened this issue Nov 29, 2024 · 5 comments

Comments

@tarsil
Copy link

tarsil commented Nov 29, 2024

Question

@jcrist I know you are busy and thank you for everything you have done so far for all of us.

As you know, we have a lot of software depending on msgspec and we can't release until this is moved as well. WHa do you say to release the current 3.13 and later on you can release a new one for support of threading? This would unblock literally hundreds of people.

@ncoghlan
Copy link

ncoghlan commented Dec 9, 2024

Just noting for readers that haven't seen the previous threads that #711 is the relevant merged-but-not-released PR.

It can currently be obtained via a VCS install:

pip install git+https://github.com/jcrist/msgspec.git@main

msgspec correctly reports this style of installation by appending a local version to the version specifier:

$ pip install --user git+https://github.com/jcrist/msgspec.git@main
Collecting git+https://github.com/jcrist/msgspec.git@main
  ... snip build details ...
Successfully built msgspec
Installing collected packages: msgspec
Successfully installed msgspec-0.18.6+30.g595c33c
$ python3 -c "import msgspec; print(msgspec.__version__)"
0.18.6+30.g595c33c
$ python3 -c "from importlib.metadata import version; print(version('msgspec'))"
0.18.6+30.g595c33c

It's also possible to install from the exported source archive if hashable dependencies are required, but the versioning information is lost in that case (since the VCS metadata is missing from the source code export):

$ pip install --user "msgspec @ https://github.com/jcrist/msgspec/archive/595c33c4a71c6d0c539b82233982a65819e240cf.zip"
Collecting msgspec@ https://github.com/jcrist/msgspec/archive/595c33c4a71c6d0c539b82233982a65819e240cf.zip
  ... snip build details ...
Successfully built msgspec
Installing collected packages: msgspec
Successfully installed msgspec-0+unknown
$ python3 -c "import msgspec; print(msgspec.__version__)"
0+unknown
$ python3 -c "from importlib.metadata import version; print(version('msgspec'))"
0+unknown

@edgarrmondragon
Copy link
Contributor

edgarrmondragon commented Dec 10, 2024

I'd suggest this be closed as duplicate in favor of #764

@ncoghlan
Copy link

As another interim workaround option, https://github.com/ncoghlan/msgspec/commits/py313-prerelease-tarball/ has a hardcoded release version that can be built from a GitHub source tarball:

$ pip install --user "msgspec @ https://github.com/ncoghlan/msgspec/archive/a3bf004a48ac372394efa7378a1bc36d15dcf78d.zip"
Collecting msgspec@ https://github.com/ncoghlan/msgspec/archive/a3bf004a48ac372394efa7378a1bc36d15dcf78d.zip
    ... snip build details ...
Successfully built msgspec
Installing collected packages: msgspec
Successfully installed msgspec-0.18.7.dev1+ncoghlan.py313.prerelease
$ python3 -c "import msgspec; print(msgspec.__version__)"
0.18.7.dev1+ncoghlan-py313-prerelease
$ python3 -c "from importlib.metadata import version; print(version('msgspec'))"
0.18.7.dev1+ncoghlan.py313.prerelease

Diff at https://github.com/jcrist/msgspec/compare/main...ncoghlan:msgspec:py313-prerelease-tarball?expand=1 shows the only changes are to drop versioneer in favour of a hardcoded interim pre-release version number.

Let me know if there's anything I can do to help with the actual release (branches that need trying out, etc), but if there isn't, then I'll just offer my general thanks for the library and stick with the workaround until the full release is available.

@cofin
Copy link
Contributor

cofin commented Dec 21, 2024

FWIW, I've published a temporary build for testing with Litestar. It's designed to be a drop in replacement for when the final official Msgspec release is available.

You should be able to run pip install litestar-msgspec on any Python between 3.9 and 3.13. Here's the source in case anyone wants to inspect the build logs.

@jcrist
Copy link
Owner

jcrist commented Dec 27, 2024

msgspec 0.19.0 has been released with support for Python 3.13. The full changelog may be found here.

Thank you everyone for your patience. Closing.

@jcrist jcrist closed this as completed Dec 27, 2024
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

No branches or pull requests

5 participants