-
-
Notifications
You must be signed in to change notification settings - Fork 847
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
Update to Python 3.11 #3051
Comments
@hoodmane I think you had a branch with it a few months ago? (I can't find that discussion) |
What's the planned release date of 0.22? Python 3.11.0 final is scheduled for Oct 3, little more than a month from now. |
Probably around 3 months from now, so after the final Python 3.11.0 release. |
I was thinking about maybe doing another short release for Though I would be fine with keeping it as an alpha release and using the alpha in CI. IMO the command line runner is such a large improvement for testing that I'm reluctant to try adding Pyodide to more package CI before getting it finished. I don't have a super strong opinion about early update to Python 3.11. Personally I like always having the newest versions of everything but there are reasons we normally don't do that... I lean in favor of this suggestion though. |
I did have a couple of Python 3.11 branches, I can revive them. For core Python it should be pretty simple. Dunno if the packages will work. |
I'm +1 with having Python 3.11 early as it has many performance benefits and WASM works thanks to Christian. |
Definitely +1 for an alpha release there. For a final release with it very soon, I don't know maybe keeping it as an alpha a bit longer wouldn't hurt either so we can play with the CLI API (and use it in projects tests e.g. numpy) more before freezing it. As once it's released it would be harder to change. |
Sounds good to me. |
would love to see an alpha of pyodide with cpython-3.11 tomorrow, so we can see if it brings speed-up in pyodide too. |
Here's the 3.11 wheel status: Not found (probably not packages):
Found only 3.10 wheels:
Found 3.11 wheels:
Script & nox entry:@nox.session(reuse_venv=True, python="3.11")
def pyupgrade_readiness(session: nox.Session) -> None:
session.install("pyyaml", "ruamel.yaml", "pypi-command-line", "typer<0.6")
session.run("python", "tools/check_pyverwheel.py") And the script itself: from pathlib import Path
import asyncio
import shutil
import sys
packages = [str(p.parent.name) for p in Path("packages").glob("*/meta.yaml")]
async def check_pkg(package: str) -> dict[str, bool]:
proc = await asyncio.subprocess.create_subprocess_exec(
"pypi", "wheels", package, stdout=asyncio.subprocess.PIPE
)
stdout = await proc.stdout.read()
res = stdout.decode()
return {
"found": "Package Type:" in res,
"universal": "none-any.whl" in res,
"py310": "cp310" in res,
"py311": "cp311" in res,
}
async def run_all(packages: list[str]) -> list[str]:
async with asyncio.TaskGroup() as g:
tasks = [g.create_task(check_pkg(p)) for p in packages]
return [t.result() for t in tasks]
packages_out = asyncio.run(run_all(packages))
ans = dict(sorted(zip(packages, packages_out)))
for name, pkg in ans.items():
match pkg:
case {"found": False}:
print(name, "not found")
for name, pkg in ans.items():
match pkg:
case {"found": True, "py310": True, "py311": False}:
print(name, "only has Python 3.10 wheels")
for name, pkg in ans.items():
match pkg:
case {"found": True, "py310": True, "py311": True}:
print(name, "is ready!") |
Now that Pyodide 0.22.0 has been released, what's the chance that work will resume on updating to Python 3.11? Are there anymore wheels missing 3.11 support that this is blocking on? |
I think it's being worked on right now in #3252... |
Freesasa and wordcloud have fixed Python 3.11 support but haven't made a release with the fix yet. This isn't a problem, I think we can go ahead and disable them, we can reenable when they make a release supporting Python 3.11. We could consider doing a short Pyodide 0.23 release which is mostly just the update to Python 3.11. Not sure what @ryanking13 and @rth think. |
+1 as well. Though ideally I would like to also include some of the pyc compilation PRs (disabled by default) and figure out whether we could deploy both versions. At least for package wheels that's easy, and it's going to have a larger impact on load time than the 3.10->3.11 update I guess. |
Ideally I think it ought to be a setting for |
+1 for it. I'll open a issue to listup things we want to include in the alpha release. |
Closed by #3252. |
The question is whether we update to Python 3.11 in the next release (0.22) or wait for one extra release for the packages we ship to get a compatible release. Anyway, this was already discussed, just opening a dedicated issue about it.
I think it's worth trying for this release if there are no major issues with packages. That would allow shorter iteration with work @tiran is doing upstream in CPython.
This way we could also maintain Python/Emscripten in sync update policy already starting from this release.
xref: pyscript/pyscript#610
The text was updated successfully, but these errors were encountered: