Upgrade to Python v3.11.3 (#3741)

This commit is contained in:
Christian Clauss 2023-04-12 17:38:05 +02:00 committed by GitHub
parent 7193109f4d
commit b2201c19b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 16 deletions

View File

@ -6,7 +6,7 @@ defaults: &defaults
# Note: when updating the docker image version,
# make sure there are no extra old versions lying around.
# (e.g. `rg -F --hidden <old_tag>`)
- image: pyodide/pyodide-env:20230301-chrome109-firefox109-py311
- image: pyodide/pyodide-env:20230411-chrome112-firefox112-py311
environment:
- EMSDK_NUM_CORES: 3
EMCC_CORES: 3

View File

@ -10,7 +10,7 @@ github:
tasks:
- name: Setup the environment
init: |
PYTHON_VERSION=3.11.2
PYTHON_VERSION=3.11.3
pyenv install $PYTHON_VERSION
pyenv global $PYTHON_VERSION
python -m pip install -r requirements.txt

View File

@ -1,5 +1,5 @@
FROM node:14.16.1-buster-slim AS node-image
FROM python:3.11.2-slim-buster
FROM python:3.11.3-slim-buster
# Requirements for building packages
RUN apt-get update \

View File

@ -1,4 +1,4 @@
export PYVERSION ?= 3.11.2
export PYVERSION ?= 3.11.3
export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.32
export PLATFORM_TRIPLET=wasm32-emscripten

View File

@ -1 +1 @@
2411c74bda5bbcfcddaf4531f66d1adc73f247f529aee981b029513aefdbf849 downloads/Python-3.11.2.tgz
1a79f3df32265d9e6625f1a0b31c28eb1594df911403d11f3320ee1da1b3e048 downloads/Python-3.11.3.tgz

View File

@ -111,17 +111,32 @@ Cherry pick the corresponding documentation commits to the `stable` branch. Use
### Upgrading pyodide to a new version of CPython
Prerequisites -- The desired version of CPython must be available at:
1. The `specific release` section of https://www.python.org/downloads
2. https://hub.docker.com/_/python
3. https://github.com/actions/python-versions/releases
For example: `v3.11.1` -> `v3.11.2`
1. Download the **Gzipped source tarball** at https://www.python.org/downloads/release/python-3112 into `downloads/`
2. `shasum -a 256 downloads/Python-3.11.2.tgz > cpython/checksums`
3. `git grep --name-only "3.11.1" ` # All these files will need to be updated.
4. After updating the Python version in `Dockerfile`, create a new Docker image.
- A maintainer must click `Run workflow` on https://github.com/pyodide/pyodide/actions/workflows/docker_image.yml
5. That workflow will build and upload a new Docker image to https://hub.docker.com/r/pyodide/pyodide-env/tags
6. Modify the image name in `.circleci/config.yml` to match the image tag on Docker Hub.
A project maintainer must create a up-to-date Docker image:
1. In upstream (not a fork) change the Python version at the top of `Dockerfile` to the new version.
2. Click `Run workflow` on https://github.com/pyodide/pyodide/actions/workflows/docker_image.yml
- This will build and upload a new Docker image to https://hub.docker.com/r/pyodide/pyodide-env/tags
3. Re-tag that image with the correct browser and Python versions: `20230301-chrome109-firefox109-py311`
4. Open a new issue for a interested contributor to execute the following tasks...
Any contributor can complete the Python upgrade:
1. Ensure that the new Docker image has been tagged at https://hub.docker.com/r/pyodide/pyodide-env/tags
2. Download the **Gzipped source tarball** at https://www.python.org/downloads/release/python-3112 into `downloads/`
3. `shasum -a 256 downloads/Python-3.11.2.tgz > cpython/checksums`
- Ensure the path in `cpython/checksums` starts with `downloads/Python-`
4. `git grep --name-only "3.11.1" ` # All of these files will need to be updated.
5. In `.circleci/config.yml` modify the image name to match the image tag on Docker Hub.
- `image: pyodide/pyodide-env:20230301-chrome109-firefox109-py311`
7. Modify the `PYODIDE_IMAGE_TAG` in `run_docker` to match the image tag on Docker Hub.
6. In `run_docker` modify the `PYODIDE_IMAGE_TAG` to match the image tag on Docker Hub.
- `PYODIDE_IMAGE_TAG="20230301-chrome109-firefox109-py311"`
8. Rebase any patches which do not apply cleanly.
9. Create a pull request and fix any failing tests. This may be complicated for major releases of CPython.
7. Rebase any patches which do not apply cleanly.
8. Create a pull request and fix any failing tests. This may be complicated for non-micro releases of CPython.

View File

@ -15,6 +15,9 @@ myst:
## Unreleased
- {{ Update }} Pyodide now runs Python 3.11.3.
{pr}`3741`
- {{ Enhancement }} The promise methods `then`, `catch` and `finally_` are now
present also on `Task`s as well as `Future`s.
{pr}`3748`

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
PYODIDE_IMAGE_REPO="pyodide"
PYODIDE_IMAGE_TAG="20230301-chrome109-firefox109-py311"
PYODIDE_IMAGE_TAG="20230411-chrome112-firefox112-py311"
DEFAULT_PYODIDE_DOCKER_IMAGE="${PYODIDE_IMAGE_REPO}/pyodide-env:${PYODIDE_IMAGE_TAG}"
DEFAULT_PYODIDE_SYSTEM_PORT="none"
DOCKER_COMMAND="/bin/bash"