Commit Graph

3449 Commits

Author SHA1 Message Date
Serhiy Storchaka f07ee41479
[3.11] gh-97728: Argument Clinic: Fix uninitialized variable in the Py_UNICODE converter (GH-97729) (GH-97757)
It affects function os.system() on Windows and Windows-specific modules
winreg, _winapi, _overlapped, and _msi.
(cherry picked from commit 0ee9619a4c)
2022-10-03 15:01:54 +03:00
Steve Dower 0fbee30f71
gh-90989: Clarify some installer text (GH-97668) 2022-09-30 13:48:19 +01:00
Miss Islington (bot) 94582bb643
gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613)
Fix a shell code injection vulnerability in the
get-remote-certificate.py example script. The script no longer uses a
shell to run "openssl" commands. Issue reported and initial fix by
Caleb Shortt.

Remove the Windows code path to send "quit" on stdin to the "openssl
s_client" command: use DEVNULL on all platforms instead.

Co-authored-by: Caleb Shortt <caleb@rgauge.com>
(cherry picked from commit 83a0f44ffd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-09-28 16:46:11 -07:00
Christian Heimes 876606fc65
[3.11] gh-96883: browser: include concurrent.futures (GH-96886) (GH-96888) 2022-09-17 16:40:24 +02:00
Miss Islington (bot) fe4f2f9a6b
gh-96729: Ensure installers built with Tools/msi/buildrelease.bat have matching UUIDs with official releases (GH-96755)
(cherry picked from commit 662782e95f)

Co-authored-by: adang1345 <adang1345@gmail.com>
2022-09-14 16:59:34 +01:00
Miss Islington (bot) 8238fa91c1
gh-84461: Omit resource mod and getresuid funcs on Emscripten (GH-96303)
(cherry picked from commit a36235d5c7)

Co-authored-by: Christian Heimes <christian@python.org>
2022-09-13 03:08:12 -07:00
Christian Heimes 4958820032
[3.11] gh-95853: Add script to automate WASM build (GH-95828, GH-95985, GH-96045, GH-96389, GH-96744) (GH-96749)
Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.

``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.
2022-09-13 12:06:39 +02:00
Miss Islington (bot) 390123b412
[3.11] gh-96320: WASI socket fixes (GH-96388) (GH-#96748)
- ignore missing functions in ``socket.__repr__``
- bundle network files with assets
2022-09-13 12:05:25 +02:00
Miss Islington (bot) 882c7cf4c7
gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683)
(cherry picked from commit 873554ef84)

Co-authored-by: Christian Heimes <christian@python.org>
2022-08-29 09:47:20 -07:00
Miss Islington (bot) 7604456f24
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build scripts. (GH-31803)
(cherry picked from commit 1288097088)

Co-authored-by: conioh <10606081+conioh@users.noreply.github.com>
2022-08-25 12:50:48 -07:00
Miss Islington (bot) a42215c7e1
gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650) (GH-95780)
(cherry picked from commit cc9160a29b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-08-10 12:55:50 +02:00
Miss Islington (bot) f5011dfaa2
gh-95587: Fixes some upgrade detection issues in the Windows installer (GH-95631)
(cherry picked from commit 5b6acbaa20)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-08-04 09:40:57 -07:00
Miss Islington (bot) 3192fd7683
gh-95445: Ensure Windows msi uninstalls document folder successfully (GH-95465)
(cherry picked from commit 7d8973870b)

Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
2022-08-01 09:07:24 -07:00
Christian Heimes e62a0dfab2
[3.11] gh-95174: Add pthread stubs for WASI (GH-95234) (#95503)
Co-authored-by: Brett Cannon <brett@python.org>.
(cherry picked from commit 0fe645d6fd)

Co-authored-by: Christian Heimes <christian@python.org>
2022-08-01 15:37:45 +01:00
Christian Heimes 06b5f78d64
[3.11] gh-95174: WASI: skip missing sockets functions (GH-95179) (GH-95308)
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-07-31 18:19:32 +02:00
Miss Islington (bot) 25086f1eed
gh-95174: Move WASIX logic into wasi-env (GH-95320)
wasi-env now sets WASIX flags. This allows us to control all build
parameter for wasm32-wasi buildbot from CPython repository.

Also export and improve SYSROOT parameter.
(cherry picked from commit 2833f3798d)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-27 07:11:00 -07:00
Miss Islington (bot) 202311c67a
[3.11] gh-95085: Promote Emscripten and WASI to PEP 11 tier 3 (GH-95086) (GH-95307)
Co-authored-by: Christian Heimes <christian@python.org>
2022-07-27 11:16:38 +02:00
Miss Islington (bot) 6284f23258
gh-95205: Improve WASM README.md (GH-95267) (GH-95270)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit e8f3e8f0ab)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-26 12:17:05 +02:00
Miss Islington (bot) df95ad3d72
gh-95205: Improve wasm README (GH-95206)
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit 310f94871a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-07-25 02:52:47 -07:00
Brandt Bucher 5a48ab01e9
[3.11] GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121) (GH-95143)
(cherry picked from commit e402b26b7f)
2022-07-22 11:56:10 -07:00
Miss Islington (bot) e98728ab4d
gh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035)
(cherry picked from commit 0f34c7e2d3)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-20 00:17:52 -07:00
Miss Islington (bot) cdd0cabf92
gh-94773: deepfreeze: support frozensets with unsortable types (GH-94775)
(cherry picked from commit 0c66074e9f)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-12 09:35:43 -07:00
Erlend Egeberg Aasland c0b7868db2
[3.11] gh-94430: Allow params named `module` or `self` with custom C names in AC (GH-94431) (#94649)
(cherry picked from commit 8bbd70b4d1)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-07 12:12:47 +02:00
Miss Islington (bot) e28446858f
gh-94538: Fix Argument Clinic output to custom file (GH-94539) (GH-94555)
(cherry picked from commit 2b8ed4d3d4)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-05 14:33:59 +02:00
Miss Islington (bot) 9fa966136f
gh-84461: Tool/wasm/python.html: Add subresource integrity hashes (GH-93953)
(cherry picked from commit 1df9449db2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2022-07-01 03:17:38 -07:00
Miss Islington (bot) ca58ca8641
gh-84461: Improve WebAssembly in-browser demo (GH-91879)
* Buffer standard input line-by-line

* Add non-root .editorconfig for JS & HTML indent

* Add support for clearing REPL with CTRL+L

* Support unicode in stdout and stderr

* Remove \r\n normalization

* Note that local .editorconfig file extends root

* Only normalize lone \r characters (convert to \n)

* Skip non-printable characters in buffered input

* Fix Safari bug (regex lookbehind not supported)

Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit a8e333d79a)

Co-authored-by: Trey Hunner <trey@treyhunner.com>
2022-07-01 03:16:25 -07:00
Mark Shannon 3b4f5ed168
[3.11] GH-93516: Backport GH-93769 (GH-94231)
* Store offset of first traceable instruction to avoid having to recompute it all the time when tracing.
2022-06-28 16:30:22 +01:00
Miss Islington (bot) c966e0816e
gh-84461: Build Emscripten with WASM BigInt support (GH-94219)
(cherry picked from commit e69306f08b)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-24 08:30:46 -07:00
Miss Islington (bot) 4d2c972ff7
gh-84461: Fix ctypes and test_ctypes on Emscripten (GH-94142)
- c_longlong and c_longdouble need experimental WASM bigint.
- Skip tests that need threading
- Define ``CTYPES_MAX_ARGCOUNT`` for Emscripten. libffi-emscripten 2022-06-23 supports up to 1000 args.
(cherry picked from commit 8625802d85)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-24 04:17:21 -07:00
Miss Islington (bot) ee82f0f314
gh-93771: Clarify how deepfreeze.py is run (GH-94150)
(cherry picked from commit 4e796f5646)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-06-23 09:57:29 -07:00
Ken Jin 852b4d4bcd
[3.11] gh-93382: Cache result of `PyCode_GetCode` in codeobject (GH-93383) (#93493)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2022-06-23 17:24:49 +01:00
Mark Shannon 3ece6e6feb
[3.11] GH-93516: Backport GH-93769: Speedup line number checks when tracing (GH-94127)
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
2022-06-22 16:32:02 +01:00
Miss Islington (bot) 8c2af49071
gh-91172: Create a workflow for verifying bundled pip and setuptools (GH-31885) (GH-94121)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
(cherry picked from commit d36954b7ea)

Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
2022-06-22 15:57:56 +02:00
Christian Heimes 1073184918
[3.11] gh-84461: Fix Emscripten umask and permission issues (GH-94002) (GH-94006)
Co-authored-by: Christian Heimes <christian@python.org>
2022-06-19 20:18:34 +02:00
Miss Islington (bot) 6c8eb9503c
gh-84461: Fix pydebug Emscripten browser builds (GH-93982)
wasm_assets script did not take the ABIFLAG flag of sysconfigdata into
account.
(cherry picked from commit 7a2cc35e1c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-18 06:17:09 -07:00
Miss Islington (bot) 6e28032662
gh-84461: Document how to install SDKs manually (GH-93844)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit 8ba1c7f720)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-15 12:53:51 -07:00
Miss Islington (bot) 87864077de
gh-93824: Reenable installation of shell extension on Windows ARM64 (GH-93825)
(cherry picked from commit 99be1cbeb3)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-06-15 09:34:32 -07:00
Miss Islington (bot) 02ff1ccfb7
gh-84461: Fix parallel testing on WebAssembly (GH-93768)
(cherry picked from commit c2007573dd)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-13 11:15:46 -07:00
Miss Islington (bot) 4c881049ef
gh-84461: Use HOSTRUNNER to run regression tests (GH-93694)
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit dc5e02b2f4)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-11 00:04:35 -07:00
Miss Islington (bot) 52032554ae
gh-84461: Emscripten's faccessat() does not accept flags (GHß92353)
(cherry picked from commit 70690c7233)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-07 05:28:11 -07:00
Miss Islington (bot) 6787a8f146
gh-90473: Make chmod a dummy on WASI, skip chmod tests (GH-93534) (GH-93550)
WASI does not have the ``chmod(2)`` syscall yet.
(cherry picked from commit 22fed605e0)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 20:09:51 +02:00
Miss Islington (bot) 20be4a11fe
gh-90473: WASI requires proper open(2) flags (GH-93529)
(cherry picked from commit 4c71d22c4f)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-06 03:32:23 -07:00
Miss Islington (bot) 1d2b766100
gh-90473: Skip and document more failing tests on WASI (GH-93436)
- Mark more ``umask()`` cases
- ``dup()`` is not supported
- ``/dev/null`` is not available
- document missing features
- mark more modules as not available
(cherry picked from commit 069c96f84c)

Co-authored-by: Christian Heimes <christian@python.org>
2022-06-02 23:50:44 -07:00
Miss Islington (bot) 0fb70ce191
gh-90473: Misc test fixes for WASI (GH-93218)
* ``sys.executable`` is not set
* WASI does not support subprocess
* ``pwd`` module is not available
* WASI checks ``open`` syscall flags more strict, needs r, w, rw flag.
* ``umask`` is not available
* ``/dev/null`` may not be accessible
(cherry picked from commit 1f134e96ba)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-25 07:24:32 -07:00
Miss Islington (bot) a29b1f8b4b
gh-90473: WASI: skip gethostname tests (GH-93092)
- WASI's ``gethostname()`` is a stub that always fails with OSError
  ``ENOTSUP``
- skip mailcap ``test`` if subprocess is not available
- WASI process_time clock does not work.
(cherry picked from commit 760ec8940a)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-23 08:21:45 -07:00
Miss Islington (bot) 7afccd34a6
gh-90473: Decrease recursion limit and skip tests on WASI (GH-92803)
(cherry picked from commit 137fd3d88a)

Co-authored-by: Christian Heimes <christian@python.org>
2022-05-19 08:05:52 -07:00
Miss Islington (bot) de3349019b
gh-92256: Improve Argument Clinic parser error messages (GH-92268)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit 4bd07d1dbd)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-05-10 00:48:34 -07:00
Victor Stinner 329afe78c3
gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358)
Fix tests failing with the PYTHONSAFEPATH=1 env var.

Enhance also -P help in Python usage (python --help).
2022-05-06 03:41:24 +02:00
Eric Snow 1f631ae3a1
gh-81057: Fix indent. (gh-92267) 2022-05-03 15:44:52 -06:00
Victor Stinner 804f2529d8
gh-91320: Use _PyCFunction_CAST() (#92251)
Replace "(PyCFunction)(void(*)(void))func" cast with
_PyCFunction_CAST(func).

Change generated by the command:

sed -i -e \
  's!(PyCFunction)(void(\*)(void)) *\([A-Za-z0-9_]\+\)!_PyCFunction_CAST(\1)!g' \
  $(find -name "*.c")
2022-05-03 21:42:14 +02:00