summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-101196: Make isdir/isfile/exists faster on Windows (GH-101324)Michael Droettboom2023-02-089-34/+624
| | | Co-authored-by: Eryk Sun <eryksun@gmail.com>
* gh-101614: Don't treat python3_d.dll as a Python DLL when checking extension ↵David Hewitt2023-02-082-4/+6
| | | | modules for incompatibility (GH-101615)
* gh-100933: Improve `check_element` helper in `test_xml_etree` (#100934)Nikita Sobolev2023-02-081-23/+4
| | | Items checked by this test are always `str` and `dict` instances.
* GH-101578: Normalize the current exception (GH-101607)Mark Shannon2023-02-0829-171/+476
| | | | | | | | | | * Make sure that the current exception is always normalized. * Remove redundant type and traceback fields for the current exception. * Add new API functions: PyErr_GetRaisedException, PyErr_SetRaisedException * Add new API functions: PyException_GetArgs, PyException_SetArgs
* gh-47937: Note that Popen attributes are read-only (#93070)Stanley2023-02-081-11/+12
| | | | | | * Note that Popen attributes aren't meant to be set by users by rewording the text about the attributes. * Also update some universal_newlines references to mention the modern text parameter name while in the area. Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-98831: Modernize CALL_FUNCTION_EX (#101627)Guido van Rossum2023-02-085-37/+41
| | | New generator feature: Move CHECK_EVAL_BREAKER() call to just before DISPATCH().
* gh-101446: Change `repr` of `collections.OrderedDict` (#101661)Nikita Sobolev2023-02-084-50/+11
|
* gh-98831: Modernize FORMAT_VALUE (#101628)Guido van Rossum2023-02-085-35/+24
| | | Generator update: support balanced parentheses and brackets in conditions and size expressions.
* gh-98831: Finish the UNPACK_SEQUENCE family (#101666)Guido van Rossum2023-02-075-63/+72
| | | New generator feature: Generate useful glue for output arrays, so you can just write values to the output array (no bounds checking). Rewrote UNPACK_SEQUENCE_TWO_TUPLE to use this, and also UNPACK_SEQUENCE_{TUPLE,LIST}.
* gh-101632: Add the new RETURN_CONST opcode (#101633)penguin_wwy2023-02-0719-154/+186
|
* Merge branch 'main' of https://github.com/python/cpython into mainThomas Wouters2023-02-079-142/+158
|\
| * gh-101656: Fix "conversion from Py_ssize_t to int" warning in ↵Nikita Sobolev2023-02-071-3/+3
| | | | | | | | `_testcapimodule` (#101657)
| * gh-98831: rewrite UNPACK_EX, UNPACK_SEQUENCE, UNPACK_SEQUENCE_TWO_TUPLE in ↵Irit Katriel2023-02-073-54/+40
| | | | | | | | the instruction definition DSL (#101641)
| * gh-97725: Fix documentation for the default file of ↵Oleg Iarygin2023-02-072-1/+3
| | | | | | | | `asyncio.Task.print_stack` (#101652)
| * Make use of TESTFN_ASCII in test_fileio (GH-101645)Zachary Ware2023-02-071-7/+6
| | | | | | | | | | testBytesOpen requires an ASCII filename, but TESTFN usually isn't ASCII. Automerge-Triggered-By: GH:zware
| * gh-98831: Modernize the FOR_ITER family of instructions (#101626)Guido van Rossum2023-02-073-75/+104
| | | | | | Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
| * Fix nesting of 'Pending Removal in Python 3.14' (#101637)Oleg Iarygin2023-02-071-1/+1
| |
| * Doctest: Pin sphinxext-opengraph==0.7.5 to prevent importing NumPy (#101642)Hugo van Kemenade2023-02-071-1/+1
| |
* | Post 3.12.0a5Thomas Wouters2023-02-071-1/+1
| |
* | Python 3.12.0a5v3.12.0a5Thomas Wouters2023-02-0768-145/+680
|/
* [gh-101072] Fix Blurb for GH-101127Łukasz Langa2023-02-071-8/+2
|
* gh-101072: support default and kw default in PyEval_EvalCodeEx for 3.11+ ↵Matthieu Dartiailh2023-02-075-6/+206
| | | | | (#101127) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-85747: Active voice & suggested edits, 'running/stopping loop' & ↵Brian Skinn2023-02-071-18/+24
| | | | | | 'callbacks' subsections of asyncio-eventloop.rst (#100270) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-98831: Move DSL documentation here from ideas repo (#101629)Guido van Rossum2023-02-072-3/+415
|
* gh-99108: Replace SHA2-224 & 256 with verified code from HACL* (#99109)Jonathan Protzenko2023-02-0718-350/+1779
| | | | | | | | | | | | | | | | | | | | | | 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-59956: Add a Test to Verify GILState Matches the "Current" Thread State ↵Eric Snow2023-02-062-0/+40
| | | | | | | (gh-101625) This test should have been in gh-101431. https://github.com/python/cpython/issues/59956
* gh-98831: rewrite COPY and SWAP in the instruction definition DSL (#101620)Irit Katriel2023-02-063-22/+21
|
* GH-101616: Mention the Docs Discourse forum in the "reporting docs issues" ↵Mariatta Wijaya2023-02-061-0/+3
| | | | | (GH-101617) Fixes https://github.com/python/cpython/issues/101616
* gh-59956: Partial Fix for GILState API Compatibility with Subinterpreters ↵Eric Snow2023-02-062-21/+7
| | | | | | | | | | | (gh-101431) The GILState API (PEP 311) implementation from 2003 made the assumption that only one thread state would ever be used for any given OS thread, explicitly disregarding the case of subinterpreters. However, PyThreadState_Swap() still facilitated switching between subinterpreters, meaning the "current" thread state (holding the GIL), and the GILState thread state could end up out of sync, causing problems (including crashes). This change addresses the issue by keeping the two in sync in PyThreadState_Swap(). I verified the fix against gh-99040. Note that the other GILState-subinterpreter incompatibility (with autoInterpreterState) is not resolved here. https://github.com/python/cpython/issues/59956
* gh-101609: Fix "‘state’ may be used uninitialized" warning in ↵Nikita Sobolev2023-02-061-2/+3
| | | | | | | `_xxinterpchannelsmodule` (GH-101610) I went with the easiest solution: just removing the offending line. See the issue description with my reasoning. https://github.com/python/cpython/issues/101609
* gh-101562: typing: add tests for inheritance with NotRequired & Required in ↵Eclips42023-02-062-0/+34
| | | | parent fields (#101563)
* gh-101543: Ensure Windows registry path is only used when stdlib can't be ↵Steve Dower2023-02-062-19/+14
| | | | found (GH-101544)
* gh-76961: Fix buildbot failures in test_pep3118 (#101587)Mark Dickinson2023-02-062-13/+13
| | | This PR fixes the buildbot failures introduced by the merge of #5561, by restricting the relevant tests to something that should work on both 32-bit and 64-bit platforms. It also silences some compiler warnings introduced in that PR.
* gh-101372: Fix unicodedata.is_normalized to properly handle the UCD 3… ↵Dong-hee Na2023-02-062-1/+3
| | | | (gh-101388)
* gh-101541: [Enum] create flag psuedo-member without calling original __new__ ↵Ethan Furman2023-02-063-3/+43
| | | | (GH-101590)
* Trivial Change: Remove unhelpful doc in `datetime.timedelta` (#100164)Matty G2023-02-061-2/+5
|
* gh-101334: Don't force USTAR format in test_tarfile. (GH-101572)Gregory P. Smith2023-02-052-0/+6
| | | | | That causes the test to fail when run using a high UID as that ancient format cannot represent it. The current default (PAX) and the old default (GNU) both support high UIDs.
* bpo-33591: Add support for path like objects to `ctypes.CDLL` (#7032)mrh19972023-02-055-4/+36
| | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-76961: Fix the PEP3118 format string for ctypes.Structure (#5561)Eric Wieser2023-02-054-33/+111
| | | | | | | | | | | | | | | | | | | | The summary of this diff is that it: * adds a `_ctypes_alloc_format_padding` function to append strings like `37x` to a format string to indicate 37 padding bytes * removes the branches that amount to "give up on producing a valid format string if the struct is packed" * combines the resulting adjacent `if (isStruct) {`s now that neither is `if (isStruct && !isPacked) {` * invokes `_ctypes_alloc_format_padding` to add padding between structure fields, and after the last structure field. The computation used for the total size is unchanged from ctypes already used. This patch does not affect any existing aligment computation; all it does is use subtraction to deduce the amount of paddnig introduced by the existing code. --- Without this fix, it would never include padding bytes - an assumption that was only valid in the case when `_pack_` was set - and this case was explicitly not implemented. This should allow conversion from ctypes structs to numpy structs Fixes https://github.com/numpy/numpy/issues/10528
* Revert "gh-89381: Fix invalid signatures of math/cmath.log (#101404)" (#101580)Mark Dickinson2023-02-058-42/+47
| | | This reverts commit 0ef92d979311ba82d4c41b22ef38e12e1b08b13d.
* gh-101570: Update bundled pip version to 23.0 (#101571)Pradyun Gedam2023-02-053-1/+2
| | | | | | | | | | Update bundled pip version to 23.0 This is the current latest version of `pip`. --------- Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-101266: Fix __sizeof__ for subclasses of int (#101394)Mark Dickinson2023-02-054-9/+48
| | | | | | | Fix the behaviour of the `__sizeof__` method (and hence the results returned by `sys.getsizeof`) for subclasses of `int`. Previously, `int` subclasses gave identical results to the `int` base class, ignoring the presence of the instance dictionary. <!-- gh-issue-number: gh-101266 --> * Issue: gh-101266 <!-- /gh-issue-number -->
* gh-101221: Add options in the documentation of timeit command (#101222)busywhitespace2023-02-051-1/+1
|
* Add missing preposition in argparse docs (#101548)alnoki2023-02-051-1/+1
|
* Fix detection of presence of time.tzset (gh-101539) (#101540)Alexander Belopolsky2023-02-051-1/+1
| | | | Resolves gh-101539 Related to gh-31898
* GH-100485: Create an alternative code path when an accurate fma() ↵Raymond Hettinger2023-02-042-0/+48
| | | | implementation is not available (#101567)
* gh-101322: Ensure test_zlib.ZlibDecompressorTest runs, fix errors in ↵Ruben Vorderman2023-02-043-2/+10
| | | | | ZlibDecompressor (#101323) * Ensure test_zlib.ZlibDecompressorTest actually runs, fix errors in ZlibDecompressor.
* gh-101282: Update BOLT --split-functions flag not to use deprecated u… ↵Dong-hee Na2023-02-042-1/+3
| | | | | (gh-101557) gh-101282: Update BOLT --split-functions flag not to use deprecated usage
* GH-56426: Add cross-reference to the documentation for faulthandler, ↵Furkan Onder2023-02-043-2/+26
| | | | | traceback, and pdb. (#101157) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Add missing `versionadded` directive for `PyCode_Addr2Location` (#101347)Max Bachmann2023-02-041-0/+2
|