summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-109120: Fix syntax error in handlinh of incorrect star expressions (#117444)Grigoriev Semyon2024-04-024-1239/+1442
|
* gh-117411: move PyFutureFeatures to pycore_symtable.h and make it private ↵Irit Katriel2024-04-0211-42/+49
| | | | (#117412)
* gh-113317: Argument Clinic: Add libclinic.converters module (#117315)Victor Stinner2024-04-027-1215/+1259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the following converter classes to libclinic.converters: * PyByteArrayObject_converter * PyBytesObject_converter * Py_UNICODE_converter * Py_buffer_converter * Py_complex_converter * Py_ssize_t_converter * bool_converter * byte_converter * char_converter * defining_class_converter * double_converter * fildes_converter * float_converter * int_converter * long_converter * long_long_converter * object_converter * self_converter * short_converter * size_t_converter * slice_index_converter * str_converter * unicode_converter * unsigned_char_converter * unsigned_int_converter * unsigned_long_converter * unsigned_long_long_converter * unsigned_short_converter Move also the following classes to libclinic.converters: * buffer * robuffer * rwbuffer Move the following functions to libclinic.converters: * correct_name_for_self() * r() * str_converter_key() Move Null and NULL to libclinic.utils.
* Docs: specify XML document name in xml.etree.elementtree example (#24223)Moshe Kaplan2024-04-011-1/+1
|
* Docs: add more links to PIPE in subprocess docs (#25416)Matthew Davis2024-04-011-5/+8
|
* GH-117337: Deprecate `glob.glob0()` and `glob.glob1()`. (#117371)Barney Gale2024-04-014-1/+47
| | | | These undocumented functions are no longer used by `msilib`, so there's no reason to keep them around.
* gh-77714: Provide an async iterator version of as_completed (GH-22491)Justin Turner Arthur2024-04-015-120/+387
| | | | | | | | | * as_completed returns object that is both iterator and async iterator * Existing tests adjusted to test both the old and new style * New test to ensure iterator can be resumed * New test to ensure async iterator yields any passed-in Futures as-is Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
* Silence compiler warnings in gc.c (#117422)Guido van Rossum2024-04-011-0/+3
|
* gh-94808: Fix refcounting in PyObject_Print tests (GH-117421)Petr Viktorin2024-04-011-0/+4
|
* gh-117142: ctypes: Unify meta tp slot functions (GH-117143)neonene2024-04-013-73/+46
| | | | | | | Integrates the following ctypes meta tp slot functions: * `CDataType_traverse()` into `CType_Type_traverse()`. * `CDataType_clear()` into `CType_Type_clear()`. * `CDataType_dealloc()` into `CType_Type_dealloc()`. * `CDataType_repeat()` into `CType_Type_repeat()`.
* gh-91565: Replace bugs.python.org links with Devguide/GitHub ones (GH-91568)Steve (Gadget) Barnes2024-04-015-5/+9
| | | | | | Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Petr Viktorin <encukou@gmail.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-94808:Improve coverage of PyObject_Print (GH-98749)MonadChains2024-04-018-2/+197
|
* Bump mypy from 1.8.0 to 1.9.0 in /Tools (#117418)dependabot[bot]2024-04-012-4/+2
| | | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* build(deps-dev): bump types-psutil from 5.9.5.20240205 to 5.9.5.20240316 in ↵dependabot[bot]2024-04-011-1/+1
| | | | | | | /Tools (#117417) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* build(deps-dev): bump types-setuptools from 69.1.0.20240301 to ↵dependabot[bot]2024-04-011-1/+1
| | | | | | 69.2.0.20240317 in /Tools (#117419) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump actions/add-to-project from 0.6.0 to 1.0.0 (#117415)dependabot[bot]2024-04-011-1/+1
| | | | Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Doc: printf-style library/stdtype improvements (#16741)Adorilson Bezerra2024-03-311-1/+7
|
* gh-117387 Remove hash mark from introductory text (#117409)Raymond Hettinger2024-03-311-1/+2
|
* gh-102190: Add additional zipfile `pwd=` arg docstrings (gh-102195)Deborah2024-03-311-3/+6
| | | | | | | | This just documents the parameter that already exists. --------- Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* Link to the Python type system specification (#117400)Shantanu2024-03-311-73/+15
|
* GH-114575: Rename `PurePath.pathmod` to `PurePath.parser` (#116513)Barney Gale2024-03-316-119/+123
| | | And rename the private base class from `PathModuleBase` to `ParserBase`.
* gh-117303: Don't detach in `PyThreadState_DeleteCurrent()` (#117304)Sam Gross2024-03-291-2/+0
| | | | | | | | | | | This fixes a crash in `test_threading.test_reinit_tls_after_fork()` when running with the GIL disabled. We already properly handle the case where the thread state is `_Py_THREAD_ATTACHED` in `tstate_delete_common()` -- we just need to remove an assertion. Keeping the thread attached means that a stop-the-world pause, such as for a `fork()`, won't commence until we remove our thread state from the interpreter's linked list. This prevents a crash when the child process tries to clean up the dead thread states.
* gh-116664: In _warnings.c, make filters_version access thread-safe (#117374)Erlend E. Aasland2024-03-291-6/+9
| | | | - assert that the lock is held in already_warned() - protect 'filters_version' increment in warnings_filters_mutated_impl()
* gh-117348: Refactored RawConfigParser._read for similicity and ↵Jason R. Coombs2024-03-292-147/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comprehensibility (#117372) * Extract method for _read_inner, reducing complexity and indentation by 1. * Extract method for _raise_all and yield ParseErrors from _read_inner. Reduces complexity by 1 and reduces touch points for handling errors in _read_inner. * Prefer iterators to splat expansion and literal indexing. * Extract method for _strip_comments. Reduces complexity by 7. * Model the file lines in a class to encapsulate the comment status and cleaned value. * Encapsulate the read state as a dataclass * Extract _handle_continuation_line and _handle_rest methods. Reduces complexity by 8. * Reindent * At least for now, collect errors in the ReadState * Check for missing section header separately. * Extract methods for _handle_header and _handle_option. Reduces complexity by 6. * Remove unreachable code. Reduces complexity by 4. * Remove unreachable branch * Handle error condition early. Reduces complexity by 1. * Add blurb * Move _raise_all to ParsingError, as its behavior is most closely related to the exception class and not the reader. * Split _strip* into separate methods. * Refactor _strip_full to compute the strip just once and use 'not any' to determine the factor. * Replace use of 'sys.maxsize' with direct computation of the stripped value. * Extract has_comments as a dynamic property. * Implement clean as a cached property. * Model comment prefixes in the RawConfigParser within a prefixes namespace. * Use a regular expression to search for the first match. Avoids mutating variables and tricky logic and over-computing all of the starts when only the first is relevant.
* gh-117300: Use stop the world to make `sys._current_frames` and ↵Sam Gross2024-03-292-1/+6
| | | | | | | | | | `sys._current_exceptions` thread-safe. (#117301) This adds a stop the world pause to make the two functions thread-safe when the GIL is disabled in the free-threaded build. Additionally, the main test thread may call `sys._current_exceptions()` as soon as `g_raised.set()` is called. The background thread may not yet reach the `leave_g.wait()` line.
* Fix broken format in error for bad input in summarize_stats.py (#117375)Guido van Rossum2024-03-291-1/+1
| | | When you pass the script a non-existent input file, you get a TypeError instead of the intended ValueError.
* gh-111926: Avoid locking in PyType_IsSubtype (#117275)mpage2024-03-291-8/+1
| | | | | | | | | | | | | Read the MRO in a thread-unsafe way in `PyType_IsSubtype` to avoid locking. Fixing this is tracked in #117306. The motivation for this change is in support of making weakrefs thread-safe in free-threaded builds: `WeakValueDictionary` uses a special dictionary function, `_PyDict_DelItemIf` to remove dead weakrefs from the dictionary. `_PyDict_DelItemIf` removes a key if a user supplied predicate evaluates to true for the value associated with the key. Crucially for the `WeakValueDictionary` use case, the predicate evaluation + deletion sequence is atomic, provided that the predicate doesn’t suspend. The predicate used by `WeakValueDictionary` includes a subtype check, which we must ensure doesn't suspend in free-threaded builds.
* gh-117323: Make `cell` thread-safe in free-threaded builds (#117330)Sam Gross2024-03-2911-43/+83
| | | Use critical sections to lock around accesses to cell contents. The critical sections are no-ops in the default (with GIL) build.
* gh-117344: Skip flaky tests in free-threaded build (#117355)Sam Gross2024-03-292-0/+2
| | | | | The tests are not reliable with the GIL disabled. In theory, they can fail with the GIL enabled too, but the failures are much more likely with the GIL disabled.
* gh-112529: Don't untrack tuples or dicts with zero refcount (#117370)Sam Gross2024-03-291-15/+18
| | | | | | | | The free-threaded GC sometimes sees objects with zero refcount. This can happen due to the delay in merging biased reference counting fields, and, in the future, due to deferred reference counting. We should not untrack these objects or they will never be collected. This fixes the refleaks in the free-threaded build.
* gh-116664: Fix unused var warnings in _warnings.c in non-free-threaded ↵Erlend E. Aasland2024-03-291-0/+8
| | | | | builds (#117373) The warnings were introduced by commit c1712ef06.
* Refactor pdb executable targets (#112570)Tian Gao2024-03-291-41/+36
| | | Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-66449: configparser: Add support for unnamed sections (#117273)Pedro Lacerda2024-03-295-31/+172
| | | Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* gh-117166: Ignore empty and temporary dirs in `test_makefile` (#117190)Nikita Sobolev2024-03-291-2/+10
|
* gh-117347: Fix test_clinic side effects (#117363)Victor Stinner2024-03-291-0/+18
| | | | Save/restore converters in ClinicWholeFileTest and ClinicExternalTest.
* gh-117142: ctypes: Migrate global vars to module state (GH-117189)neonene2024-03-297-224/+237
|
* Fix reversed assertRegex checks in test_ssl. (#117351)Gregory P. Smith2024-03-291-2/+2
|
* gh-117110: Fix subclasses of typing.Any with custom constructors (#117111)傅立业(Chris Fu)2024-03-293-1/+22
|
* gh-117339: Use NULL instead of None for LOAD_SUPER_ATTR in dis docs (GH-117343)Christopher Chianelli2024-03-281-1/+1
|
* GH-117121: Add pystats to JIT builds (GH-117346)Michael Droettboom2024-03-283-1/+10
|
* gh-117335: Handle non-iterables for `ntpath.commonpath` (GH-117336)Nice Zombies2024-03-283-6/+9
|
* Increase the JIT CI timeouts to 75 minutes (GH-117342)Brandt Bucher2024-03-281-7/+5
|
* gh-117294: Report DocTestCase as skipped if all examples in the doctest are ↵Malcolm Smith2024-03-287-7/+87
| | | | skipped (GH-117297)
* gh-69201: Separate stdout and stderr stream in test_pdb (#117308)Tian Gao2024-03-281-16/+17
|
* gh-114331: Skip decimal test_maxcontext_exact_arith on s390x (#117326)Victor Stinner2024-03-281-1/+5
|
* gh-116664: Make module state Py_SETREF's in _warnings thread-safe (#116959)Erlend E. Aasland2024-03-283-23/+44
| | | | | | Mark the swap operations as critical sections. Add an internal Py_BEGIN_CRITICAL_SECTION_MUT API that takes a PyMutex pointer instead of a PyObject pointer.
* bpo-43848: explain optional argument mtime in gzip.py. (GH-25410)Joachim Wuttke2024-03-283-16/+17
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-110481: Fix biased reference counting queue initialization. (#117271)Sam Gross2024-03-282-6/+18
| | | | | The biased reference counting queue must be initialized from the bound (active) thread because it uses `_Py_ThreadId()` as the key in a hash table.
* gh-117178: Recover lazy loading of self-referential modules (#117179)Chris Markiewicz2024-03-283-6/+25
|
* gh-117266: Fix crashes on user-created AST subclasses (GH-117276)Jelle Zijlstra2024-03-284-4/+69
| | | Fix crashes on user-created AST subclasses