| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Basic support for pyrepl in Emscripten. Limitations:
* requires JSPI
* no signal handling implemented
As followup work, it would be nice to implement a webworker variant
for when JSPI is not available and proper signal handling.
Because it requires JSPI, it doesn't work in Safari. Firefox requires
setting an experimental flag. All the Chromiums have full support since
May. Until we make it work without JSPI, let's keep the original web_example
around.
(cherry picked from commit c933a6bb329bb97bc7e448388dad1b74f7ca4baa)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Éric <merwok@netwok.org>
|
| |
|
|
|
|
| |
(cherry picked from commit d1d526afe7ce62c787b150652a2ba136cb949d74)
Co-authored-by: adam j hartz <adam@smatz.net>
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-136822) (GH-136935)
This is useful for implementing proper `input()`. It requires the
JavaScript engine to support the wasm JSPI spec which is now stage 4.
It is supported on Chrome since version 137 and on Firefox and node
behind a flag.
We override the `__wasi_fd_read()` syscall with our own variant that
checks for a readAsync operation. If it has it, we use our own async
variant of `fd_read()`, otherwise we use the original `fd_read()`.
We also add a variant of `FS.createDevice()` called
`FS.createAsyncInputDevice()`.
Finally, if JSPI is available, we wrap the `main()` symbol with
`WebAssembly.promising()` so that we can stack switch from `fd_read()`.
If JSPI is not available, attempting to read from an AsyncInputDevice
will raise an `OSError`.
(cherry picked from commit 7ae4749d064bd49b0dd96172fee20c1f1678d9e9)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
|
| |
|
|
|
|
|
|
| |
folder (GH-136934) (#136956)
Reorganises the large Emscripten-specific file into the Emscripten folder.
(cherry picked from commit bbe589f93ccaf32eb95fd9d1f8f3dc9a536e8db1)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
(GH-136853) (GH-136907)
To choose the node version we use. Together with:
https://github.com/python/buildmaster-config/pull/614
closes GH-136852.
(cherry picked from commit aec7f5f8b2e8b5e02869cdb4e1f8a9ef87c9f953)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
|
| |
|
|
| |
Co-authored-by: chemelnucfin <3982092+chemelnucfin@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(#136699)
Corrects the handling of getuid on emscripten, which was consistently reporting as 0.
(cherry picked from commit e81c4e84b3a8688a367099e3adf9b2fcf914447f)
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
gh-116738: Make grp module thread-safe (GH-135434)
Make grp module methods getgrgid() and getgrnam() thread-safe when the GIL is disabled and getgrgid_r()/getgrnam_r() C APIs are not available.
---------
(cherry picked from commit 9363703bd3bf86e363c14a02e3d729caf1e29f44)
Co-authored-by: Alper <alperyoney@fb.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
|
| |
|
|
|
|
|
| |
(121914136635)
(cherry picked from commit b74fb8e220a50a9580320dfd398a16995b845c69)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
`test_zoneinfo_property.py` (GH-136384) (#136407)
gh-136297: Fix `hypothesis` and `subTest` usage in `test_zoneinfo_property.py` (GH-136384)
(cherry picked from commit db699db99d214dccb7c4849fa609fdd5188ee038)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
| |
CFLAGS_JIT (GH-135792)
(cherry picked from commit 2b0c684e0759dc3fec0e9dd0fc8383e6c75b7b5c)
Co-authored-by: Zanie Blue <contact@zanie.dev>
|
| |
|
|
|
|
|
|
|
| |
Doc: fix duplicated words (GH-136086)
---------
(cherry picked from commit 698bab5a4031c8f54e04e1dd42bcbe3e4564eba5)
Co-authored-by: Weilin Du <108666168+LamentXU123@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
|
| |
|
| |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-135737) (#135873)
Adds a note about flush/close on copyfileobj, and updates
the Emscripten build script to follow documented advice.
(cherry picked from commit 34393cbdd46fd965de86f1e7bc89ab111f506723)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
|
| |
|
|
| |
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
| |
(#135808)
Co-authored-by: Kattni <kattni@kattni.com>
|
| |
|
|
|
|
| |
(GH-135365) (#135611)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
|
| |
|
|
| |
(#135596)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(GH-134633) (#135605)
gh-134632: Fix `build-details.json` to use `INCLUDEPY` path (GH-134633)
* gh-134632: Fix `build-details.json` to use `INCLUDEPY` path
Fix ``build-details.json`` generation to use ``INCLUDEPY``, in order to
reference the ``pythonX.Y`` subdirectory of the include directory, as
required in :pep:`739`, instead of the top-level include directory.
* test_build_details: Add tests for the c_api section
* test_build_details: Expect pkgconfig for CPython unconditionally
(cherry picked from commit 0d582def34babca7417ece8a9e4e16cc2a752d44)
Co-authored-by: Michał Górny <mgorny@gentoo.org>
|
| |
|
|
|
|
|
| |
(GH-135347) (GH-135349)
(cherry picked from commit 0f866cbfefd797b4dae25962457c5579bb90dde5)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
| |
`Parser/pegen.c` (GH-134048) (#135320)
gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `Parser/pegen.c` (GH-134048)
(cherry picked from commit 754e7c9b5187fcad22acf7555479603f173a4a09)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| |
|
|
|
|
|
| |
installers. (GH-135145) (#135150)
(cherry picked from commit e598eecf4c97509acef517e94053e45db51636fb)
Co-authored-by: T. Wouters <thomas@python.org>
|
| |
|
|
|
|
|
|
| |
(GH-135031) (#135059)
gh-135028: Increase parser MAXSTACK for nested parenthesis (GH-135031)
(cherry picked from commit 6e80f11eb5eba360334b4ace105eb7d73394baf7)
Co-authored-by: Victor Stinner <vstinner@python.org>
|
| |
|
|
|
|
|
|
|
| |
(cherry picked from commit 0c5a8b0b55238a45b9073d06a10c3a59568cdf3c)
Includes fix for off-by-one error from GH-134867
(cherry-picked from commit e64395e8eb8d3a9e35e3e534e87d427ff27ab0a5)
Co-authored-by: Emma Smith <emma@emmatyping.dev>
Co-authored-by: Semyon Moroz <donbarbos@proton.me>
|
| |
|
|
|
|
|
|
| |
(#134423)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
|
| |
|
|
| |
building for WASI (GH-133219)
|
| |
|
|
|
|
|
| |
(GH-134456) (#134504)
Co-authored-by: Michał Górny <mgorny@gentoo.org>
Co-authored-by: Filipe Laíns 🇵🇸 <lains@riseup.net>
|
| |
|
|
| |
(cherry picked from commit 7ad90463df16e1938a3b6725b0f02af34cea372e)
|
| |
|
|
|
|
| |
static header. (GH-133966)
Extension builders must specify Py_GIL_DISABLED if they want to link to the free-threaded builds.
This was usually the case already, but this change guarantees it in all circumstances.
|
| |
|
|
|
| |
(#134228)
* gh-128045: Mark unknown opcodes as deopting to themselves (GH-128044)
|
| |
|
|
| |
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(#134038)
gh-133403: Check `Tools/build/deepfreeze.py` with mypy (GH-133802)
(cherry picked from commit 7eaa09739059aaac4812395f8d6bb586af8eadcc)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
(GH-133735) (#133764)
gh-133403: Check `Tools/build/generate-build-details.py` with mypy (GH-133735)
(cherry picked from commit cd2f234ad2ddd95e2d650edac5a6d593c865756a)
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
| |
gh-133412: amend docs for the `inst` definition (GH-133708)
The `stack_effect` is incorrectly documented as being allowed to be optional.
(cherry picked from commit f77dac66e1867cfdf6f7549822dd64416f6063bc)
Co-authored-by: Nybblista <170842536+nybblista@users.noreply.github.com>
|
| |
|
|
|
| |
(gh-133717)
(cherry picked from commit 8679c8d5ccf657835a88de5095d4fc6e2eb47633)
|
| |
|
|
|
|
|
| |
pick up site-packages (GH-133693)
(cherry picked from commit 6ce469dcba482772bc94c4048e90fa9598897c4a)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
| |
|
|
|
|
|
|
|
|
| |
(GH-133453) (#133689)
gh-133403: Check `Tools/build/verify_ensurepip_wheels.py` with mypy (GH-133453)
(cherry picked from commit 5f3d3f2a6c8ddf7a6be340c3f4c696e2a5eb51f0)
Co-authored-by: Flosckow <66554425+Flosckow@users.noreply.github.com>
Co-authored-by: Daniil Dumchenko <dumchenko.de@sibvaleo.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
|
| |
|
|
|
|
|
|
|
|
|
| |
parsing (GH-133584) (GH-133650)
* Add Argument Clinic converters: uint8, uint16, uint32, uint64.
* Add private C API: _PyLong_UInt8_Converter(),
_PyLong_UInt16_Converter(), _PyLong_UInt32_Converter(),
_PyLong_UInt64_Converter().
(cherry picked from commit 4c914e7a36033d5e8d52cdef3a4063eb9b012ed2)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
(GH-133404) (#133603)
gh-133403: Type `Tools/build/update_file.py` and check it with `mypy` (GH-133404)
(cherry picked from commit 50b52cba2d13a1854bc835412ac3f3c0ad42b5ba)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Zachary Ware <zach@python.org>
|
| |
|
|
|
|
|
|
|
| |
(GH-133557) (#133630)
gh-133555: Allow regenerating the parser with Python < 3.14 (GH-133557)
(cherry picked from commit b48599b8017f896c965e89c402bb70feef49808a)
Co-authored-by: Alex Prengère <2138730+alexprengere@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
``_remote_debugging`` (#133398)
|
| |
|
|
| |
moving const folding to the peephole optimizier (#131830)
|
| |
|
|
|
|
|
|
| |
module (GH-133287)
* Track the current executor, not the previous one, on the thread-state.
* Batch executors for deallocation to avoid having to constantly incref executors; this is an ad-hoc form of deferred reference counting.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add _zstd module for https://peps.python.org/pep-0784/
This commit introduces the `_zstd` module, with bindings to libzstd from
the pyzstd project. It also includes the unix build system configuration.
Windows build system support will be integrated independently as it
depends on integration with cpython-source-deps.
* Add _zstd to modules
* Fix path for compression.zstd module
* Ignore _zstd module like _io
* Expand module state macros to improve code quality
Also removes module state references from the classes in the _zstd
module and instead uses PyType_GetModuleState()
* Remove backticks suggested in review
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
* Use critical sections to lock object state
This should avoid races and deadlocks.
* Remove compress/decompress and mark module as not reliant on the GIL
The `compress`/`decompress` functions will be moved to Python code for simplicity.
C implementations can always be re-added in the future.
Also, mark _zstd as not requiring the GIL.
* Lift critical section to avoid clang warning
* Respond to comments by picnixz
* Call out pyzstd explicitly in license description
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* Use a much more robust implementation...
... for `get_zstd_state_from_type`
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Use PyList_GetItemRef for thread safety purposes
* Use a macro for the minimum supported version
* remove const from primivite types
* Use PyMem_New in another spot
* Simplify error handling in _get_frame_size
* Another simplification of error handling in get_frame_info
* Rename _module_state to mod_state
* Rewrite comment explaining the context of the code
* Add link to pyzstd
* Add TODO about refactoring dict training code
* Use PyModule_AddObjectRef over PyModule_AddObject
PyModule_AddObject is soft-deprecated, so we should use PyModule_AddObjectRef
* Check result of OutputBufferGrow
* Simplify return logic in `add_constant_to_type`
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Ignore return value of _zstd_clear()
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Remove redundant comments
* Remove __reduce__ from ZstdDict
We should instead document that to pickle a dictionary a user should use
the `.dict_content` attribute.
* Use PyUnicode_FromFormat instead of a buffer
* Don't use C constants/types in error messages
* Make error messages easier to understand for Python users
* Lower minimum required version 1.4.0
* Use casts and make slot function signatures correct
* Be consistent with CPython on const usage
* Make else clauses in line with PEP 7
* Fix over-indented blocks in argument clinic
* Add critical section around ZSTD_DCtx_setParameter
* Add a TODO about refactoring critical sections
* Use Py_UNREACHABLE
* Move bytes operations out of Py_BEGIN_ALLOW_THREADS
* Add TODO about ensuring a lock is held
* Remove asserts that may not be correct
* Add TODO to make ZstdDict and others GC objects
* Make objects GC tracked
* Remove unused include
* Fix some memory issues
* Fix refleaks on module and in ZstdDict
* Update configure to check for ZDICT_finalizeDictionary
* Properly check version in configure
* exit(1) if check fails
* Use AC_RUN_IFELSE
* Use a define() to re-use version check
* Actually properly set _zstd module status based on version
---------
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
| | |
|
| | |
|