Commit graph

119514 commits

Author SHA1 Message Date
Tian Gao a254120f2f
GH-94438: Fix RuntimeWarning for jump tests in test_sys_settrace (GH-111341) 2023-10-26 11:47:51 -07:00
zcxsythenew b468538d35
GH-111293: Fix DirEntry.inode dropping higher bits on Windows (GH-111294) 2023-10-26 17:37:52 +01:00
Irit Katriel a0c414c35d
gh-111354: define names for RESUME oparg values (#111365) 2023-10-26 16:30:18 +01:00
Serhiy Storchaka 309efb39dc
gh-111259: Optimize recursive wildcards in pathlib (GH-111303)
Regular expression pattern `(?s:.)` is much faster than `[\s\S]`.
2023-10-26 18:07:06 +03:00
Irit Katriel 67a91f78e4
gh-109094: replace frame->prev_instr by frame->instr_ptr (#109095) 2023-10-26 13:43:10 +00:00
Serhiy Storchaka 573eff3e2e
Output more details in the re tracing (GH-111357) 2023-10-26 16:42:42 +03:00
Nikita Sobolev 31c05b72c1
gh-111348: Fix direct invocation of test_doctest; remove test_doctest.test_coverage (#111349)
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2023-10-26 12:45:39 +00:00
Mark Shannon b0699aa544
GH-111213: Fix a few broken stats (GH-111216) 2023-10-26 11:33:12 +01:00
Mark Shannon 5c9d4497ab
GH-111339: Change valid property of executors to is_valid() method (GH-111350) 2023-10-26 11:31:51 +01:00
Batuhan Taskaya 78e6d72e38
bpo-43950: handle wide unicode characters in tracebacks (#28150) 2023-10-26 07:05:29 +00:00
Pablo Galindo Salgado 90a1b2859f
gh-67224: Show source lines in tracebacks when using the -c option when running Python (#111200) 2023-10-26 15:17:28 +09:00
Tian Gao 3f84a19e62
Docs: Add restart_events() and positional arg semantics for sys.monitoring (#111291)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-25 18:03:32 +00:00
Khalil Mouawad 14f52e1548
gh-110679: Improved markup in enum.rst (GH-110747) 2023-10-25 10:32:09 -07:00
Irit Katriel 0db2517687
gh-100762: Fix optimization in gen_close (#111069) 2023-10-25 16:22:34 +01:00
Serhiy Storchaka a4981921aa
gh-111165: Add missed "support." prefix for "verbose" (GH-111327) 2023-10-25 14:50:25 +00:00
Erlend E. Aasland 1262e41842
gh-108590: Improve sqlite3 docs on encoding issues and how to handle those (#108699)
Add a guide for how to handle non-UTF-8 text encodings.
Link to that guide from the 'text_factory' docs.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Corvin <corvin@corvin.dev>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-10-25 15:58:00 +02:00
Hugo van Kemenade 81ed80d843
gh-111187: Postpone removal version for locale.getdefaultlocale() to 3.15 (#111188) 2023-10-25 16:47:41 +03:00
Nikita Sobolev f6304949bb
gh-111230: Fix errors checking in _ssl module init (#111232)
Introduce ADD_INT_CONST macro wrapper for PyModule_AddIntConstant()
2023-10-25 15:42:18 +02:00
Serhiy Storchaka 9da98c0d9a
gh-111174: Fix crash in getbuffer() called repeatedly for empty BytesIO (GH-111210) 2023-10-25 13:50:16 +03:00
Serhiy Storchaka f6a45a03d0
gh-111165: Move test running code from test.support to libregrtest (GH-111166)
Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.
2023-10-25 12:41:21 +03:00
scoder a8a89fcd1f
gh-106320: Re-add some PyLong/PyDict C-API functions (GH-#111162)
* gh-106320: Re-add _PyLong_FromByteArray(), _PyLong_AsByteArray() and _PyLong_GCD() to the public header files since they are used by third-party packages and there is no efficient replacement.

See https://github.com/python/cpython/issues/111140
See https://github.com/python/cpython/issues/111139

* gh-111262: Re-add _PyDict_Pop() to have a C-API until a new public one is designed.
2023-10-25 11:33:48 +02:00
Serhiy Storchaka b2ba298527
gh-111065: Add more tests for the C API with the PySys_ prefix (GH-111067)
* Move existing tests for PySys_GetObject() and PySys_SetObject() into
  specialized files.
* Add test for PySys_GetXOptions() using _testcapi.
* Add tests for PySys_FormatStdout(), PySys_FormatStderr(),
  PySys_WriteStdout() and PySys_WriteStderr() using ctypes.
2023-10-25 11:33:12 +03:00
Artyom Romanov 0d1cbff833
Bump test deps: ruff and mypy (#111288) 2023-10-25 01:05:37 -07:00
Nikita Sobolev 81b03e7810
gh-111295: Fix error checking in time extension module init (#111296)
Introduce ADD_INT macro wrapper for PyModule_AddIntConstant()
2023-10-25 07:19:40 +00:00
Nikita Sobolev 2838c550f7
gh-111233: Fix error checking in select extension module init (#111234)
Introduce ADD_INT macro wrapper for PyModule_AddIntConstant()
2023-10-25 07:18:21 +00:00
Nikita Sobolev 3052c098ca
gh-111253: Fix error checking in _socket module init (#111254) 2023-10-25 07:11:04 +00:00
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