Commit Graph

124204 Commits

Author SHA1 Message Date
Julien 2a378dba98
gh-125398: Convert paths in venv activate script when using Git Bash under Windows (GH-125399)
* Convert paths in venv activate script when using Git Bash under Windows

With https://github.com/python/cpython/pull/112508 the check to converts paths when running on Windows was changed from using the non-posix environment variable `$OSTYPE` to using `uname` instead.

However this missed the fact that when running under Git Bash on Windows, uname reports `MINGW*` (`$OSTYPE` is still `msys`).

This results in `$PATH` being set to something like `D:\a\github-actions-shells\github-actions-shells\venv/Scripts:…`, instead of `/d/a/github-actions-shells/github-actions-shells/venv/Scripts`.

Notably, the Git Bash is the bash shell that’s used for GitHub Actions Windows runners, and ships with VSCode.
2024-10-19 18:34:41 +01:00
Irit Katriel 4b421e8aca
gh-125522: Fix bare except in test_math.testTan (#125544) 2024-10-19 12:49:14 +01:00
Serhiy Storchaka a7443a1735
gh-52551: Use wcsftime() to implement time.strftime() on Windows (GH-125658) 2024-10-19 11:29:51 +03:00
Savannah Ostrowski 84074a4fd8
GH-99749: Add What's New entry for GH-124456 (GH-125671) 2024-10-19 11:26:46 +03:00
Adam Turner 2bb7ab7ad3
GH-125277: Increase minimum supported Sphinx to 7.2.6 (#125368) 2024-10-19 04:59:22 +01:00
Eric Snow 322f14eeff
gh-124694: In test_interpreter_pool, Restore the Asyncio Event Loop Policy During Cleanup (gh-125708)
This resolves a failure on the android buildbot.
2024-10-18 16:05:12 -06:00
Michael Droettboom c8fd4b12e3
gh-125207: Fix MSVC 1935 build with JIT (#125209)
* gh-125207: Use {0} array initializers

* Simplify, as suggested in PR

* Revert change to explicitly specify length
2024-10-18 15:51:29 -04:00
Pablo Galindo Salgado f8ba9fb2ce
gh-125703: Correctly honour tracemalloc hooks on specialized DECREF paths (#125704) 2024-10-18 17:09:34 +01:00
Eric Snow 6d93690954
gh-125604: Move _Py_AuditHookEntry, etc. Out of pycore_runtime.h (gh-125605)
This is essentially a cleanup, moving a handful of API declarations to the header files where they fit best, creating new ones when needed.

We do the following:

* add pycore_debug_offsets.h and move _Py_DebugOffsets, etc. there
* inline struct _getargs_runtime_state and struct _gilstate_runtime_state in _PyRuntimeState
* move struct _reftracer_runtime_state to the existing pycore_object_state.h
* add pycore_audit.h and move to it _Py_AuditHookEntry , _PySys_Audit(), and _PySys_ClearAuditHooks
* add audit.h and cpython/audit.h and move the existing audit-related API there
*move the perfmap/trampoline API from cpython/sysmodule.h to cpython/ceval.h, and remove the now-empty cpython/sysmodule.h
2024-10-18 09:26:08 -06:00
Serhiy Storchaka 2e950e3419
Add tests for time.strftime() with invalid format string (GH-125696) 2024-10-18 16:51:29 +03:00
Wulian cda0ec8e7c
gh-124102: Clean up unsupported VS and WiX detections (GH-124784) 2024-10-18 13:48:18 +01:00
RUANG (Roy James) 10c4c95395
gh-123610: Added additional types to ctypes/wintypes.py (GH-124086) 2024-10-18 13:45:17 +01:00
Nice Zombies df751363e3
gh-125660: Reject invalid unicode escapes for Python implementation of JSON decoder (GH-125683) 2024-10-18 15:29:47 +03:00
Nice Zombies d358425e69
gh-125682: Reject non-ASCII digits in the Python implementation of JSON decoder (GH-125687) 2024-10-18 15:26:29 +03:00
Furkan Onder a0f5c8e627
gh-125620: Skip check_resource_tracker_death on NetBSD due to long wait for SIGKILL process termination (GH-125621)
* Skip test_resource_tracker_sigkill on NetBSD
2024-10-17 19:08:34 -07:00
Tian Gao 77cebb1ce9
gh-125600: Only show stale code warning on source code display commands (#125601) 2024-10-17 20:29:11 -04:00
Eric Snow 7cf2dbc3cb
gh-125667: Statically Initialize the Arg Converter Data Values in _interpqueuesmodule.c (gh-125668) 2024-10-17 23:49:15 +00:00
Zachary Ware c3164ae3cf
gh-125017: Fix refleak from GH-125636 (GH-125664) 2024-10-17 17:21:32 -05:00
Sam Gross d8c8648161
gh-125541: Make Ctrl-C interrupt `threading.Lock.acquire()` on Windows (#125546) 2024-10-17 20:10:55 +02:00
chrysn b454662921
gh-118986: expose `socket.IPV6_RECVERR` (#118987) 2024-10-17 20:49:12 +03:00
Jelle Zijlstra f203d1cb52
gh-125017: Fix crash on premature access to classmethod/staticmethod annotations (#125636) 2024-10-17 09:45:25 -07:00
George Pittock 04d6dd23e2
gh-113570: reprlib.repr does not use builtin __repr__ for reshadowed builtins (GH-113577) 2024-10-17 16:34:37 +00:00
Serhiy Storchaka ad3eac1963
gh-52551: Fix encoding issues in strftime() (GH-125193)
Fix time.strftime(), the strftime() method and formatting of the
datetime classes datetime, date and time.

* Characters not encodable in the current locale are now acceptable in
  the format string.
* Surrogate pairs and sequence of surrogatescape-encoded bytes are no
  longer recombinated.
* Embedded null character no longer terminates the format string.

This fixes also gh-78662 and gh-124531.
2024-10-17 15:46:59 +00:00
Wulian 0cb20f2e7e
gh-125625: Check for `py -3.13` in PCbuild/find_python.bat (GH-125626) 2024-10-17 10:40:30 -05:00
Wulian c124577ebe
gh-123370: Fix the canvas not clearing after running turtledemo.clock (#123457)
Rewriting the day and date every tick somehow prevented them from being removed either by clicking STOP or loading another example.  The solution is to rewrite them only when they change.
2024-10-17 11:23:37 -04:00
Jonathan Protzenko 528bbab96f
GH-99108: Make vectorized versions of Blake2 available on x86, too (#125244)
Accomplished by updating HACL* vendored code from hacl-star/hacl-star@a6a09496d9 to hacl-star/hacl-star@315a9e491d

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Zachary Ware <zach@python.org>
2024-10-17 15:08:43 +00:00
Emmanuel Ferdman 0d88b995a6
gh-125644: Update `locations.md` reference (#125645)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2024-10-17 16:33:37 +02:00
Michael Droettboom 37986e830b
gh-123153: Fix PGO builds with free-threading on Windows (#125607)
* gh-123153: Fix PGO builds with free-threading

* Redo how the #define works
2024-10-17 08:20:30 -04:00
Savannah Ostrowski dbcc5ac470
gh-95836: Add custom type converter examples to argparse tutorial (GH-125376) 2024-10-17 14:41:22 +03:00
Savannah Ostrowski 7b04496e5c
gh-125542: Deprecate prefix_chars in ArgumentParser.add_argument_group() (GH-125563) 2024-10-17 09:11:47 +00:00
Savannah Ostrowski 624be8699a
GH-99749: Add optional feature to suggest correct names (ArgumentParser) (GH-124456) 2024-10-17 10:07:37 +03:00
Eric Snow a5a7f5e16d
gh-124694: Add concurrent.futures.InterpreterPoolExecutor (gh-124548)
This is an implementation of InterpreterPoolExecutor that builds on ThreadPoolExecutor.

(Note that this is not tied to PEP 734, which is strictly about adding a new stdlib module.)

Possible future improvements:

* support passing a script for the initializer or to submit()
* support passing (most) arbitrary functions without pickling
* support passing closures
* optionally exec functions against __main__ instead of the their original module
2024-10-16 16:50:46 -06:00
Furkan Onder a38fef4439
gh-125620: Remove unnecessary import of subprocess in spawnv_passfds (#125624)
Remove unnecessary import of subprocess in multiprocessing.util.spawnv_passfds.
2024-10-16 22:42:29 +00:00
Steve Dower 8e7b2a1161
gh-125550: Enable py.exe to detect Store installs of 3.14 (GH-125551) 2024-10-16 23:05:20 +01:00
Vincent Fazio aecbc2e6f4
gh-115382: Fix cross compiles when host and target use same SOABI
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-16 23:01:42 +01:00
Cornelius Roemer aab3210271
gh-125615: Fix grammar nit in tutorial's interactive interpreter appendix (GH-125617)
Replace "without ... nor" with "with neither ... nor"
2024-10-16 15:53:30 -05:00
Sam Gross 760872efec
gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (#125492)
There was a deadlock when `ProcessPoolExecutor` shuts down at the same
time that a queueing thread handles an error processing a task.

Don't use `_shutdown_lock` to protect the `_ThreadWakeup` pipes -- use
an internal lock instead. This fixes the ordering deadlock where the
`ExecutorManagerThread` holds the `_shutdown_lock` and joins the
queueing thread, while the queueing thread is attempting to acquire the
`_shutdown_lock` while closing the `_ThreadWakeup`.
2024-10-16 11:39:17 -04:00
Kirill Podoprigora d83fcf8371
CI: Bump Python to 3.13 and mypy to 1.12 in mypy workflow (#125592)
* Bump mypy to 1.12 & Python to 3.13

* Remove unnecessary `type: ignore`
2024-10-16 14:27:19 +00:00
Michał Górny e4d90be845
gh-125584: Require network resource in ``test_urllib2.HandlerTests.test_ftp_error`` (#125586) 2024-10-16 13:24:41 +00:00
Diego Russo feda9aa73a
gh-125444: Fix illegal instruction for older Arm architectures (#125574)
On Arm v5 it is not possible to get the thread ID via c13 register
hence the illegal instruction. The c13 register started to provide
thread ID since Arm v6K architecture variant. Other variants of
Arm v6 (T2, Z and base) don’t provide the thread ID via c13.
For the sake of simplicity we group v5 and v6 together and
consider that instructions for Arm v7 only.
2024-10-16 09:13:07 -04:00
Michael Droettboom 51410d8bdc
gh-125217: Turn off optimization around_PyEval_EvalFrameDefault to avoid MSVC crash (#125477) 2024-10-16 12:51:15 +00:00
Kirill Podoprigora bee112a94d
gh-124872: Replace enter/exit events with "switched" (#125532)
Users want to know when the current context switches to a different
context object.  Right now this happens when and only when a context
is entered or exited, so the enter and exit events are synonymous with
"switched".  However, if the changes proposed for gh-99633 are
implemented, the current context will also switch for reasons other
than context enter or exit.  Since users actually care about context
switches and not enter or exit, replace the enter and exit events with
a single switched event.

The former exit event was emitted just before exiting the context.
The new switched event is emitted after the context is exited to match
the semantics users expect of an event with a past-tense name.  If
users need the ability to clean up before the switch takes effect,
another event type can be added in the future.  It is not added here
because YAGNI.

I skipped 0 in the enum as a matter of practice.  Skipping 0 makes it
easier to troubleshoot when code forgets to set zeroed memory, and it
aligns with best practices for other tools (e.g.,
https://protobuf.dev/programming-guides/dos-donts/#unspecified-enum).

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2024-10-16 13:53:21 +02:00
Hugo van Kemenade 37e533a397 Merge remote-tracking branch 'upstream/main' 2024-10-16 01:13:48 +03:00
Zachary Ware 7453b8f15c
Update verison options in crash issue template (GH-125555) 2024-10-15 22:08:00 +00:00
Hugo van Kemenade 299d02090f Post 3.14.0a1 2024-10-16 00:44:52 +03:00
Kirill Podoprigora fee8fe5858
Issue template: Remove 3.8 and add 3.14 version (#125552) 2024-10-16 00:25:20 +03:00
Tian Gao 12eaadc0ad
gh-58956: Set f_trace on frames with breakpoints after setting a new breakpoint (#124454) 2024-10-15 15:56:33 -04:00
Hugo van Kemenade 8cdaca8b25 Python 3.14.0a1 2024-10-15 22:34:54 +03:00
Tian Gao 9c2bb7d551
gh-125115: Pass unknown pdb command line args to script instead of fail (#125424)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2024-10-15 15:30:28 -04:00
Sam Gross 3ea488aac4
gh-124218: Use per-thread refcounts for code objects (#125216)
Use per-thread refcounting for the reference from function objects to
their corresponding code object. This can be a source of contention when
frequently creating nested functions. Deferred refcounting alone isn't a
great fit here because these references are on the heap and may be
modified by other libraries.
2024-10-15 15:06:41 -04:00