Skip to content

Commit e37e54c

Browse files
authored
Upgrade to Python 3.12.7 (pyodide#5149)
1 parent 1b20dd7 commit e37e54c

File tree

11 files changed

+81
-32
lines changed

11 files changed

+81
-32
lines changed

.circleci/config.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ defaults: &defaults
66
# Note: when updating the docker image version,
77
# make sure there are no extra old versions lying around.
88
# (e.g. `rg -F --hidden <old_tag>`)
9-
- image: pyodide/pyodide-env:20241028-chrome130-firefox131
9+
- image: pyodide/pyodide-env:20241106-chrome130-firefox132
1010
environment:
1111
- EMSDK_NUM_CORES: 3
1212
EMCC_CORES: 3
@@ -339,7 +339,8 @@ jobs:
339339
command: |
340340
make npm-link
341341
pip install -r requirements.txt
342-
pytest -s benchmark/stack_usage.py --rt node,chrome,firefox | sed -n 's/## //pg'
342+
# TODO(cclauss): Re-add 'firefox' below.
343+
pytest -s benchmark/stack_usage.py --rt node,chrome | sed -n 's/## //pg'
343344
344345
test-js:
345346
<<: *defaults

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Docker",
33
// keep in sync with "run_docker"
4-
"image": "pyodide/pyodide-env:20241028-chrome130-firefox131",
4+
"image": "pyodide/pyodide-env:20241106-chrome130-firefox132",
55
"remoteUser": "root",
66
"onCreateCommand": ".devcontainer/onCreate-docker.sh"
77
}

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM node:20.11-bookworm-slim AS node-image
2-
FROM python:3.12.1-slim-bookworm
2+
FROM python:3.12.7-slim-bookworm
33

44
# Requirements for building packages
55
RUN apt-get update \
@@ -104,7 +104,7 @@ RUN if [ $CHROME_VERSION = "latest" ]; \
104104
then CHROME_VERSION_FULL=$(wget --no-verbose -O - "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE"); \
105105
else CHROME_VERSION_FULL=$(wget --no-verbose -O - "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_VERSION}"); \
106106
fi \
107-
&& CHROME_DOWNLOAD_URL="https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION_FULL}-1_amd64.deb" \
107+
&& CHROME_DOWNLOAD_URL="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb." \
108108
&& CHROMEDRIVER_DOWNLOAD_URL="https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION_FULL}/linux64/chromedriver-linux64.zip" \
109109
&& wget --no-verbose -O /tmp/google-chrome.deb ${CHROME_DOWNLOAD_URL} \
110110
&& apt-get update \

Makefile.envs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
export PYVERSION ?= 3.12.1
1+
export PYVERSION ?= 3.12.7
22
export PYODIDE_EMSCRIPTEN_VERSION ?= 3.1.58
33
export PYODIDE_VERSION ?= 0.27.0.dev0
44
export PYODIDE_ABI_VERSION ?= 2024_0
55

6-
export PYTHON_ARCHIVE_SHA256=d01ec6a33bc10009b09c17da95cc2759af5a580a7316b3a446eb4190e13f97b2
6+
export PYTHON_ARCHIVE_SHA256=73ac8fe780227bf371add8373c3079f42a0dc62deff8d612cd15a618082ab623
77

88
ifdef CPYTHON_DEBUG
99
export CPYTHON_ABI_FLAGS=d

docs/project/changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ myst:
1616

1717
## Unreleased
1818

19+
- {{ Enhancement }} Upgrade to Python 3.12.7.
20+
{pr}`5149`
21+
1922
- {{ Enhancement }} Add unix-timezones module, which installs Unix compatible
2023
timezone data in /usr/share/zoneinfo, for use with C/C++ libraries which do
2124
timezone handling.

docs/requirements-doc.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ pyodide-build>=0.27.3
2222
micropip==0.2.2
2323
jinja2>=3.0
2424
ruamel.yaml
25-
sphinx-js @ git+https://github.com/pyodide/sphinx-js-fork@14958086d51939ae4078751abec004e1f3fea1fe
25+
sphinx-js @ git+https://github.com/pyodide/sphinx-js-fork@1428f1547b510a1574c227ced4356ba546a21f74

packages/pygame-ce/meta.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ build:
3131
-sUSE_LIBPNG=1
3232
-sUSE_GIFLIB=1
3333
-sUSE_HARFBUZZ=1
34+
-Wno-unreachable-code-fallthrough
3435
ldflags: |
3536
-sRELOCATABLE=1
3637
-sUSE_SDL=2

packages/test/meta.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ build:
5151
_testcapi/code.c \
5252
_testcapi/buffer.c \
5353
_testcapi/pyos.c \
54+
_testcapi/run.c \
5455
_testcapi/file.c \
5556
_testcapi/codec.c \
5657
_testcapi/immortal.c \

