Commit graph

119514 commits

Author SHA1 Message Date
Victor Stinner 11e83488c5
gh-111089: Revert PyUnicode_AsUTF8() changes (#111833)
* Revert "gh-111089: Use PyUnicode_AsUTF8() in Argument Clinic (#111585)"

This reverts commit d9b606b3d0.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in getargs.c (#111620)"

This reverts commit cde1071b2a.

* Revert "gh-111089: PyUnicode_AsUTF8() now raises on embedded NUL (#111091)"

This reverts commit d731579bfb.

* Revert "gh-111089: Add PyUnicode_AsUTF8() to the limited C API (#111121)"

This reverts commit d8f32be5b6.

* Revert "gh-111089: Use PyUnicode_AsUTF8() in sqlite3 (#111122)"

This reverts commit 37e4e20eaa.
2023-11-07 22:36:13 +00:00
Romuald Brunet ea970fb116
gh-61199: Remove superfluous global statements from base64._b32{en,de}code()* (GH-111785)
Minor cleanup after commit 4ce6faa6c9
2023-11-07 16:32:44 -06:00
Nikita Sobolev f115a55f0e
gh-111806: Fix test_recursion in test_richcmp on WASI builds (GH-111830) 2023-11-07 13:37:29 -08:00
Nikita Sobolev 0e83d941be
gh-111808: Fix recursion error on WASM in test_typing (GH-111819) 2023-11-07 11:23:57 -08:00
Irit Katriel 2f9cb7e095
gh-81137: deprecate assignment of code object to a function of a mismatched type (#111823) 2023-11-07 18:54:36 +00:00
Anthony Shaw 178861b193
gh-111623: Add Support for Cross-interpreter tuples (gh-111628) 2023-11-07 10:58:29 -07:00
Serhiy Storchaka 70afb8d732
gh-85098: Implement functional CLI of symtable (#109112)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-11-07 16:32:16 +00:00
Serhiy Storchaka f55cb44359
gh-106672: C API: Report indiscriminately ignored errors (GH-106674)
Functions which indiscriminately ignore all errors now report them as
unraisable errors.
2023-11-07 15:58:04 +02:00
Sergey B Kirpichev a077b2fbb8
gh-111765: Move old PyFloat_* tests to Lib/test/test_capi/test_float.py (GH-111766) 2023-11-07 13:40:58 +02:00
Mark Shannon 931f4438c9
GH-111485: Allow arbitrary annotations on instructions and micro-ops. (GH-111697) 2023-11-07 09:42:39 +00:00
Irit Katriel 13405ecffd
gh-79932: raise exception if frame.clear() is called on a suspended frame (#111792) 2023-11-07 08:49:30 +00:00
Gregory P. Smith d2ddfccfb4
gh-110395: test: assert after the child dies. (#111816)
based on review from Victor Stinner.  I already made this edit in the 3.12 backport PR.
2023-11-07 06:05:56 +00:00
方糖 c3e19c3a62
gh-111729: update generic syntax for typing.Concatenate sample code in Doc/library/typing.rst (#111734)
use new generic syntax
2023-11-06 16:53:17 -08:00
Brandt Bucher 3e99c9cbf6
GH-111485: Make BEFORE_WITH a uop (GH-111812) 2023-11-06 16:42:49 -08:00
Eric Snow d4426e8d00
gh-76785: Move _Py_excinfo Functions Out of the Internal C-API (gh-111715)
I added _Py_excinfo to the internal API (and added its functions in Python/errors.c) in gh-111530 (9322ce9).  Since then I've had a nagging sense that I should have added the type and functions in its own PR.  While I do plan on using _Py_excinfo outside crossinterp.c very soon (see gh-111572/gh-111573), I'd still feel more comfortable if the _Py_excinfo stuff went in as its own PR.  Hence, here we are.

(FWIW, I may combine that with gh-111572, which I may, in turn, combine with gh-111573.  We'll see.)
2023-11-06 11:09:22 -07:00
Eric Snow 836e0a75d5
gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh-111707)
This should have been done in gh-104148.

(A similar fix has already be done for that slot's value macros, and backported to 3.12.  See gh-110968.)
2023-11-06 09:34:57 -07:00
Irit Katriel c5063fd62a
simplify code to pop exception in frame_setlineno (#111702) 2023-11-06 15:45:33 +00:00
Dennis Sweeney 5e5762a2b8
gh-96954: Use skip_if_missing in test_makeunicodedata (GH-111764)
skip_if_missing in test_makeunicodedata
2023-11-06 15:32:35 +01:00
Mark Shannon a7b0f63cdb
GH-111772: Specialize slot loads and stores for _Py_T_OBJECT (GH-111773) 2023-11-06 13:55:04 +00:00
Mark Shannon d78c872e0d
GH-111646: Simplify optimizer, by compacting uops when making executor. (GH-111647) 2023-11-06 11:28:52 +00:00
Masayuki Moriyama c8faa3568a
gh-101180: Fix a bug where iso2022_jp_3 and iso2022_jp_2004 codecs read out of bounds (gh-111695) 2023-11-06 19:59:22 +09:00
Charles Machalow ba8aa1fd37
gh-109466: Add ipv6_mapped property to IPv4Address (#109467)
Adds the `IPv4Address.ipv6_mapped` property.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-11-05 16:50:31 +00:00
Sergey B Kirpichev 24b5cbd3dc
gh-111495: Add tests for PyComplex C API (GH-111591) 2023-11-05 07:42:42 +00:00
Sergey B Kirpichev b452202a11
gh-111495: Add tests for PyFloat C API (GH-111624) 2023-11-05 09:20:12 +02:00
partev 72e27a67b9
gh-111747: DOC: fix moved link to Documentation Translations (#111748)
Update old link in bugs.rst to the table of doc translators and translation repositories at Github.
2023-11-05 00:23:01 -04:00
Tian Gao 853b4b549d
gh-111719: Add extra check for alias command (#111720) 2023-11-04 23:05:22 +00:00
Davide Rizzo a6c1c04d4d
gh-110395: invalidate open kqueues after fork (#110517)
Invalidate open select.kqueue instances after fork as the fd will be invalid in the child.
2023-11-04 21:45:24 +00:00
Tian Gao cd6b2ced75
gh-80675: Set f_trace_lines = True on all frames upon pdb.set_trace() (#110881) 2023-11-04 19:59:36 +00:00
CF Bolz-Tereick 9573d14215
gh-96954: use a directed acyclic word graph for storing the unicodedata codepoint names (#97906)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2023-11-04 15:56:58 +01:00
Antoine Pitrou 0e9c364f4a
GH-110829: Ensure Thread.join() joins the OS thread (#110848)
Joining a thread now ensures the underlying OS thread has exited. This is required for safer fork() in multi-threaded processes.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2023-11-04 13:59:24 +00:00
Nikita Sobolev a28a3967ab
gh-111666: Speed up BaseExceptionGroup.{derive,split,subgroup} (#111667) 2023-11-04 09:59:46 +00:00
Nikita Sobolev 890ef1b035
gh-108303: Move zip and tar archives to Lib/test/archivetestdata (#111549) 2023-11-04 10:57:53 +01:00
Nikita Sobolev 18c954849b
gh-111159: Fix SyntaxError doctests for non-builtin exception classes (#111541) 2023-11-04 09:54:10 +00:00
Serhiy Storchaka a8e1f474c2
gh-111495: Test C API functions with extreme sizes and indices (GH-111631) 2023-11-04 11:40:46 +02:00
Nikita Sobolev f48e669504
gh-111724: Fix doctest ResourceWarning in howto/descriptor.rst (#111725)
Close database connection explicitly in test cleanup.
2023-11-04 10:22:19 +01:00
Victor Stinner ac01e2243a
gh-111644: Fix asyncio test_unhandled_exceptions() (#111713)
Fix test_unhandled_exceptions() of test_asyncio.test_streams: break
explicitly a reference cycle.

Fix also StreamTests.tearDown(): the loop must not be closed
explicitly, but using set_event_loop() which takes care of shutting
down the executor with executor.shutdown(wait=True).
BaseEventLoop.close() calls executor.shutdown(wait=False).
2023-11-04 00:47:07 +00:00
Victor Stinner f62c7ccf9a
gh-111644: Fix support threading_cleanup() (#111714)
Copy the list of dangling threads to make sure that the list of
"Dangling thread" is complete. Previously, the list was incomplete if
threads completed just before the list was displayed.

Changes:

* Rewrite the warning to make it easier to understand.
* Use support.sleeping_retry().
* threading_cleanup() no longer copies threading._dangling,
  but only counts the number of dangling thread.
* Remove support.gc_support() call.
2023-11-04 00:18:42 +00:00
Victor Stinner 244e37b22a
gh-109649: Fix test_os.test_process_cpu_count_affinity() (#111689)
When CPUs are isolated on Linux, os.process_cpu_count() is smaller
than os.cpu_count(). Fix the test for this case.

Example with "isolcpus=5,11 rcu_nocbs=5,11" options passed to a Linux
command line to isolated two logical CPUs:

$ ./python -c 'import os; print(os.process_cpu_count(), "/", os.cpu_count())'
10 / 12
2023-11-03 23:53:18 +00:00
Brad Larsen f21b23058e
Add a fuzz target for _elementtree.XMLParser._parse_whole (#111477)
* Add a fuzzer for `_elementtree.XMLParser._parse_whole`
2023-11-03 14:01:56 -07:00
Eric Snow df9815eb11
gh-111684: Avoid a Compiler Warning (gh-111706) 2023-11-03 13:37:10 -06:00
Victor Stinner 20cfab903d
gh-111506: Implement Py_SET_REFCNT() as opaque function in limited C API (#111508)
In the limited C API version 3.13, Py_SET_REFCNT() function is now
implemented as an opaque function call.

Add _Py_SetRefcnt() to the stable ABI.
2023-11-03 18:18:57 +01:00
Tian Gao e0afed7e27
gh-103615: Use local events for opcode tracing (GH-109472)
* Use local monitoring for opcode trace

* Remove f_opcode_trace_set

* Add test for setting f_trace_opcodes after settrace
2023-11-03 16:39:50 +00:00
Michael Droettboom 2bc01cc0c7
gh-111652: Fix --enable-pystats build (GH-111653) 2023-11-03 15:21:16 +00:00
Hugo van Kemenade 5add7a6724
CI: Make macOS Intel required to succeed (GH-110362) 2023-11-03 16:13:15 +01:00
lefp 9f33ede127
docs: specify that PyBytes_AsStringAndSize returns 0 on success (GH-110888)
docs: specify return value on success
2023-11-03 14:51:28 +01:00
Nikita Sobolev ccc8caa858
gh-111681: minor fixes to typing doctests; remove unused imports in test_typing (#111682)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-11-03 12:23:33 +00:00
scoder 24ddaee5ca
gh-106168: Revert the "size before item" setting (#111683)
gh-106168: Update the size only after setting the item, to avoid temporary inconsistencies.
Also remove the "what's new" sentence regarding the size setting since tuples cannot grow after allocation.
2023-11-03 11:02:39 +00:00
Irit Katriel d49aba5a7a
gh-111354: Simplify _PyGen_yf by moving some of its work to the compiler and frame state (#111648) 2023-11-03 10:01:36 +00:00
Philippe Cerfon 7810b6981a
gh-90026: support XATTRs on Cygwin (GH-105075) 2023-11-03 10:37:46 +01:00
Nikita Sobolev 7bcf184dac
gh-111490: Make the exception type check in test_pyexpat more specific (GH-111491) 2023-11-03 10:28:14 +02:00