Commit Graph

27307 Commits

Author SHA1 Message Date
Serhiy Storchaka b8c20f9049
gh-97928: Change the behavior of tkinter.Text.count() (GH-98484)
It now always returns an integer if one or less counting options are specified.
Previously it could return a single count as a 1-tuple, an integer (only if
option "update" was specified) or None if no items found.
The result is now the same if wantobjects is set to 0.
2023-10-24 12:59:19 +03:00
James Tocknell 6b9babf140
Fix typo in sys docs (#111196)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-24 11:03:35 +03:00
Hugo van Kemenade 96cbd1e1db
gh-101100: Fix Sphinx warnings for `fileno` (#111118) 2023-10-23 13:05:56 -06:00
Anthony Shaw be551a7d0e
Add a version added note for PY_VECTORCALL_ARGUMENTS_OFFSET (#110963) 2023-10-23 19:00:52 +03:00
Don Patterson 94c2ddfcd7
typo: missing line of output in pull parser example (#111068) 2023-10-23 18:54:29 +03:00
Pablo Martí Gamboa 46cea34d54
Fix typo in 3.13's whatsnew (#111215) 2023-10-23 18:43:08 +03:00
Nick c84b0390c0
gh-110383: Italicize variable name (#111206) 2023-10-23 07:56:36 +00:00
Nick 1172d02f9f
gh-110383: Added explanation about simplest regex use case for quantifiers. (#111110)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-23 10:22:17 +03:00
Hugo van Kemenade b845a9e145
gh-109975: What's new in 3.13: Add module headers to removals and sort (#110994) 2023-10-22 12:45:17 -06:00
Nikita Sobolev 8c689c9b88
gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst` (GH-111179)
* gh-101100: Fix sphinx warnings in `library/asyncio-dev.rst`

* Update Doc/library/asyncio-eventloop.rst

* Update Doc/library/asyncio-eventloop.rst

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2023-10-22 17:11:57 +00:00
Maciej Olko 663cf513b0
gh-101100: Fix Sphinx warning in `tutorial/introduction.rst` (#111173) 2023-10-22 14:53:17 +03:00
Hugo van Kemenade c9c4a87f5d
gh-109975: What's new in 3.13: Add PEP 594 to release highlights (#110993) 2023-10-22 10:17:03 +03:00
Irit Katriel b578e51f02
gh-111123: symtable should visit exception handlers before the else block (#111142) 2023-10-21 13:38:29 +01:00
Gouvernathor b07f23259d
gh-106310 - document the __signature__ attribute (#106311)
Document the __signature__ attribute

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-21 08:54:02 +10:00
Victor Stinner f1e751e933
gh-111089: PyUnicode_AsUTF8AndSize() sets size on error (#111106)
On error, PyUnicode_AsUTF8AndSize() now sets the size argument to -1,
to avoid undefined value.
2023-10-20 20:03:11 +02:00
Victor Stinner d8f32be5b6
gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)
Add PyUnicode_AsUTF8() function to the limited C API.

multiprocessing posixshmem now uses PyUnicode_AsUTF8() instead of
PyUnicode_AsUTF8AndSize(): the extension is built with the limited C
API. The function now raises an exception if the filename contains an
embedded null character instead of truncating silently the filename.
2023-10-20 19:29:27 +02:00
Victor Stinner d731579bfb
gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)
* PyUnicode_AsUTF8() now raises an exception if the string contains
  embedded null characters.
* Update related C API tests (test_capi.test_unicode).
* type_new_set_doc() uses PyUnicode_AsUTF8AndSize() to silently
  truncate doc containing null bytes.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-20 17:59:29 +02:00
Hugo van Kemenade c42c68aa7b
gh-101100: Fix Sphinx warnings in `library/tty.rst` (#111079)
Fix Sphinx warnings in library/tty.rst
2023-10-20 07:33:17 +03:00
Victor Stinner 8d234cd315
gh-85283: Build posixshmem extension with Limited C API (#111087)
Build the _multiprocessing.posixshmem extension with the Limited C
API.

* Add <errno.h> include.
* Replace PyUnicode_AsUTF8() with PyUnicode_AsUTF8AndSize().
2023-10-20 00:23:49 +02:00
Unique-Usman bcc941bd4a
gh-109510: Clearly explain "Which Docstrings Are Examined" (#109696)
Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
Co-authored-by: Jacob Coffee <jacob@z7x.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-10-19 18:10:06 +03:00
Adam Turner 63acf78d71
GH-101100: Fix reference warnings for ``__enter__`` and ``__exit__`` (#110112) 2023-10-19 18:05:17 +03:00
Adam Turner da99133710
GH-101100: Fix reference warnings for ``__getitem__`` (#110118) 2023-10-19 18:05:05 +03:00
Nikita Sobolev d144749914
gh-101100: Fix sphinx warnings in `library/getpass.rst` (#110461) 2023-10-19 18:04:29 +03:00
Nikita Sobolev a89708aeea
gh-101100: Fix sphinx warnings in `library/codecs.rst` (#110979) 2023-10-19 17:20:52 +03:00
Tian Gao 1991694117
GH-103082: Clean up the sys.monitoring docs (GH-110532) 2023-10-18 16:15:42 -07:00
Tian Gao d9246c7b73
GH-104232: Fix statement about trace return values (GH-110516) 2023-10-18 13:24:00 -07:00
Tian Gao e6eb8cafca
GH-102895 Add an option local_exit in code.interact to block exit() from terminating the whole process (GH-102896) 2023-10-18 11:36:43 -07:00
Hugo van Kemenade 411d6a638e
gh-109975: What's new in 3.13: longer full support (#110997) 2023-10-17 21:42:28 -07:00
Victor Stinner e7ae43ad7d
Regen Doc/requirements-oldest-sphinx.txt (#111012)
Fix https://github.com/python/cpython/security/dependabot/4: use
urllib3 version 2.0.7.
2023-10-18 07:21:35 +03:00
Victor Stinner 73a003f646
gh-85283: Build _uuid extension with limited C API (#111010) 2023-10-17 23:07:12 +00:00
Victor Stinner 7029c1a1c5
gh-85283: Build _scproxy extension with limited C API (#111008)
* Replace Py_SETREF(v, NULL) with Py_CLEAR(v).
* Reformat the code.
2023-10-17 22:32:53 +00:00
Victor Stinner e37620edfd
gh-85283: Build resource extension with limited C API (#110989)
* Replace PyStructSequence_SET_ITEM() with
  PyStructSequence_SetItem().
* Replace PyTuple_GET_SIZE() with PyTuple_Size().
* Replace PyTuple_GET_ITEM() with PyTuple_GetItem().
2023-10-17 23:52:58 +02:00
Victor Stinner 232465204e
gh-85283: Add PySys_Audit() to the limited C API (#108571)
The PySys_Audit() function was added in Python 3.8 by the PEP 578
"Python Runtime Audit Hooks".

Add also PySys_AuditTuple() to the limited C API, function added
to Python 3.13.

Move non-limited "PerfMap" C API from Include/sysmodule.h to
Include/cpython/sysmodule.h.
2023-10-17 16:02:23 +02:00
Victor Stinner 6db6b30ac2
gh-85283: Build winsound extension with limited C API (#110978)
Replace type->tp_name with PyType_GetQualName().
2023-10-17 15:57:10 +02:00
Matthieu Dartiailh 198aa67d4c
gh-107457: update dis documentation with changes in 3.12 (#108900) 2023-10-17 12:59:34 +00:00
Victor Stinner 4dba0a6d87
gh-85283: Build md5 extension with limited C API (#110967)
* Replace _Py_strhex() with few lines of code.
* Replace _PyType_GetModuleState() with PyType_GetModuleState().
* Fix make check-c-globals.
2023-10-17 10:57:41 +00:00
Victor Stinner 37bd8726b8
gh-85283: Build errno and _ctypes_test with limited C API (#110955)
_testimportmultiple is now built with limited C API version 3.2.
2023-10-17 01:05:20 +00:00
Victor Stinner cc71cc9256
gh-85283: Add PyMem_RawMalloc() to the limited C API (#108570)
Add PyMem_RawMalloc(), PyMem_RawCalloc(), PyMem_RawRealloc() and
PyMem_RawFree() to the limited C API.

These functions were added by Python 3.4 and are needed to port
stdlib extensions to the limited C API, like grp and pwd.

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-10-17 02:41:51 +02:00
Victor Stinner cf9c25c719
gh-85283: Build _testimportmultiple with limited C API (#110954) 2023-10-17 02:27:15 +02:00
Mienxiu f07ca27709
C-API docs: Clarify the size of arenas (#110895)
Clarify the size of arenas

From 3.10.0 alpha 7, the pymalloc allocator uses arenas with a fixed size of 1
MiB on 64-bit platforms instead of 256 KiB on 32-bit platforms.
2023-10-16 19:52:13 +01:00
Nikita Sobolev bfc1cd8145
gh-110527: Improve `PySet_Clear` docs (#110528) 2023-10-16 15:05:09 +02:00
Karolina Surma db656aebc6
sysconfig docs: fix broken link to the source code (#110920)
It's now a package. See: 4a53a397c3
2023-10-16 12:27:12 +01:00
partev 42a5d21d46
gh-110886 Doc: add a link to BNF Wikipedia article (#110887)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-10-15 10:52:13 -06:00
Łukasz Langa 84b7e9e3fa
gh-110722: Add PYTHON_PRESITE to import a module before site.py is run (#110769) 2023-10-14 23:32:57 +02:00
Nikita Sobolev 12deda7633
gh-101100: Fix sphinx warnings in `library/time.rst` (#110862) 2023-10-14 16:20:19 +02:00
Serhiy Storchaka 38bd2c520a
gh-88434: Emit deprecation warnings for non-integer numbers in gettext if translation not found (GH-110574) 2023-10-14 09:07:02 +03:00
Nikita Sobolev 45cfabb842
gh-101100: Fix sphinx warnings in `usage/cmdline.rst` (#110841) 2023-10-14 08:05:46 +02:00
Serhiy Storchaka 7284e0ef84
gh-110815: Support non-ASCII keyword names in PyArg_ParseTupleAndKeywords() (GH-110816)
It already mostly worked, except in the case when invalid keyword
argument with non-ASCII name was passed to function with non-ASCII
parameter names. Then it crashed in the debug mode.
2023-10-14 08:50:03 +03:00
paskozdilar f81e36f700
gh-110703: Add asyncio.wait_for() change notes for 3.11 (GH-110818)
* Remove redundant versionchanged

* Add missing versionchanged

* Update Doc/library/asyncio-task.rst

Co-authored-by: Kumar Aditya <kumaraditya@python.org>

---------

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2023-10-13 15:15:28 +02:00
Petr Viktorin 2ab34f0e42
gh-110803: Reorganize docs for what PyType_Slot doesn't cover (GH-110813)
* gh-110803: Reorganize docs for what PyType_Slot doesn't cover

- Cover the offset fields first
- Mention the old alternative for MANAGED flags, which is needed
  to support older Pythons
- De-emphasize the internal flags: use an inline list.
- Add a note to PyMemberDef saying what to do with it

* Remove an older draft...
2023-10-13 14:51:48 +02:00