summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gh-94777: Fix deadlock in ProcessPoolExecutor (#94784)Louis Paulot2023-07-103-0/+23
| | | Fixes a hang in multiprocessing process pool executor when a child process crashes and code could otherwise block on writing to the pipe. See GH-94777 for more details.
* gh-103186: Fix or catch 'extra' stderr output from unittests (#103196)Ijtaba Hussain2023-07-103-7/+14
| | | | | | | | | | | | Reduce test noise by fixing or catching and testing stderr messages from individual tests. test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call. test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it. test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it. --------- Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
* gh-105227: Add PyType_GetDict() (GH-105747)Eric Snow2023-07-106-1/+68
| | | | | This compensates for static builtin types having `tp_dict` set to `NULL`. Co-authored-by: Petr Viktorin <encukou@gmail.com>
* GH-61215: threadingmock: Remove unused branch for `timeout` (#106591)Mario Corchero2023-07-101-3/+1
| | | | | | threadingmock: Remove unused branch for `timeout` This is no longer needed as the mock does not hold a "timeout" parameter, the timeout is stored in `_mock_wait_timeout`.
* GH-100288: regen cases after #105990 (#106589)Kumar Aditya2023-07-101-7/+7
|
* gh-106078: Move static variables initialized once to decimal module global ↵Charlie Zhao2023-07-102-25/+28
| | | | state (#106475)
* Fix typo in datamodel.rst (#106587)Riahiamirreza2023-07-101-1/+1
|
* update release schedule for 3.13 (#106577)sunmy20192023-07-101-1/+1
|
* GH-104787: use managed weakrefs in `_asyncio` (#106516)Kumar Aditya2023-07-101-21/+6
|
* gh-99593: Add tests for Unicode C API (part 3) (GH-104728)Serhiy Storchaka2023-07-102-1/+972
| | | | Add tests for codecs.
* GH-100288: Specialize LOAD_ATTR for simple class attributes. (#105990)Mark Shannon2023-07-1010-290/+405
| | | * Add two more specializations of LOAD_ATTR.
* gh-106487: Allow the 'count' argument of `str.replace` to be a keyword (#106488)Hugo van Kemenade2023-07-106-14/+54
|
* Clarify how topics.py gets created. (#106121)Ned Batchelder2023-07-101-0/+1
| | | | | | | | | When changing docs, it was easy to find text in topics.py, and I wondered whether I was supposed to edit it. Thankfully, the top of the file says it's auto-generated, so I knew I didn't have to edit it. But I didn't know what started the auto-generation process. It's part of the release process, so I'll leave a note here for future editors.
* gh-105733: Fix ctypes What's New entry (#106576)Victor Stinner2023-07-101-1/+1
|
* gh-106461: typing: Consolidate docs on `Callable` (#106462)Alex Waygood2023-07-091-55/+75
|
* gh-105927: PyWeakref_GetRef() returns 1 on success (#106561)Victor Stinner2023-07-093-4/+6
| | | | | | PyWeakref_GetRef() now returns 1 on success, and return 0 if the reference is dead. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-105373: Doc lists pending removals (#106540)Victor Stinner2023-07-091-3/+296
|
* gh-106303: Use _PyObject_LookupAttr() instead of PyObject_GetAttr() (GH-106304)Serhiy Storchaka2023-07-096-20/+17
| | | | It simplifies and speed up the code.
* gh-104469: Convert_testcapi/vectorcall.c to use AC (gh-106557)littlebutt's workshop2023-07-092-25/+140
|
* Move implementation specific RE tests to separate class (GH-106563)Serhiy Storchaka2023-07-091-66/+69
|
* gh-105376: Remove logging.warn() and LoggerAdapter.warn() (#106553)Victor Stinner2023-07-094-19/+19
|
* gh-106535: Soft deprecate the getopt module (#105735)Victor Stinner2023-07-081-8/+13
| | | | | | The getopt module exists since the initial revision of the Python source code (1990). The optparse module was added to Python 2.3. When Python 2.7 added the 3rd argparse module, the optparse module was soft deprecated. Soft deprecate the getopt module.
* gh-106508: Improve debugging of the _sre module (GH-106509)Serhiy Storchaka2023-07-083-5/+31
| | | | | | | Now the VERBOSE macro can control tracing on per-pattern basis: * 0 -- disabled * 1 -- only if the DEBUG flag set * 2 -- always
* gh-106510: Fix DEBUG output for atomic group (GH-106511)Serhiy Storchaka2023-07-083-2/+8
|
* gh-101880: add link to object.__hash__() in hash() builtin documentation ↵Owain Davies2023-07-081-1/+1
| | | | (#101883)
* gh-105873: Make `_xxsubinterpreters` use exception type name in shared ↵Radislav Chugunov2023-07-083-4/+4
| | | | exception (#105874)
* gh-106524: Fix a crash in _sre.template() (GH-106525)Radislav Chugunov2023-07-083-0/+13
| | | | | | Some items remained uninitialized if _sre.template() was called with invalid indices. Then attempt to clear them in the destructor led to dereferencing of uninitialized pointer.
* gh-106078: Move static objects related to `CONTEXTVAR` to the decimal module ↵Charlie Zhao2023-07-082-29/+32
| | | | | | global state (#106395) Co-authored-by: Erlend E. Aasland <erlend@python.org>
* Restore previous behavior of 'make regen-cases' (#106541)Guido van Rossum2023-07-081-1/+12
| | | | | | | When running 'make regen-cases' just to check whether anything changed, it's annoying that even if nothing changes, the output files are touched, causing an expensiv rebuild of _bootstrap_python and anything it creates. So use consistently for all output files.
* gh-105373: Remove C API global config vars in Python 3.14 (#106538)Victor Stinner2023-07-072-44/+47
| | | | | Schedule the removal of C API global configuration variables in Python 3.14. Announce the removal to help C extension maintainers to upgrade their code.
* gh-105373: Doc lists pending C API removals (#106537)Victor Stinner2023-07-071-0/+80
|
* gh-106535: Document PEP 387 Soft Deprecation (#106536)Victor Stinner2023-07-072-2/+18
| | | Mark the optparse module as soft deprecated.
* gh-103200: Fix performance issues with `zipimport.invalidate_caches()` ↵Desmond Cheong2023-07-073-25/+67
| | | | | | (GH-103208) Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Brett Cannon <brett@python.org>
* gh-106300: Improve `assertRaises(Exception)` usages in tests (GH-106302)Nikita Sobolev2023-07-077-12/+20
|
* gh-104584: Replace ENTER_EXECUTOR with the original in trace projection ↵Guido van Rossum2023-07-071-0/+6
| | | | (#106526)
* Delete dead ceval code. (gh-106486)Benjamin Peterson2023-07-071-5/+0
|
* gh-104584: Allow unspecialized instructions in superblocks (#106497)Guido van Rossum2023-07-074-128/+490
| | | | | | | | | | | | | | | | This adds several of unspecialized opcodes to superblocks: TO_BOOL, BINARY_SUBSCR, STORE_SUBSCR, UNPACK_SEQUENCE, LOAD_GLOBAL, LOAD_ATTR, COMPARE_OP, BINARY_OP. While we may not want that eventually, for now this helps finding bugs. There is a rudimentary test checking for UNPACK_SEQUENCE. Once we're ready to undo this, that would be simple: just replace the call to variable_used_unspecialized with a call to variable_used (as shown in a comment). Or add individual opcdes to FORBIDDEN_NAMES_IN_UOPS.
* gh-104584: Move super-instruction special-casing to generator (#106500)Guido van Rossum2023-07-073-39/+84
| | | | | | Instead of special-casing specific instructions, we add a few more special values to the 'size' field of expansions, so in the future we can automatically handle additional super-instructions in the generator.
* gh-104683: clinic.py: refactor `Parameter` and `Function` as dataclasses ↵Alex Waygood2023-07-071-86/+57
| | | | (#106477)
* gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on ↵Andrew Geng2023-07-073-0/+4
| | | | close(). (#106504)
* GH-106057: Handle recursion errors in inline class calls properly. (GH-106108)Mark Shannon2023-07-074-91/+108
|
* gh-104584: Handle EXTENDED_ARG in superblock creation (#106489)Guido van Rossum2023-07-062-0/+72
| | | With test.
* gh-90876: Restore the ability to import multiprocessing when ↵Gregory P. Smith2023-07-063-8/+83
| | | | | | | | | `sys.executable` is `None` (#106464) Prevent `multiprocessing.spawn` from failing to *import* in environments where `sys.executable` is `None`. This regressed in 3.11 with the addition of support for path-like objects in multiprocessing. Adds a test decorator to have tests only run when part of test_multiprocessing_spawn to `_test_multiprocessing.py` so we can start to avoid re-running the same not-global-state specific test in all 3 modes when there is no need.
* gh-104584: Clean up and fix uops tests and fix crash (#106492)Guido van Rossum2023-07-062-26/+38
| | | | | | | | | | | | The uops test wasn't testing anything by default, and was failing when run with -Xuops. Made the two executor-related context managers global, so TestUops can use them (notably `with temporary_optimizer(opt)`). Made clear_executor() a little more thorough. Fixed a crash upon finalizing a uop optimizer, by adding a `tp_dealloc` handler.
* closes gh-106479: fix typo in __cplusplus macro (gh-106480)Dustin Rodrigues2023-07-061-1/+1
|
* gh-104683: clinic.py: refactor four simple classes as dataclasses (#106476)Alex Waygood2023-07-061-31/+20
|
* gh-104584: Fix error handling from backedge optimization (#106484)Guido van Rossum2023-07-064-11/+15
| | | | | | | | | | | | When `_PyOptimizer_BackEdge` returns `NULL`, we should restore `next_instr` (and `stack_pointer`). To accomplish this we should jump to `resume_with_error` instead of just `error`. The problem this causes is subtle -- the only repro I have is in PR gh-106393, at commit d7df54b139bcc47f5ea094bfaa9824f79bc45adc. But the fix is real (as shown later in that PR). While we're at it, also improve the debug output: the offsets at which traces are identified are now measured in bytes, and always show the start offset. This makes it easier to correlate executor calls with optimizer calls, and either with `dis` output. <!-- gh-issue-number: gh-104584 --> * Issue: gh-104584 <!-- /gh-issue-number -->
* gh-106458: Mark `testthreadingmock.py` with `@requires_working_threading` ↵Mario Corchero2023-07-061-9/+11
| | | | | | | (GH-106366) Mark `testthreadingmock.py` with `threading_helper.requires_working_threading`. Also add longer delays to reduce the change of a race conditions on the tests that validate short timeouts.
* Introduce a gate/check GHA job (#97533)Sviatoslav Sydorenko2023-07-061-0/+57
| | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-104683: clinic.py: Don't needlessly reimplement ↵Alex Waygood2023-07-061-18/+2
| | | | | `contextlib.redirect_stdout` (#106478) clinic.py: Don't needlessly reimplement `contextlib.redirect_stdout`