Commit Graph

119438 Commits

Author SHA1 Message Date
Nikita Sobolev 86887a2084
gh-111251: Fix error checking in _blake2 module init (#111252)
Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()
2023-10-25 08:32:46 +02:00
Pablo Galindo Salgado 3211d5793f
gh-57129: Add test for inspect.getsource in the REPL (#111197) 2023-10-25 15:15:41 +09:00
Pavel Karateev 8b44f3c54b
Fix first parameter name in `tool` functions from `sys.monitoring` (#111286) 2023-10-24 21:19:54 +00:00
Jokimax c73b0f3560
gh-102956: Fix returning of empty byte strings after seek in zipfile … (#103565)
gh-102956: Fix returning of empty byte strings after seek in zipfile module. This was a regression in 3.12.0 due to a performance enhancement.
2023-10-24 21:15:42 +00:00
Brandt Bucher e5168ff3f8
GH-109214: _SET_IP before _PUSH_FRAME (but not _POP_FRAME) (GH-111001) 2023-10-24 13:27:42 -07:00
InSync c0ea67dd0d
GH-111182: Update EnumType.__contains__ docs (GH-111184) 2023-10-24 10:30:13 -07:00
Jochen Sprickerhof 46407fe79c
gh-109017: Use non alternate name for Kyiv (GH-109251)
tzdata provides Kiev as an alternative to Kyiv:
https://sources.debian.org/src/tzdata/2023c-10/backward/?hl=314#L314

But Debian moved it to the tzdata-legacy package breaking the test:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050530

This patch switches to the name provided by tzdata.

Also check that the new name is actually available.
2023-10-24 20:11:51 +03:00
Zachary Ware c7d68f907a
Revert "Fix a code snippet typo in asyncio docs (#108427)" (GH-111271)
This reverts commit 7f31676340.

The change resulted in a tautology and should not have been made.  There
may be an opportunity for additional clarity in this section, but this
change wasn't it :)

Ref: https://github.com/python/cpython/pull/108427#issuecomment-1777525740
2023-10-24 11:09:13 -05:00
InSync 1198076447
gh-111151: Convert monospaced directives to :ref: (#111152) 2023-10-24 08:22:08 -07:00
Serhiy Storchaka 9bb202a1a9
gh-75666: Tkinter: add tests for binding (GH-111202) 2023-10-24 13:02:12 +03:00
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
Michael Droettboom 81eba76450
gh-110019: Refactor summarize_stats (GH-110398) 2023-10-24 09:57:39 +01: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
Savannah Ostrowski 6640f1d8d2
GH-94438: Restore ability to jump over None tests (GH-111237) 2023-10-23 23:13:16 -07:00
Nikita Sobolev 4fbf20605b
gh-110572: Remove `test_*` from `_testcapi/getargs.c` (GH-111214) 2023-10-24 08:50:11 +03:00
Radislav Chugunov 47d3e2ed93
gh-109894: Fix initialization of static `MemoryError` in subinterpreter (gh-110911)
Fixes #109894

* set `interp.static_objects.last_resort_memory_error.args` to empty tuple to avoid crash on `PyErr_Display()` call
* allow `_PyExc_InitGlobalObjects()` to be called on subinterpreter init

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-10-23 17:06:59 -06: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
hetmankp 3726cb0f14
gh-105931: Fix surprising compileall stripdir behaviour (GH-108671)
Before, the '-s STRIPDIR' option on
compileall lead to some surprising results as it only strips away
path components that match, but leaves alone the non-matching ones
interspersed in between.

For example, with: python -m compileall -s/path/to/another/src
/path/to/build/src/file.py

The resulting written path will be: build/file.py

This fix only strips directories that are a fully matching prefix of the
source path. If a stripdir is provided that is not a valid prefix, a
warning will be displayed (which can be silenced with '-qq').
2023-10-23 13:55:39 +00:00
Mark Shannon 52e902ccf0
GH-109369: Add machinery for deoptimizing tier2 executors, both individually and globally. (GH-110384) 2023-10-23 14:49:09 +01:00
Furkan Onder 32c37fe1ba
gh-67565: Remove redundant C-contiguity checks (GH-105521)
Co-authored-by: Stefan Krah <skrah@bytereef.org>
2023-10-23 12:54:46 +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
Ayappan Perumal 88bac5d504
gh-110828: AIX 32bit build needs -latomic for _testcapi module (#110962) 2023-10-22 22:58:52 +02:00
Tian Gao 767f416feb
gh-110196: Fix ipaddress.IPv6Address.__reduce__ (GH-110198) 2023-10-22 21:50:51 +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
Serhiy Storchaka 6c23635f2b
gh-111085: Fix invalid state handling in TaskGroup and Timeout (#111111)
asyncio.TaskGroup and asyncio.Timeout classes now raise proper RuntimeError
if they are improperly used.

* When they are used without entering the context manager.
* When they are used after finishing.
* When the context manager is entered more than once (simultaneously or
  sequentially).
* If there is no current task when entering the context manager.

They now remain in a consistent state after an exception is thrown,
so subsequent operations can be performed correctly (if they are allowed).

Co-authored-by: James Hilton-Balfe <gobot1234yt@gmail.com>
2023-10-21 22:18:34 +03:00
Nikita Sobolev fd60549c0a
gh-111159: Fix `doctest` output comparison for exceptions with notes (#111160) 2023-10-21 19:02:00 +01:00
Nikita Sobolev 5e7727b052
gh-111157: Mention `__notes__` in `traceback.format_exception_only` docstring (#111158) 2023-10-21 15:30:14 +00:00
Serhiy Storchaka 9a1fe09622
gh-110918: regrtest: allow to intermix --match and --ignore options (GH-110919)
Test case matching patterns specified by options --match, --ignore,
--matchfile and --ignorefile are now tested in the order of
specification, and the last match determines whether the test case be run
or ignored.
2023-10-21 17:44:46 +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
Nikita Sobolev f71cd5394e
gh-110572: Fix potential leaks in test_*_code in _testcapi/getargs.c (GH-110573) 2023-10-21 15:23:09 +03:00
Nikita Sobolev e136e2d640
gh-111155: Fix direct invocation of test_pprint (GH-111156) 2023-10-21 15:09:01 +03:00
Nikita Sobolev 86276fe4f8
gh-110974: Make sure all test_zoneinfo tests are collected (GH-110975)
Test classes from the test_zoneinfo submodule were overridden by
test classes from the test_zoneinfo_property submodule with the same name.
2023-10-21 14:26:03 +03:00
Victor Stinner 7237fb578d
gh-110932: Fix regrtest for SOURCE_DATE_EPOCH (#111143)
If the SOURCE_DATE_EPOCH environment variable is defined, use its
value as the random seed.
2023-10-21 10:37:48 +02: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
YAMAMOTO Takashi 5dfa71769f
gh-111046: for wasi-threads, export memory as well via the linker (GH-111099) 2023-10-20 14:54:03 -07:00
Victor Stinner 0937b11b89
gh-110964: clinic: refactor output_templates() (#110982) 2023-10-20 23:42:02 +02:00
Kirill Podoprigora 7162c3a1e8
gh-111133: Remove unnecessary PyFrozenSet_Check() calls in const folding (GH-111137)
frozenset does not support multiplication.
2023-10-20 23:37:38 +03:00
Nikita Sobolev 124259f9b3
gh-111132: Fix crash on interactive_filename in `run_mod` (#111136) 2023-10-20 21:31:26 +01:00
Victor Stinner 37e4e20eaa
gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)
PyUnicode_AsUTF8() now raises an exception if the string contains
embedded null characters.
2023-10-20 20:04:27 +02:00
Nikita Sobolev ea7c26e4b8
gh-111126: Use `isinstance` instead of `assert[Not]IsInstance` in `test_typing` (#111127) 2023-10-20 18:03:32 +00: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
Sam Gross 264f4af506
gh-111119: Fix flaky test test_lock_two_threads (gh-111124) 2023-10-20 16:51:34 +00:00