Commit graph

3493 commits

Author SHA1 Message Date
Christian Heimes 2eb9008d72
gh-95853: Improve WASM build script (GH-96389)
- pre-build Emscripten ports and system libraries
- check for broken EMSDK versions
- use EMSDK's node for wasm32-emscripten
- warn when PKG_CONFIG_PATH is set
- add support level information
2022-08-30 07:56:26 +02:00
Christian Heimes d0b3d235db
gh-96320: WASI socket fixes (#96388)
* gh-96320: WASI socket fixes

- ignore missing functions in ``socket.__repr__``
- bundle network files with assets

* blurb
2022-08-30 06:36:11 +02:00
Christian Heimes 873554ef84
gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683) 2022-08-29 18:19:15 +02:00
Carl Friedrich Bolz-Tereick 9c197bc8bf
GH-96172 fix unicodedata.east_asian_width being wrong on unassigned code points (#96207) 2022-08-26 19:29:39 +03:00
Eric Snow d45d5c277a
gh-90110: Update the c-analyzer Tool (gh-96255)
Here we automatically ignore uses of _PyArg_Parser, "kwlist" arrays, and module/type defs. That way new uses don't trigger false positives in the c-analyzer check script.
2022-08-25 15:46:08 -06:00
conioh 1288097088
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build scripts. (GH-31803) 2022-08-25 20:23:42 +01:00
Mark Shannon a4a9f2e879
GH-96177: Move GIL and eval breaker code out of ceval.c into ceval_gil.c. (GH-96204) 2022-08-24 14:21:01 +01:00
Carl Friedrich Bolz-Tereick 2d9f252c0c
gh-96019: Fix caching of decompositions in makeunicodedata (GH-96020) 2022-08-19 12:20:44 +03:00
Christian Heimes 6087f491ea
gh-95853: WASM: better version and asset handling in scripts (GH-96045)
- support EMSDK tot-upstream and git releases
- allow WASM assents for wasm64-emscripten and WASI. This makes single file distributions on WASI easier.
- decouple WASM assets from browser builds
2022-08-19 08:36:12 +02:00
Eric Snow 586fc02be5
gh-90110: Update the c-analyzer Tool (gh-96058) 2022-08-17 16:54:59 -06:00
Eric Snow 5aac85101b
gh-90110: Get the C Analyzer Tool Working Again (gh-96057)
We broke it with a recent `_PyArg_Parser` change.

Also:
* moved the `_PyArg_Parser` whitelist entries over to ignored.tsv now that they are thread-safe
* added some known globals from a currently-excluded file
* dropped some outdated globals from the whitelist
2022-08-17 13:55:01 -06:00
Mark Shannon 3ef3c6306d
GH-95707: Fix uses of Py_TPFLAGS_MANAGED_DICT (GH-95854)
* Make sure that tp_dictoffset is correct with Py_TPFLAGS_MANAGED_DICT is set.

* Avoid traversing managed dict twice when subclassing class with Py_TPFLAGS_MANAGED_DICT set.
2022-08-15 12:29:27 +01:00
Christian Heimes 4a7f5a55dc
gh-95853: Address wasm build and test issues (GH-95985) 2022-08-15 07:41:10 +02:00
Christian Heimes 32ac98e899
gh-95853: Add script to automate WASM build (GH-95828)
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``.

Co-authored-by: Brett Cannon <brett@python.org>
2022-08-13 21:56:08 +02:00
Erlend E. Aasland f07adf82f3
gh-90928: Improve static initialization of keywords tuple in AC (#95907) 2022-08-13 12:09:40 +02:00
Eric Snow 6f6a4e6cc5
gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code (gh-95860)
We only statically initialize for core code and builtin modules.  Extension modules still create
the tuple at runtime.  We'll solve that part of interpreter isolation separately.

This change includes generated code. The non-generated changes are in:

* Tools/clinic/clinic.py
* Python/getargs.c
* Include/cpython/modsupport.h
* Makefile.pre.in (re-generate global strings after running clinic)
* very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c

All other changes are generated code (clinic, global strings).
2022-08-11 15:25:49 -06:00
Serhiy Storchaka cc9160a29b
gh-91838: Resolve more HTTP links which redirect to HTTPS (GH-95650) 2022-08-08 14:00:17 +03:00
Oleg Iarygin 56d16e8cb4
gh-93243: Make smtpd private before porting its users (GH-93246)
gh-93243

This PR is required to reduce diffs of the following porting (no need to either maintain documentation and tests consistent with each porting step, or try to port everything and remove smtpd in a single PR).

Automerge-Triggered-By: GH:warsaw
2022-08-05 17:41:29 -07:00
Eric Snow 60f54d9485
gh-90110: Update the C Analyzer Tool Whitelists (gh-95628) 2022-08-04 10:47:02 -06:00
Steve Dower 5b6acbaa20
gh-95587: Fixes some upgrade detection issues in the Windows installer (GH-95631) 2022-08-04 17:12:08 +01:00
Eric Snow a7161f95aa
gh-90110: Get the C Analyzer Tool Working Again (gh-95545) 2022-08-01 17:13:23 -06:00
neonene 7d8973870b
gh-95445: Ensure Windows msi uninstalls document folder successfully (GH-95465) 2022-08-01 16:37:32 +01:00
Mark Shannon de388c0a7b
GH-95245: Store object values and dict pointers in single tagged pointer. (GH-95278) 2022-08-01 14:34:54 +01:00
Christian Heimes 0fe645d6fd
gh-95174: Add pthread stubs for WASI (GH-95234)
Co-authored-by: Brett Cannon <brett@python.org>
2022-07-27 20:28:06 +02:00
Christian Heimes 2833f3798d
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.
2022-07-27 15:30:36 +02:00
Christian Heimes 8b24d60f1b
gh-95174: WASI: skip missing sockets functions (GH-95179) 2022-07-27 08:19:23 +02:00
Christian Heimes daa64d6a59
gh-95085: Promote Emscripten and WASI to PEP 11 tier 3 (GH-95086) 2022-07-27 08:18:34 +02:00
Christian Heimes e8f3e8f0ab
gh-95205: Improve WASM README.md (GH-95267)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-26 11:12:42 +02:00
Dong-hee Na a15ae19ffb
gh-85454: Remove distutils.ccompiler from Tools/c-analyzer (GH-95171) 2022-07-25 21:10:30 +02:00
Kumar Aditya 73ee5a6b86
GH-94851: check refcnt of immortal objects after finalization (GH-95001) 2022-07-25 10:43:59 -07:00
Erlend Egeberg Aasland 310f94871a
gh-95205: Improve wasm README (#95206)
Co-authored-by: Christian Heimes <christian@python.org>
2022-07-25 09:42:50 +02:00
Brandt Bucher e402b26b7f
GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121) 2022-07-22 11:04:20 -07:00
Christian Heimes 0f34c7e2d3
gh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035) 2022-07-20 08:53:26 +02:00
Serhiy Storchaka 74b5e4ce80
gh-95007: Remove the NoneType return converter (GH-95019)
It has confusing semantic which does not provide any benefit (the
only difference is that you should write "return Py_None" instead
of "Py_RETURN_NONE"), it is not currently used, and it is broken.
2022-07-20 08:42:02 +03:00
Eric Snow 7a1a85d640
gh-94673: [c-analyzer] Add a Script to Identify Static Types (#94989)
issue: https://github.com/python/cpython/issues/94673
2022-07-18 19:03:57 -06:00
Christian Heimes 81dca70d70
gh-93939: Build C extensions without setup.py (GH-94474)
Combines GH-93940, GH-94452, and GH-94433
2022-07-14 00:51:49 -07:00
Christian Heimes 0c66074e9f
gh-94773: deepfreeze: support frozensets with unsortable types (GH-94775) 2022-07-12 18:09:47 +02:00
Kumar Aditya 9dff9f4814
GH-90699: Intern statically allocated strings (GH-93597)
This is similar to how strings are interned for deepfreeze.
2022-07-08 10:47:37 -07:00
Kumar Aditya 71697664d7
GH-90699: Move generated static initializer to pycore_runtime_generated.h (GH-94051) 2022-07-07 13:04:05 -07:00
Erlend Egeberg Aasland 8bbd70b4d1
gh-94430: Allow params named module or self with custom C names in Argument Clinic (#94431) 2022-07-07 11:29:34 +02:00
Erlend Egeberg Aasland 2b8ed4d3d4
gh-94538: Fix Argument Clinic output to custom file (#94539) 2022-07-05 11:06:04 +02:00
Christian Heimes 7bd67d1d88
gh-93939: Add script to check extension modules (#94545)
Add script ``Tools/scripts/check_modules.py`` to check and validate builtin
and shared extension modules. The script also handles ``Modules/Setup`` and
will eventually replace ``setup.py``.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-05 09:25:45 +02:00
Irit Katriel c57aad777a
gh-94216: add pseudo instructions to the dis/opcodes modules (GH-94241) 2022-07-01 15:33:35 +01:00
Petr Viktorin 1df9449db2
gh-84461: Tool/wasm/python.html: Add subresource integrity hashes (#93953) 2022-07-01 11:54:30 +02:00
Trey Hunner a8e333d79a
gh-84461: Improve WebAssembly in-browser demo (#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>
2022-07-01 11:52:58 +02:00
yutotnh 5631013617
Fix typos in comments (#94305) 2022-06-28 16:28:21 +02:00
Christian Heimes 44fa03d748
gh-93939: Create and install scripts in Makefile (GH-94324)
Scripts for 2to3, idle, and pydoc are now created and installed by make.
2022-06-28 14:56:06 +02:00
Mark Shannon c0453a40fa
GH-94163: Add BINARY_SLICE and STORE_SLICE instructions. (GH-94168) 2022-06-27 12:24:23 +01:00
Ken Jin 50a5ab2c0b
gh-93382: Sync up co_code changes with 3.11 (GH-94227)
Sync up co_code changes with 3.11 commit 852b4d4bcd.
2022-06-25 01:55:18 +08:00
Christian Heimes e69306f08b
gh-84461: Build Emscripten with WASM BigInt support (#94219) 2022-06-24 17:03:42 +02:00