Commit Graph

120117 Commits

Author SHA1 Message Date
Delgan 471aa75241
Update ConfigParser docs defining valid section name (#110506) 2023-12-30 16:18:06 -07:00
Ronald Oussoren f48a1bcb29
gh-89414: Document that SIGCLD is not available on macOS (#113580)
Document that SIGCLD is not available on macOS
2023-12-30 16:19:47 +01:00
Samet YASLAN 88cb972000
gh-112536: Add support for thread sanitizer (TSAN) (gh-112648) 2023-12-30 17:17:02 +09:00
Ankit Kumar Pandey f46987b828
gh-103708: Make directory layout in sysconfig implementation configurable (#103709) 2023-12-29 17:55:17 +00:00
Kirill Podoprigora cf34b7704b
gh-103092: Make ``pyexpat`` module importable in sub-interpreters (#113555) 2023-12-29 18:43:46 +05:30
Barney Gale 6ca0e6754e
GH-113528: Remove a couple of expensive pathlib ABC tests (#113534)
Run expensive tests for walking and globbing from `test_pathlib` but not
`test_pathlib_abc`. The ABCs are not as tightly optimised as the classes
in top-level `pathlib`, and so these tests are taking rather a long time on
some buildbots. Coverage of the main `pathlib` classes should suffice.
2023-12-28 22:44:29 +00:00
Barney Gale b664d91599
GH-113225: Speed up `pathlib._abc.PathBase.glob()` (#113556)
`PathBase._scandir()` is implemented using `iterdir()`, so we can use its
results directly, rather than passing them through `_make_child_relpath()`.
2023-12-28 22:23:01 +00:00
John Hawkinson db1c882239
Doc/library/os.rst: `os.waitid` absent on MacOS (#104558)
* Doc/library/os.rst: `os.waitid` absent on MacOS

Co-authored-by: AN Long <aisk@users.noreply.github.com>
2023-12-28 20:36:20 +01:00
Hugo van Kemenade 8e5d70f4b6
gh-101100: Fix Sphinx warnings in library/random.rst (#112981)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-28 12:29:12 -07:00
Nikita Sobolev fba324154e
gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (#113544) 2023-12-28 19:58:06 +01:00
Zackery Spytz f108468970
bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (GH-19856)
Always include <sys/types.h> before <sys/sysmacros.h>.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-28 12:47:44 +02:00
Kirill Podoprigora f1676867b5
gh-103092: Make `_elementtree` module importable in sub-interpreters (#113434)
Enable imports of _elementtree module in sub-interpreters
2023-12-28 14:42:21 +05:30
Ronald Oussoren cc13eabc7c
gh-110459: Make sure --with-openssl-rpath works on macOS (#113441)
* gh-110459: Make sure --with-openssl-rpath works on macOS

On macOS the `-rpath` linker flag is spelled differently
than on on platforms.
2023-12-28 09:42:05 +01:00
Inada Naoki bfee2f77e1
gh-73427: deprecate `_enablelegacywindowsfsencoding` (#107729) 2023-12-28 17:31:19 +09:00
Erlend E. Aasland 7ab9efdd6a
gh-113299: Move cpp.py into libclinic (#113526) 2023-12-28 00:20:57 +01:00
Erlend E. Aasland 87295b4068
gh-113317: Rework Argument Clinic cpp.py error handling (#113525)
Rework error handling in the C preprocessor helper. Instead of monkey-
patching the cpp.Monitor.fail() method from within clinic.py, rewrite
cpp.py to use a subclass of the ClinicError exception. As a side-effect,
ClinicError is moved into Tools/clinic/libclinic/errors.py.

Yak-shaving in preparation for putting cpp.py into libclinic.
2023-12-27 21:43:19 +00:00
Terry Jan Reedy 6c98fce33a
gh-57795: Add news to idlelib/News3.txt (#113522) 2023-12-27 15:51:49 -05:00
Stanley 0651936ae2
gh-67641: Clarify documentation on bytes vs text with non-seeking tarfile stream (GH-31610) 2023-12-27 17:16:36 +00:00
Jeffrey Kintscher c66b577d9f
bpo-26791: Update shutil.move() to provide the same symlink move behavior as the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759) 2023-12-27 16:23:42 +00:00
Barney Gale 1b19d73768
GH-110109: pathlib ABCs: drop use of `warnings._deprecated()` (#113419)
The `pathlib._abc` module will be made available as a PyPI backport
supporting Python 3.8+. The `warnings._deprecated()` function was only
added last year, and it's private from an external package perspective, so
here we switch to `warnings.warn()` instead.
2023-12-27 15:40:03 +00:00
Barney Gale f8b6e171ad
GH-110109: pathlib ABCs: drop use of `io.text_encoding()` (#113417)
Do not use the locale-specific default encoding in `PathBase.read_text()`
and `write_text()`. Locale settings shouldn't influence the operation of
these base classes, which are intended mostly for implementing rich paths
on *nonlocal* filesystems.
2023-12-27 15:32:35 +00:00
Zackery Spytz 712afab5ac
gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593)
Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 16:27:40 +02:00
Zackery Spytz 1ddd773293
gh-64020: Deprecate pydoc.ispackage() (GH-20908)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 14:04:31 +00:00
Hugo van Kemenade 4acf825058
gh-101100: Fix Sphinx warnings in `library/cmd.rst` (#113502)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-27 12:17:30 +02:00
Hugo van Kemenade fb02b66960
gh-101100: Fix Sphinx warnings in `library/calendar.rst` (#113500) 2023-12-27 09:36:17 +00:00
Vinay Sajip 67655d8ad5
gh-111615: Fix regression in QueueHandler configuration. (GH-111638) 2023-12-27 09:35:15 +00:00
Vaishnavi Maheshwari 00cdd416fc
gh-113350: Improve the wording of python logging docs to remove an ambiguity around use of the word "higher". (GH-113491)
Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
2023-12-27 07:51:45 +00:00
David Benjamin af2b8f6845
gh-113332: Simplify calls to SSL_(CTX_)set_verify in _ssl.c (#113333)
_ssl.c currently tries to preserve the verification callback, but at no
point does it ever set one. Just pass in NULL.
2023-12-26 16:35:41 -05:00
Hugo van Kemenade 2b53c767de
gh-101100: Fix Sphinx warnings in `library/bisect.rst` (#113496) 2023-12-26 14:12:15 -07:00
Hugo van Kemenade 4e67644d36
gh-101100: Fix Sphinx warnings in `howto/isolating-extensions.rst` (#113493) 2023-12-26 12:40:48 -07:00
Gordon P. Hemsley 4b2c3e8e43
bpo-36959: Fix error messages for invalid ISO format string in _strptime() (GH-13408)
Previously some error messages complained about incompatible
combinations of directives that are not contained in the format string.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-26 19:26:17 +00:00
Donghee Na e5cce70df7
gh-112532: Fix peg generator build.py for mimalloc build (gh-113492)
gh-112532: Fix peg generator for mimalloc build
2023-12-27 02:54:16 +09:00
Sam Gross acf3bcc886
gh-112532: Use separate mimalloc heaps for GC objects (gh-113263)
* gh-112532: Use separate mimalloc heaps for GC objects

In `--disable-gil` builds, we now use four separate heaps in
anticipation of using mimalloc to find GC objects when the GIL is
disabled. To support this, we also make a few changes to mimalloc:

* `mi_heap_t` and `mi_tld_t` initialization is split from allocation.
  This allows us to have a `mi_tld_t` per-`PyThreadState`, which is
  important to keep interpreter isolation, since the same OS thread may
  run in multiple interpreters (using different PyThreadStates.)

* Heap abandoning (mi_heap_collect_ex) can now be called from a
  different thread than the one that created the heap. This is necessary
  because we may clear and delete the containing PyThreadStates from a
  different thread during finalization and after fork().

* Use enum instead of defines and guard mimalloc includes.

* The enum typedef will be convenient for future PRs that use the type.
* Guarding the mimalloc includes allows us to unconditionally include
  pycore_mimalloc.h from other header files that rely on things like
  `struct _mimalloc_thread_state`.

* Only define _mimalloc_thread_state in Py_GIL_DISABLED builds
2023-12-27 01:53:20 +09:00
Donghee Na 8f5b998706
gh-111971: Make _PyUnicode_FromId thread-safe in --disable-gil (gh-113489) 2023-12-26 16:48:33 +00:00
Hugo van Kemenade 36adc79041
Docs: make htmllive: open browser when ready (#113288) 2023-12-26 05:02:13 -07:00
Serhiy Storchaka 8a3d0e4a66
gh-113468: Remove the "_new_ suffix from class names in pydocfodder (GH-113469) 2023-12-26 12:54:05 +02:00
Serhiy Storchaka e87cadc1ce
gh-66515: mailbox.MH now supports folders withou the ".mh_sequences" file (GH-804)
(for example Claws Mail IMAP-cache folders).
2023-12-26 11:15:14 +02:00
Raymond Hettinger b5dc0f83ad
Misc minor improvements to the itertools recipes (gh-113477) 2023-12-25 16:26:04 -06:00
Yilei Yang 48c49739f5
gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. (GH-113035)
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-12-25 19:36:59 +02:00
Zackery Spytz 3f5eb3e6c7
bpo-21360: mailbox.Maildir now ignores files with a leading dot (GH-11833)
The maildir format specification states that files with a leading dot
should be ignored.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-25 17:07:51 +02:00
denballakh f7c5a7a0f9
fix bullet-list in `LOAD_SUPER_ATTR` documentation on `dis` page (#113461) 2023-12-24 12:28:39 -08:00
Mark Shannon 9a35794fcb
GH-111485: Fix handling of FOR_ITER in Tier 2 (GH-113394) 2023-12-24 10:07:34 -08:00
Serhiy Storchaka 0c574540e0
gh-113407: Fix import of unittest.mock when CPython is built without docstrings (GH-113408) 2023-12-24 13:38:56 +02:00
Alex Waygood 0d74e9683b
Add codeowners for `Lib/ensurepip/` (#112805) 2023-12-24 11:09:50 +00:00
Serhiy Storchaka 1f06baeabd
gh-113191: Add support of os.fchmod() on Windows (GH-113192)
Also support a file descriptor in os.chmod().
2023-12-24 10:57:11 +00:00
Serhiy Storchaka 53330f1677
gh-113440: Ignore the "ver" command failure with exit code 0xc0000142 (GH-113435) 2023-12-24 12:31:23 +02:00
Xu Song ce77ee5035
gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423) 2023-12-24 12:04:12 +02:00
Jeff Allen 08398631a0
gh-113028: Correctly memoize str in pickle when escapes added (GH-113436)
This fixes a divergence between the Python and C implementations of pickle
for protocol 0, such that it pickle.py fails to re-use the first pickled
representation of strings involving characters that have to be escaped.
2023-12-24 11:43:44 +02:00
Kirill Podoprigora 894f0e573d
gh-111784: Fix two segfaults in the elementtree module (GH-113405)
First fix resolve situation when pyexpat module (which contains expat_CAPI
capsule) deallocates before _elementtree, so we need to hold a strong
reference to pyexpat module to.

Second fix resolve situation when module state is deallocated before
deallocation of XMLParser instances, which uses module state to clear
some stuff.
2023-12-24 10:57:41 +02:00
Yilei Yang 050783cb37
gh-112559: Avoid unnecessary conversion attempts to enum_klass in signal.py (#113040) 2023-12-23 17:07:52 -08:00