Commit graph

27463 commits

Author SHA1 Message Date
Taylor Packard ed8720ace4
gh-112758: Updated pathlib documentation for PurePath.match (#112814) 2023-12-08 18:13:17 +00:00
Alex Waygood ed21d0c1f4
gh-101100: Improve documentation for attributes on instance methods (#112832) 2023-12-08 13:18:53 +00:00
Alex Waygood e4c0876033
gh-101100: Fix Sphinx nits in library/contextlib.rst (#112870) 2023-12-08 13:17:57 +00:00
Alex Waygood 3cdcc2edf8
gh-101100: Fix Sphinx nitpicks in library/shelve.rst (#112836) 2023-12-08 14:31:11 +02:00
Serhiy Storchaka 4ac1e8fb25
Add a versionchanged directive for gh-94692 (GH-112846)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-08 10:18:15 +02:00
Alex Waygood 2c3906bc4b
gh-101100: Silence Sphinx warnings when ntpath or posixpath are referenced (#112833) 2023-12-07 20:57:30 +00:00
Eric Snow 64d8b4c709
gh-112826: Add a "What's New" Entry About _thread._is_main_interpreter (gh-112853)
As of gh-112661, the threading module expects the _thread module to have a _is_main_interpreter(), which is used in the internal threading._shutdown().  This change causes a problem for anyone that replaces the _thread module with a custom one (only if they don't provide _is_main_interpreter()).  They need to be sure to add it for 3.13+, thus this PR is adding a note in "What's New".

This also forward-ports the "What's New" entry from 3.12 (gh-112850).  Note that we do not also forward-port the fix in that PR.  The fix is there only due to a regression from 3.12.0. There is no regression in 3.13+.
2023-12-07 13:22:15 -07:00
Tian Gao 3d712a9f4c
gh-102980: Redirect output of pdb's interact command, add tests and improve docs (#111194) 2023-12-07 11:19:33 +00:00
Pablo Galindo Salgado 16448cab44
gh-112730: Use color to highlight error locations (gh-112732)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-12-06 23:29:54 +01:00
Alex Waygood 3870d19d15
gh-101100: Fix Sphinx nitpicks in library/reprlib.rst (#112811) 2023-12-06 20:16:12 +00:00
Alex Waygood e9707d3c3d
gh-101100: Improve documentation of code object attributes (#112781) 2023-12-06 20:15:46 +00:00
Victor Stinner 828451dfde
gh-111545: Add Py_HashPointer() function (#112096)
* Implement _Py_HashPointerRaw() as a static inline function.
* Add Py_HashPointer() tests to test_capi.test_hash.
* Keep _Py_HashPointer() function as an alias to Py_HashPointer().
2023-12-06 15:09:22 +01:00
Victor Stinner f8852634ed
gh-108223: Refer to PEP 703 as Free Threading (#112780) 2023-12-06 12:55:58 +01:00
Christopher Chavez 00cce0fe49
gh-111178: Docs: fix traverseproc, inquiry, and destructor parameters in slot typedefs table (GH-112742)
In the slot typedefs table, the parameter of `destructor`
and the first parameter of `traverseproc` should both be
`PyObject *` rather than `void *`.
Same for `inquiry`.
2023-12-06 10:44:41 +01:00
Alex Waygood e3f670e137
gh-101100: Fix most Sphinx nitpicks in the glossary and stdtypes.rst (#112757) 2023-12-06 08:44:06 +00:00
Alex Waygood d109f637c0
gh-101100: Properly document frame object attributes (#112735) 2023-12-05 19:27:59 +00:00
Jurjen N. E. Bos c2e2df8356
Minor stylistic edit to the grouper recipe (gh112759) 2023-12-05 12:44:06 -06:00
Ethan Furman de6bca9564
gh-112328: [Enum] Make some private attributes public. (GH-112514)
* [Enum] Make some private attributes public.

- ``_EnumDict`` --> ``EnumDict``
- ``EnumDict._member_names`` --> ``EnumDict.member_names``
- ``Enum._add_alias_``
- ``Enum._add_value_alias_``

---------

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-05 08:27:36 -08:00
Alex Waygood 2f20cafdbf
gh-101100: Fix many easily solvable Sphinx nitpicks in the datamodel docs (#112737) 2023-12-05 09:59:52 +00:00
Jeffrey Kintscher 268415bbb3
gh-81441: shutil.rmtree() FileNotFoundError race condition (GH-14064)
Ignore missing files and directories while enumerating
directory entries in shutil.rmtree().

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-05 09:33:51 +00:00
Rune Tynan b31232ddf7
gh-62897: Update PyUnicode C API parameter names (GH-12680)
Standardize PyUnicode C API parameter names across the documentation.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-05 11:21:09 +02:00
pan324 81ee026091
gh-82300: Add track parameter to multiprocessing.shared_memory (#110778)
Add a track parameter to shared memory to allow resource tracking via the side-launched resource tracker process to be disabled on platforms that use it (POSIX).

This allows people who do not want automated cleanup at process exit because they are using the shared memory with processes not participating in Python's resource tracking to use the shared_memory API.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-12-05 00:11:44 -08:00
Constantin Hong aa5bee30ab
gh-102130: Support tab completion in cmd for Libedit. (GH-107748)
---

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-12-05 08:24:56 +01:00
Amioplk a8ce149628
gh-112671: Fixing typo in the Macro Docs (GH-112715)
Replace Py_T_STRING_INLINE with Py_T_STRING_INPLACE
2023-12-04 22:52:06 +02:00
Kamil Turek a1551b48ee
gh-103363: Add follow_symlinks argument to pathlib.Path.owner() and group() (#107962) 2023-12-04 19:42:01 +00:00
Alex Waygood 9560e0d6d7
gh-101100: Fix Sphinx nitpicks in library/abc.rst (#112703) 2023-12-04 12:42:24 +00:00
Serhiy Storchaka c74e9fb189
gh-110275: Named tuple's __replace__() now raises TypeError for invalid arguments (GH-110299) 2023-12-04 13:30:32 +02:00
Serhiy Storchaka da6760bdf5
gh-65210: Add const qualifiers in PyArg_VaParseTupleAndKeywords() (GH-105958)
Change the declaration of the keywords parameter in functions
PyArg_ParseTupleAndKeywords() and PyArg_VaParseTupleAndKeywords() from `char **`
to `char * const *` in C and `const char * const *` in C++.

It makes these functions compatible with argument of type `const char * const *`,
`const char **` or `char * const *` in C++ and `char * const *` in C
without explicit type cast.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-12-04 13:14:56 +02:00
Alex Waygood cda737924f
gh-101100: Fix Sphinx nitpicks in library/functions.rst (#112669) 2023-12-04 11:05:20 +00:00
Serhiy Storchaka dee7beeb4f
bpo-34392: Add sys. _is_interned() (GH-8755) 2023-12-04 11:09:06 +02:00
Hugo van Kemenade 489aeac3a2
gh-101100: Fix Sphinx warning in library/gettext.rst (#112668)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-03 20:23:09 +00:00
Alex Waygood 45650d1c47
gh-101100: Fix most Sphinx nitpicks in inspect.rst (#112662) 2023-12-03 17:32:49 +00:00
Marco Aurélio A. Barbosa c27b09c813
Fix link to 'The Perils of Floating Point', on the tutorial (GH-112499)
Use author link to 'The Perils of Floating Point'.
2023-12-03 17:14:14 +02:00
Irit Katriel 97857ac058
gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659) 2023-12-03 14:02:37 +00:00
Alex Waygood 4ed46d2244
Run more inspect.rst code snippets in CI (#112654) 2023-12-03 11:50:22 +00:00
Victor Stinner a971574b73
gh-111545: Mention PEP 456 in PyHash_GetFuncDef() doc (#112647) 2023-12-03 11:21:48 +00:00
Alex Waygood fc9e24b01f
gh-112316: improve docs for inspect.signature and inspect.Signature (#112631) 2023-12-03 01:37:34 -08:00
Nikita Sobolev a9574c68f0
gh-112139: Add inspect.Signature.format and use it in pydoc (#112143)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-12-02 15:39:43 -08:00
Hugo van Kemenade 0229d2a9b1
Docs: Use sphinx-notfound-page to show a nicer 404 page (#111084) 2023-12-02 17:41:40 +00:00
Nikita Sobolev a74daba7ca
gh-112316: Improve docs of inspect.signature and Signature.from_callable (#112317)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-02 13:13:44 +00:00
William Wen 939fc6d6ea
gh-106922: Support multi-line error locations in traceback (attempt 2) (#112097) 2023-12-01 22:18:16 +00:00
Victor Stinner 5f6ac2d88a
gh-110481: Fix Py_SET_REFCNT() integer overflow (#112174)
If Py_NOGIL is defined and Py_SET_REFCNT() is called with a reference
count larger than UINT32_MAX, make the object immortal.

Set _Py_IMMORTAL_REFCNT constant type to Py_ssize_t to fix the
following compiler warning:

Include/internal/pycore_global_objects_fini_generated.h:14:24:
warning: comparison of integers of different signs: 'Py_ssize_t'
(aka 'long') and 'unsigned int' [-Wsign-compare]

    if (Py_REFCNT(obj) < _Py_IMMORTAL_REFCNT) {
        ~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~
2023-12-01 15:50:16 +01:00
Tian Gao c2982380f8
gh-112510: Add readline.backend for the backend readline uses (GH-112511)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Donghee Na <donghee.na92@gmail.com>
2023-12-01 14:05:55 +00:00
William Andrea f6afa426d8
Add links under "generator expression" in glossary (#112537) 2023-12-01 00:41:11 -08:00
Alperen Serkan Aksöz 730d450d43
gh-112502: Docs: Improve docs for gc.collect method (#112562)
* Docs: Improve docs for gc.collect method

* Update gc.rst
2023-11-30 21:04:00 +00:00
Matt Prodani 1ff212debd
gh-111699: Move smtpd note to dedicated section in What's New Python 3.12 doc (GH-112544)
Relocate smtpd deprecation notice to it's own section rather than under
'locale' in docs for What's New in Python 3.12 doc
2023-11-30 14:53:19 +02:00
Jelle Zijlstra d4a6229afe
gh-104003: Implement PEP 702 (#104004)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-29 09:38:29 -08:00
Ethan Furman f9e6ce0395
[Enum] update class creation for RuntimeError changes (GH-111815) 2023-11-28 20:40:12 -08:00
Grant Ramsay e413daf5f6
gh-112454: Disable TLS-PSK if OpenSSL was built without PSK support (#112491)
If OpenSSL was built without PSK support, the python TLS-PSK
methods will raise "NotImplementedError" if called.

Add a constant "ssl.HAS_PSK" to check if TLS-PSK is supported
2023-11-28 16:15:39 -08:00
Hugo van Kemenade 3fdf7ae3d1
gh-110930: Correct book title by Alan D. Moore (#112490) 2023-11-28 16:46:00 +02:00