Commit Graph

123142 Commits

Author SHA1 Message Date
Bénédikt Tran 88030861e2
gh-122555: Remove removed functions from `Doc/data/refcounts.dat` (#122556) 2024-08-01 12:26:09 +02:00
Rafael Fontenelle 58ffc4cf4a
gh-122384: Mark strings from Download page for translation (#122385)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-08-01 12:25:16 +03:00
Mark Shannon a9d56e38a0
GH-122155: Track local variables between pops and pushes in cases generator (GH-122286) 2024-08-01 09:27:26 +01:00
jianghuyiyuan 46f5a4f9e1
Fix typos in docs, error messages and comments (#122502)
Signed-off-by: jianghuyiyuan <shuangcui@live.com>
2024-08-01 00:26:09 +00:00
Malcolm Smith 06656e259b
gh-116622: Don't expose `FICLONE` ioctl on Android (#122522)
Don't expose `FICLONE` ioctl on Android

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-08-01 00:23:10 +00:00
Malcolm Smith 8844197daa
gh-116622: Skip PosixPathTest.test_expanduser_pwd2 on platforms which don't support pwd.getpwall (GH-122521) 2024-07-31 21:35:10 +03:00
CF Bolz-Tereick bd3d31f380
gh-87320: In the code module, handle exceptions raised in sys.excepthook (GH-122456)
Before, the exception caused by calling non-default sys.excepthook
in code.InteractiveInterpreter bubbled up to the caller, ending the REPL.
2024-07-31 10:33:29 +00:00
Sviatoslav Sydorenko (Святослав Сидоренко) e60ee11cb5
Move change detection to separate workflow in CI (#122336) 2024-07-31 11:32:16 +03:00
Russell Keith-Magee f071f01b7b
gh-122133: Rework pure Python socketpair tests to avoid use of importlib.reload. (#122493)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-31 10:24:15 +02:00
Hugo van Kemenade d01fd24051
Docs: bump Sphinx to 8.0 and update constraints (#122496)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-31 07:02:08 +00:00
Cody Maloney a9344cdffa
gh-121381 Remove subprocess._USE_VFORK escape hatch (#121383)
This flag was added as an escape hatch in gh-91401 and backported to
Python 3.10. The flag broke at some point between its addition and now.
As there is currently no publicly known environments that require this,
remove it rather than work on fixing it.

This leaves the flag in the subprocess module to not break code which
may have used / checked the flag itself.

discussion: https://discuss.python.org/t/subprocess-use-vfork-escape-hatch-broken-fix-or-remove/56915/2
2024-07-30 18:39:54 -07:00
Malcolm Smith 82db572813
gh-116622: Fix testPyObjectPrintOSError on Android (#122487)
Adds extra handling for way BSD/Android return errors from calls to fwrite.
2024-07-31 08:21:43 +08:00
Terry Jan Reedy 29c04dfa27
GH-122482: Make About IDLE direct discussion to DPO (#122483)
Currently, idle-dev@python.org and idle-dev mailing list
serve to collect spam (90+%).  Change About IDLE to direct
discussions to discuss.python.org.  Users are already
doing so.
2024-07-30 18:29:52 -04:00
Petr Viktorin 0976339818
gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)
## Encode header parts that contain newlines

Per RFC 2047:

> [...] these encoding schemes allow the
> encoding of arbitrary octet values, mail readers that implement this
> decoding should also ensure that display of the decoded data on the
> recipient's terminal will not cause unwanted side-effects

It seems that the "quoted-word" scheme is a valid way to include
a newline character in a header value, just like we already allow
undecodable bytes or control characters.
They do need to be properly quoted when serialized to text, though.


## Verify that email headers are well-formed

This should fail for custom fold() implementations that aren't careful
about newlines.


Co-authored-by: Bas Bloemsaat <bas@bloemsaat.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-07-31 00:19:48 +02:00
Petr Viktorin 5912487938
gh-120906: Support arbitrary hashable keys in FrameLocalsProxy (GH-122309)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
2024-07-30 22:11:00 +00:00
Nate Ohlson 1cac0908fb
gh-112301: Add argument aliases and tee compiler output for check warnings (GH-122465)
Also remove superfluous shebang from the warning check script
2024-07-30 14:49:15 -05:00
Thomas Grainger c68cb8e0c9
Remove outdated note about instance methods from datamodel.rst (#122471) 2024-07-30 12:42:25 -07:00
Michael Droettboom af0a00f022
gh-122188: Move magic number to its own file (#122243)
* gh-122188: Move magic number to its own file

* Add versionadded directive

* Do work in C

* Integrate launcher.c

* Make _pyc_magic_number private

* Remove metadata

* Move sys.implementation -> _imp

* Modernize comment

* Move _RAW_MAGIC_NUMBER to the C side as well

* _pyc_magic_number -> pyc_magic_number

* Remove unused import

* Update docs

* Apply suggestions from code review

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>

* Fix typo in tests

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-07-30 15:31:05 -04:00
Sam Gross 2b163aa9e7
gh-117657: Avoid race in `PAUSE_ADAPTIVE_COUNTER` in free-threaded build (#122190)
The adaptive counter doesn't do anything currently in the free-threaded
build and TSan reports a data race due to concurrent modifications to
the counter.
2024-07-30 13:53:47 -04:00
Łukasz Langa 1d8e453907
gh-116402: Avoid readline in test_builtin TTY input tests (GH-122447) 2024-07-30 16:57:19 +00:00
Sam Gross 8fb88b22b7
gh-121946: Temporarily switch to llvm-17 in TSan CI again (GH-122466)
The Ubuntu package for llvm-18 is broken
2024-07-30 15:30:52 +00:00
Dino Viehland d1a1bca1f0
gh-119896: Fix CTRL-Z behavior in the new REPL on Windows (GH-122217) 2024-07-30 14:03:52 +02:00
Clinton d27a53fc02
gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480) 2024-07-30 11:53:07 +03:00
Bénédikt Tran 3a9b2aae61
gh-122400: Handle ValueError in filecmp (GH-122401) 2024-07-30 08:50:30 +00:00
Petr Viktorin 3833d27f98
gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. (GH-122281)
Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it.

Partially reverts 2211454fe2
2024-07-30 09:37:58 +02:00
Adam Turner 11ad731f4f
GH-121970: Extract ``audit_events`` into a new extension (#122325) 2024-07-30 03:49:00 +00:00
Sam Gross ac8da34621
gh-122420: Fix accounting for immortal interned strings in refleak.py (GH-122421)
The `_PyUnicode_Intern*` functions already adjust the total refcount, so
we don't want to readjust it in refleak.py.
2024-07-30 00:15:03 +02:00
Brandt Bucher 7797182b78
GH-118093: Improve handling of short and mid-loop traces (GH-122252) 2024-07-29 14:49:17 -07:00
Seth Michael Larson 78df1043db
gh-122133: Authenticate socket connection for `socket.socketpair()` fallback (GH-122134)
* Authenticate socket connection for `socket.socketpair()` fallback when the platform does not have a native `socketpair` C API.  We authenticate in-process using `getsocketname` and `getpeername` (thanks to Nathaniel J Smith for that suggestion).

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2024-07-29 14:44:35 -07:00
Adam Turner 76bdfa4cd0
GH-122085: Use include files for C API deprecations (#109843) 2024-07-29 22:20:40 +01:00
Donghee Na 046670c3a0
gh-121996: Fix --disable-safety and --enable-slower-safety options (gh-122414) 2024-07-29 19:20:36 +00:00
Brandt Bucher 15d4cd0967
GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122413) 2024-07-29 12:17:47 -07:00
Serhiy Storchaka 68840e91ac
gh-122311: Fix a refleak in pickle (GH-122411) 2024-07-29 21:52:48 +03:00
Eric Snow 490e0ad83a
gh-117482: Fix the Slot Wrapper Inheritance Tests (gh-122248)
The tests were only checking cases where the slot wrapper was present in the initial case.  They were missing when the slot wrapper was added in the additional initializations.  This fixes that.
2024-07-29 10:23:23 -06:00
Petr Viktorin 89fa05fdce
gh-122234: Add DECREFs to error paths (#122406)
Co-Authored-By: Kirill Podoprigora <kirill.bast9@mail.ru>
2024-07-29 16:10:25 +00:00
Kirill Podoprigora 9187484dd9
gh-122292: Split up ``Lib/test/test_ast.py`` into a couple of files (#122293) 2024-07-29 12:59:42 +02:00
Serhiy Storchaka 0697188084
gh-122311: Add more tests for error messages in pickle (GH-122373) 2024-07-29 13:40:16 +03:00
Serhiy Storchaka 3b034d26eb
gh-122311: Fix some error messages in pickle (GH-122386) 2024-07-29 11:49:13 +03:00
Sergey B Kirpichev 169e7138ab
gh-122234: fix accuracy issues for sum() (#122236)
* Use compensated summation for complex sums with floating-point items.
  This amends #121176.

* sum() specializations for floats and complexes now use
  PyLong_AsDouble() instead of PyLong_AsLongAndOverflow() and
  compensated summation as well.
2024-07-29 05:56:40 +02:00
Serhiy Storchaka bc93923a2d
gh-122311: Add more tests for pickle (GH-122376) 2024-07-28 11:33:17 +03:00
Victor Stinner b359f66c4c
gh-120593: Make _PyLong_CompactValue() parameter const again (#122367)
Change _PyLong_IsCompact() and _PyLong_CompactValue() parameter type
from 'PyObject*' to 'const PyObject*'. Avoid the Py_TYPE() macro
which does not support const parameter.
2024-07-28 09:59:07 +02:00
Hugo van Kemenade aa449cf063
gh-122085: Create dedicated page for deprecations (#122352)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-07-28 10:53:21 +03:00
Jelle Zijlstra 3ff5ce4706
gh-119180: Add myself as CODEOWNER for annotationlib (#122366)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-07-28 10:50:14 +03:00
sobolevn 04eb5c8db1
gh-122361: Use proper `PyUnicodeWriter_*` API in `constevaluator_call` (#122362) 2024-07-27 21:33:38 +03:00
Jelle Zijlstra ae192262ad
gh-119180: Add evaluate functions for type params and type aliases (#122212) 2024-07-27 17:24:10 +00:00
Barney Gale cbac8a3888
GH-121462: pathlib docs: improve table of corresponding os/os.path functions (#121465)
Re-order table of corresponding functions with the following priorities:

1. Pure functionality is at the top
2. `os.path` functions are shown before `os` functions
3. Similar functionality is kept together
4. Functionality follows docs order where possible

Add a few missed correspondences:

- `os.path.isjunction` and `Path.is_junction`
- `os.path.ismount` and `Path.is_mount`
- `os.lstat()` and `Path.lstat()`
- `os.lchmod()` and `Path.lchmod()`

Also add footnotes describing a few differences.
2024-07-27 18:03:18 +01:00
Jelle Zijlstra 45614ecb2b
gh-119180: Use type descriptors to access annotations (PEP 749) (#122074) 2024-07-27 16:36:06 +00:00
Hugo van Kemenade 4e75509349
gh-122085: Use include files for `whatsnew/3.14.rst` deprecations (#122242) 2024-07-27 14:17:54 +03:00
Seth Michael Larson 4e04d1a3d2
gh-122044: Don't error during gitignore filtering with no files (#122045) 2024-07-27 14:10:05 +03:00
Bénédikt Tran 7a6d4ccf0e
gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176) 2024-07-27 10:10:42 +00:00