summaryrefslogtreecommitdiffstats
path: root/Modules/Setup.stdlib.in
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-111495: add stub files for C API test modules (GH-111586) (GH-111592)Sergey B Kirpichev2023-11-011-1/+1
| | | | | This is to reduce merge conflicts (Modules/Setup.stdlib.in) for subsequent pull requests for the issue. (cherry picked from commit 33ed5fa69dbe25d64a910c450be527f4db9dc5dd)
* [3.12] gh-111065: Add more tests for the C API with the PySys_ prefix ↵Serhiy Storchaka2023-10-251-1/+1
| | | | | | | | | | | | (GH-111067) (GH-111305) * Move existing tests for PySys_GetObject() and PySys_SetObject() into specialized files. * Add test for PySys_GetXOptions() using _testcapi. * Add tests for PySys_FormatStdout(), PySys_FormatStderr(), PySys_WriteStdout() and PySys_WriteStderr() using ctypes. (cherry picked from commit b2ba2985275d1200e5c44c3f224d754141fc5292)
* [3.12] gh-110525: Add CAPI tests for set and frozenset objects (GH-110526). ↵Nikita Sobolev2023-10-091-1/+1
| | | | | (GH-110547) (cherry picked from commit c49edd7d9c5395a6a6696a4846f56bc8b2b22792)
* [3.12] gh-107178: Add the C API tests for the Abstract Objects Layer ↵Serhiy Storchaka2023-08-161-1/+1
| | | | | | | | | | | | (GH-107179) (#107728) Cover all the Mapping Protocol, almost all the Sequence Protocol (except PySequence_Fast) and a part of the Object Protocol. Move existing tests to Lib/test/test_capi/test_abstract.py and Modules/_testcapi/abstract.c. Add also tests for PyDict C API.. (cherry picked from commit 16c9415fba4972743f1944ebc44946e475e68bc4)
* [3.12] gh-99108: Refresh HACL* (GH-104808) (#104893)Miss Islington (bot)2023-05-241-1/+1
| | | | | | | | gh-99108: Refresh HACL* (GH-104808) Refresh HACL* from upstream to improve SHA2 performance and fix a 32-bit issue in SHA3. (cherry picked from commit 160321e5304b962a162eb023472aa2bc8307ae15) Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
* gh-103763: Implement PEP 695 (#103764)Jelle Zijlstra2023-05-161-1/+0
| | | | | | | | | | | | | | This implements PEP 695, Type Parameter Syntax. It adds support for: - Generic functions (def func[T](): ...) - Generic classes (class X[T](): ...) - Type aliases (type X = ...) - New scoping when the new syntax is used within a class body - Compiler and interpreter changes to support the new syntax and scoping rules Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: Eric Traut <eric@traut.com> Co-authored-by: Larry Hastings <larry@hastings.org> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* gh-93649: Split gc- and allocation tests from _testcapimodule.c (GH-104403)Jurica Bradarić2023-05-121-1/+1
|
* gh-99108: Replace SHA3 implementation HACL* version (#103597)Jonathan Protzenko2023-05-081-1/+1
| | | | | | | | | | | Replaces our built-in SHA3 implementation with a verified one from the HACL* project. This implementation is used when OpenSSL does not provide SHA3 or is not present. 3.11 shiped with a very slow tiny sha3 implementation to get off of the <=3.10 reference implementation that wound up having serious bugs. This brings us back to a reasonably performing built-in implementation consistent with what we've just replaced our other guaranteed available standard hash algorithms with: code from the HACL* project. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-102500: Implement PEP 688 (#102521)Jelle Zijlstra2023-05-041-1/+1
| | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)Petr Viktorin2023-05-041-1/+1
| | | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-84436: Add integration C API tests for immortal objects (gh-103962)Dong-hee Na2023-05-021-1/+1
|
* GH-94808: Cover `PyOS_mystrnicmp` and `PyOS_mystricmp` (gh-102469)Artem Mukhin2023-03-221-1/+1
|
* gh-101101: Unstable C API tier (PEP 689) (GH-101102)Petr Viktorin2023-02-281-1/+1
|
* gh-93649: Split exception tests from _testcapimodule.c (GH-102173)Erlend E. Aasland2023-02-231-1/+1
| | | Automerge-Triggered-By: GH:erlend-aasland
* gh-99108: Import MD5 and SHA1 from HACL* (#102089)Jonathan Protzenko2023-02-221-2/+2
| | | Replaces our fallback non-OpenSSL MD5 and SHA1 implementations with those from HACL* as we've already done with SHA2.
* gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)Gregory P. Smith2023-02-161-2/+1
| | | | | | | | | This merges their code. They're backed by the same single HACL* static library, having them be a single module simplifies maintenance. This should unbreak the wasm enscripten builds that currently fail due to linking in --whole-archive mode and the HACL* library appearing twice. Long unnoticed error fixed: _sha512.SHA384Type was doubly assigned and was actually SHA512Type. Nobody depends on those internal names. Also rename LIBHACL_ make vars to LIBHACL_SHA2_ in preperation for other future HACL things.
* gh-99108: Build the hashlib HACL* code as a static library. (#101917)Gregory P. Smith2023-02-141-2/+2
| | | | | | This builds HACL* as a library in one place. A followup to #101707 which broke some WASM builds. This fixes 2/4 of them, but the enscripten toolchain in the others don't deduplicate linker arguments and error out. A follow-on PR will address those.
* gh-99108: Import SHA2-384/512 from HACL* (#101707)Jonathan Protzenko2023-02-141-1/+1
| | | | | | Replace the builtin hashlib implementations of SHA2-384 and SHA2-512 originally from LibTomCrypt with formally verified, side-channel resistant code from the [HACL*](https://github.com/hacl-star/hacl-star/) project. The builtins remain a fallback only used when OpenSSL does not provide them.
* gh-99108: Replace SHA2-224 & 256 with verified code from HACL* (#99109)Jonathan Protzenko2023-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | replacing hashlib primitives (for the non-OpenSSL case) with verified implementations from HACL*. This is the first PR in the series, and focuses specifically on SHA2-256 and SHA2-224. This PR imports Hacl_Streaming_SHA2 into the Python tree. This is the HACL* implementation of SHA2, which combines a core implementation of SHA2 along with a layer of buffer management that allows updating the digest with any number of bytes. This supersedes the previous implementation in the tree. @franziskuskiefer was kind enough to benchmark the changes: in addition to being verified (thus providing significant safety and security improvements), this implementation also provides a sizeable performance boost! ``` --------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------- Sha2_256_Streaming 3163 ns 3160 ns 219353 // this PR LibTomCrypt_Sha2_256 5057 ns 5056 ns 136234 // library used by Python currently ``` The changes in this PR are as follows: - import the subset of HACL* that covers SHA2-256/224 into `Modules/_hacl` - rewire sha256module.c to use the HACL* implementation Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-101524: Split Up the _xxsubinterpreters Module (gh-101526)Eric Snow2023-02-041-0/+1
| | | | | This is step 1 in potentially dropping all the "channel"-related code. Channels have already been removed from PEP 554. https://github.com/python/cpython/issues/101524
* gh-47146: Soft-deprecate structmember.h, expose its contents via Python.h ↵Petr Viktorin2022-11-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-99014) The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. There are no deprecation warnings. Old code can stay unchanged (unless the extra include and non-namespaced macros bother you greatly). Specifically, no uses in CPython are updated -- that would just be unnecessary churn. The ``structmember.h`` header is deprecated, though it continues to be available and there are no plans to remove it. Its contents are now available just by including ``Python.h``, with a ``Py`` prefix added if it was missing: - `PyMemberDef`, `PyMember_GetOne` and`PyMember_SetOne` - Type macros like `Py_T_INT`, `Py_T_DOUBLE`, etc. (previously ``T_INT``, ``T_DOUBLE``, etc.) - The flags `Py_READONLY` (previously ``READONLY``) and `Py_AUDIT_READ` (previously all uppercase) Several items are not exposed from ``Python.h``: - `T_OBJECT` (use `Py_T_OBJECT_EX`) - `T_NONE` (previously undocumented, and pretty quirky) - The macro ``WRITE_RESTRICTED`` which does nothing. - The macros ``RESTRICTED`` and ``READ_RESTRICTED``, equivalents of `Py_AUDIT_READ`. - In some configurations, ``<stddef.h>`` is not included from ``Python.h``. It should be included manually when using ``offsetof()``. The deprecated header continues to provide its original contents under the original names. Your old code can stay unchanged, unless the extra include and non-namespaced macros bother you greatly. There is discussion on the issue to rename `T_PYSSIZET` to `PY_T_SSIZE` or similar. I chose not to do that -- users will probably copy/paste that with any spelling, and not renaming it makes migration docs simpler. Co-Authored-By: Alexander Belopolsky <abalkin@users.noreply.github.com> Co-Authored-By: Matthias Braun <MatzeB@users.noreply.github.com>
* gh-96002: Add functional test for Argument Clinic (#96178)colorfulappl2022-11-211-0/+1
| | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-93649: Split float/long tests from _testcapimodule.c (GH-99549)Erlend E. Aasland2022-11-171-1/+1
| | | Automerge-Triggered-By: GH:erlend-aasland
* gh-93649: Split watcher API tests from _testcapimodule.c (#99532)Erlend E. Aasland2022-11-161-1/+1
|
* gh-93649: Split memory and docstring tests from _testcapimodule.c (#99517)Erlend E. Aasland2022-11-161-1/+1
|
* gh-93649: Split pytime and datetime tests from _testcapimodule.c (#99494)Erlend E. Aasland2022-11-151-1/+1
|
* gh-93649: Split getargs tests from _testcapimodule.c (#99346)Erlend E. Aasland2022-11-141-1/+1
|
* gh-98627: Add the _testsinglephase Module (gh-99039)Eric Snow2022-11-081-0/+1
| | | | | This makes it more clear that a given test is definitely testing against a single-phase init (legacy) extension module. The new module is a companion to _testmultiphase. https://github.com/python/cpython/issues/98627
* gh-93649: Split unicode tests from _testcapimodule.c & add some more (GH-95819)Petr Viktorin2022-08-101-1/+1
| | | | | | - Move PyUnicode tests to a separate file - Add some more tests for PyUnicode_FromFormat Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
* gh-93274: Expose receiving vectorcall in the Limited API (GH-95717)Petr Viktorin2022-08-081-1/+1
|
* gh-93649: Split heaptype tests from _testcapimodule.c (GH-95386)Petr Viktorin2022-08-011-1/+1
| | | | | This removes the unused negative_dictoffset function: the type this function would create is available as _testcapi.HeapCTypeWithNegativeDict
* gh-93939: Build C extensions without setup.py (GH-94474)Christian Heimes2022-07-141-0/+1
| | | Combines GH-93940, GH-94452, and GH-94433
* gh-93649: Split vectorcall testing from _testcapimodule.c (GH-94549)Petr Viktorin2022-07-081-1/+1
| | | | | | | | | | | | | | The `_testcapimodule.c` file is getting too large to work with effectively. This PR lays out a general structure of how tests can be split up, with more splitting to come later if the structure is OK. Vectorcall tests aren't the biggest issue -- it's just an area I want to work on next, so I'm starting here. An issue specific to vectorcall tests is that it wasn't clear that e.g. `MethodDescriptor2` is related to testing vectorcall: the `/* Test PEP 590 */` section had an ambiguous end. Separate file should make things like this much clearer. OTOH, for some pieces it might not be clear where they should be -- I left `meth_fastcall` with tests of the other calling conventions. IMO, even with the ambiguity it's still worth it to split the huge file up. I'm not sure about the buildsystem changes, hopefully CI will tell me what's wrong. @vstinner, @markshannon: Do you think this is a good idea? Automerge-Triggered-By: GH:encukou
* gh-90005: Port readline and curses to PY_STDLIB_MOD (GH-94452)Christian Heimes2022-07-061-6/+6
| | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
* gh-90005: Port _dbm module to PY_STDLIB_MOD (GH-94433)Christian Heimes2022-07-011-1/+1
|
* gh-90005: Port _ctypes to PY_STDLIB_MOD (GH-32229)Christian Heimes2022-06-261-1/+1
| | | | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> Automerge-Triggered-By: GH:tiran
* gh-69093: Fix Setup.local.in rule for _sqlite3 (GH-93380)Christian Heimes2022-05-311-1/+1
|
* bpo-45847: Port _tkinter to PY_STDLIB_MOD (GH-31698)Erlend Egeberg Aasland2022-03-311-3/+2
| | | | | - Remove ``--with-tclk-*`` options from `configure` - Use pkg-config to detect `_tkinter` dependencies (Tcl/Tk, X11) - Manual override via environment variables `TCLTK_CFLAGS` and `TCLTK_LIBS`
* bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)Christian Heimes2022-01-121-2/+1
|
* bpo-45847: Revert Port _ctypes partly to PY_STDLIB_MOD (GH-29747) (GH-29969)Christian Heimes2021-12-071-1/+1
|
* bpo-45847: Update whatsnew and add place holder entries for missing ↵Christian Heimes2021-12-041-0/+12
| | | | extensions (GH-29914)
* bpo-45847: Port _ctypes partly to PY_STDLIB_MOD (GH-29747)Christian Heimes2021-12-041-0/+4
| | | Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
* bpo-45847: Port _multiprocessing to PY_STDLIB_MOD (GH-29768)Erlend Egeberg Aasland2021-11-281-0/+1
|
* bpo-40280: Use Setup.stdlib static for wasm builds (GH-29784)Christian Heimes2021-11-261-2/+2
| | | ``Modules/Setup.stdlib`` contains ``Setup`` lines for all stdlib extension modules for which ``configure`` has detected their dependencies. The file is not used yet and still under development. To use the file, do ``ln -sfr Modules/Setup.stdlib Modules/Setup.local``.
* bpo-45847: Port _uuid to PY_STDLIB_MOD (GH-29741)Christian Heimes2021-11-241-0/+2
|
* bpo-45847: Port _posixshmem to PY_STDLIB_MOD (GH-29738)Erlend Egeberg Aasland2021-11-241-0/+3
|
* bpo-45847: Port _gdbm to PY_STDLIB_MOD (GH-29720)Christian Heimes2021-11-231-0/+5
|
* bpo-45847: Port _ssl and _hashlib to PY_STDLIB_MOD (GH-29727)Christian Heimes2021-11-231-0/+5
|
* bpo-45847: Port _crypt to PY_STDLIB_MOD (GH-29725)Christian Heimes2021-11-231-0/+2
|
* bpo-45847: Port _socket to PY_STDLIB_MOD (GH-29713)Erlend Egeberg Aasland2021-11-231-0/+1
|