src/core/jsproxy.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1698,7 +1698,7 @@ JsArray_ass_subscript(PyObject* self, PyObject* item, PyObject* pyvalue)
16981698
slicelength = PySlice_AdjustIndices(length, &start, &stop, step);
16991699

17001700
if (pyvalue != NULL) {
1701-
seq = PySequence_Fast(pyvalue, "can only assign an iterable");
1701+
seq = PySequence_Fast(pyvalue, "must assign iterable to extended slice");
17021702
FAIL_IF_NULL(seq);
17031703
}
17041704
if (pyvalue != NULL && step != 1 &&

src/tests/python_tests.yaml

+58-21
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@
5757
xfail: slow, sometimes times out
5858
- test_array
5959
- test_asdl_parser
60-
- test_ast:
61-
xfail-safari: Stack overflow
60+
- test_ast.test_ast:
6261
skip:
63-
- test_stdlib_validates # incompatible with zipimport
62+
- "*_recursion_*"
6463
- test_asyncgen:
6564
xfail: async
6665
- test_asyncio.test_base_events:
@@ -97,6 +96,7 @@
9796
xfail: async
9897
- test_asyncio.test_ssl
9998
- test_asyncio.test_sslproto
99+
- test_asyncio.test_staggered
100100
- test_asyncio.test_streams:
101101
xfail: async
102102
- test_asyncio.test_subprocess:
@@ -179,17 +179,22 @@
179179
- test_capi.test_misc:
180180
skip:
181181
- "*subinterpreter*" # Should we disable _xxsubinterpreters in Setup.local?
182+
- test_capi.test_number
183+
- test_capi.test_run
182184
- test_capi.test_set
183185
- test_capi.test_structmembers
184186
- test_capi.test_sys
187+
- test_capi.test_tuple
185188
- test_capi.test_unicode
186189
- test_capi.test_watchers
187190
- test_cgi:
188191
skip:
189192
- test_log # OSError: [Errno 70] Invalid seek
190193
- test_cgitb
191194
- test_charmapcodec
192-
- test_class
195+
- test_class:
196+
skip:
197+
- testSFBug532646 # Maximum call stack size exceeded
193198
- test_clinic
194199
- test_cmath
195200
- test_cmd
@@ -216,7 +221,10 @@
216221
- test_collections
217222
- test_colorsys
218223
- test_compare
219-
- test_compile
224+
- test_compile:
225+
skip:
226+
- test_compiler_recursion_limit
227+
- test_extended_arg
220228
- test_compileall:
221229
xfail: multiprocessing
222230
- test_compiler_assemble
@@ -238,7 +246,11 @@
238246
- test_contextlib
239247
- test_contextlib_async:
240248
xfail: async
241-
- test_copy
249+
- test_copy:
250+
skip:
251+
- test_deepcopy_reflexive_dict
252+
- test_deepcopy_reflexive_list
253+
- test_deepcopy_reflexive_tuple
242254
- test_copyreg:
243255
xfail: dbm
244256
- test_coroutines:
@@ -250,7 +262,9 @@
250262
- test_ctypes.test_anon
251263
- test_ctypes.test_array_in_pointer
252264
- test_ctypes.test_arrays
253-
- test_ctypes.test_as_parameter
265+
- test_ctypes.test_as_parameter:
266+
skip:
267+
- test_recursive_as_param
254268
- test_ctypes.test_bitfields
255269
- test_ctypes.test_buffers
256270
- test_ctypes.test_bytes
@@ -293,7 +307,9 @@
293307
- test_ctypes.test_struct_fields
294308
- test_ctypes.test_structures:
295309
skip:
310+
- test_array_in_struct
296311
- test_array_in_struct_registers # needs https://github.com/libffi/libffi/pull/818
312+
- test_issue18060*
297313
- test_ctypes.test_unaligned_structures
298314
- test_ctypes.test_unicode
299315
- test_ctypes.test_values
@@ -320,16 +336,19 @@
320336
xfail: stack overflow
321337
- test_descrtut
322338
- test_devpoll
323-
- test_dict
339+
- test_dict:
340+
skip:
341+
- test_repr_deep
324342
- test_dict_version
325343
- test_dictcomps
326-
- test_dictviews
344+
- test_dictviews:
345+
skip:
346+
- test_deeply_nested_repr
327347
- test_difflib
328348
- test_dis:
329349
xfail-safari: safaridriver unexpectedly exited
330-
- test_doctest:
331-
xfail: subprocess
332-
- test_doctest2
350+
- test_doctest.test_doctest
351+
- test_doctest.test_doctest2
333352
- test_docxmlrpc:
334353
xfail: socket
335354
- test_dtrace:
@@ -367,7 +386,10 @@
367386
- test_epoll
368387
- test_errno
369388
- test_except_star
370-
- test_exception_group
389+
- test_exception_group:
390+
skip:
391+
- test_deep_split
392+
- test_deep_subgroup
371393
- test_exception_hierarchy
372394
- test_exception_variations
373395
- test_exceptions:
@@ -403,13 +425,15 @@
403425
skip:
404426
# frozen modules are disabled in runtime
405427
- test_unfrozen_submodule_in_frozen_package
406-
- test_fstring
428+
- test_fstring:
429+
xfail-chrome: times out on Python 3.12.7
407430
- test_ftplib:
408431
xfail: socket
409432
- test_funcattrs
410433
- test_functools:
411434
skip:
412435
- "*threaded*"
436+
- test_recursive_pickle
413437
- test_future_stmt.test_future
414438
- test_future_stmt.test_future_flags
415439
- test_future_stmt.test_future_multiple_features
@@ -540,7 +564,10 @@
540564
# The remaining test_io tests seem to hang too
541565
- test_ioctl
542566
- test_ipaddress
543-
- test_isinstance
567+
- test_isinstance:
568+
skip:
569+
- "*recursion*"
570+
- "*infinite*"
544571
- test_iter
545572
- test_iterlen
546573
- test_itertools
@@ -555,7 +582,8 @@
555582
- test_json.test_pass1
556583
- test_json.test_pass2
557584
- test_json.test_pass3
558-
- test_json.test_recursion
585+
- test_json.test_recursion:
586+
xfail: Stack overflow
559587
- test_json.test_scanstring
560588
- test_json.test_separators
561589
- test_json.test_speedups
@@ -588,7 +616,9 @@
588616
- test_clearcache
589617
- test_getline
590618
- test_memoryerror
591-
- test_list
619+
- test_list:
620+
skip:
621+
- test_repr_deep
592622
- test_listcomps
593623
- test_lltrace
594624
- test_locale:
@@ -727,8 +757,8 @@
727757
skip:
728758
- test_stdin # fork
729759
- test_pyclbr
730-
- test_pydoc:
731-
xfail: pydoc_data unvendored
760+
- test_pydoc.test_pydoc:
761+
xfail: Missing doc data
732762
- test_pyexpat
733763
- test_queue:
734764
# More than half of these make a thread
@@ -873,6 +903,8 @@
873903
- test_sly_relative*
874904
- test_extractall*
875905
- test_parent_symlink*
906+
- test_overwrite_broken_file_symlink_as_file
907+
- test_overwrite_file_as_implicit_dir
876908
- test_tcl
877909
- test_telnetlib:
878910
xfail: 7/19 fail with sockets
@@ -923,6 +955,7 @@
923955
- test_tomllib.test_misc
924956
- test_tools.test_freeze
925957
- test_tools.test_i18n
958+
- test_tools.test_makefile
926959
- test_tools.test_reindent
927960
- test_tools.test_sundry
928961
- test_trace:
@@ -974,6 +1007,7 @@
9741007
- test_unittest.test_setups
9751008
- test_unittest.test_skipping
9761009
- test_unittest.test_suite
1010+
- test_unittest.test_util
9771011
- test_univnewlines
9781012
- test_unpack
9791013
- test_unpack_ex
@@ -989,8 +1023,10 @@
9891023
- test_urllib_response
9901024
- test_urllibnet
9911025
- test_urlparse
992-
- test_userdict
993-
- test_userlist
1026+
- test_userdict:
1027+
xfail: Stack overflow
1028+
- test_userlist:
1029+
xfail: Stack overflow
9941030
- test_userstring
9951031
- test_utf8_mode
9961032
- test_utf8source
@@ -1010,6 +1046,7 @@
10101046
- test_weakset
10111047
- test_webbrowser:
10121048
xfail: replaced
1049+
- test_winapi
10131050
- test_winconsoleio
10141051
- test_winreg
10151052
- test_winsound

src/tests/test_pyodide.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,10 @@ def f4(a, /, *args, b=7):
280280
return [a, args, b]
281281

282282
with pytest.raises(
283-
TypeError, match="'a' parameter is positional only, but was passed as a keyword"
283+
TypeError,
284+
match=re.escape(
285+
"test_relaxed_call.<locals>.f4() missing 1 required positional argument: 'a'"
286+
),
284287
):
285288
relaxed_call(f4, a=2, b=7)
286289

@@ -342,7 +345,10 @@ def f4(a, /, *args, b=7):
342345
return [a, args, b]
343346

344347
with pytest.raises(
345-
TypeError, match="'a' parameter is positional only, but was passed as a keyword"
348+
TypeError,
349+
match=re.escape(
350+
"test_relaxed_wrap.<locals>.f4() missing 1 required positional argument: 'a'"
351+
),
346352
):
347353
f4(a=2, b=7)
348354

0 commit comments

Comments
 (0)