summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
* gh-116263: Do not rollover empty files in RotatingFileHandler (GH-122788)Serhiy Storchaka2024-08-081-0/+2
|
* gh-105201: Add PyIter_NextItem() (#122331)Erlend E. Aasland2024-08-072-0/+4
| | | | | | | | | Return -1 and set an exception on error; return 0 if the iterator is exhausted, and return 1 if the next item was fetched successfully. Prefer this API to PyIter_Next(), which requires the caller to use PyErr_Occurred() to differentiate between iterator exhaustion and errors. Co-authered-by: Irit Katriel <iritkatriel@yahoo.com>
* gh-118814: Fix the TypeVar constructor when name is passed by keyword ↵Serhiy Storchaka2024-08-071-0/+1
| | | | | | | | (GH-122664) Fix _PyArg_UnpackKeywordsWithVararg for the case when argument for positional-or-keyword parameter is passed by keyword. There was only one such case in the stdlib -- the TypeVar constructor.
* gh-122478: Remove internal frames from tracebacks in REPL (GH-122528)Serhiy Storchaka2024-08-071-0/+3
| | | | | | | | Frames of methods in code and codeop modules was show with non-default sys.excepthook. Save correct tracebacks in sys.last_traceback and update __traceback__ attribute of sys.last_value and sys.last_exc.
* gh-118761: Improve import time of `pprint` (#122725)Hugo van Kemenade2024-08-071-0/+2
| | | | Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* gh-100256: Skip inaccessible registry keys in the WinAPI mimetype ↵Lucas Esposito2024-08-072-0/+2
| | | | implementation (GH-122047)
* gh-121151: argparse: Fix wrapping of long usage text of arguments inside a ↵Ali Hamdan2024-08-071-0/+2
| | | | mutually exclusive groups (GH-121159)
* gh-79846: Make ssl.create_default_context() ignore invalid certificates ↵pukkandan2024-08-071-0/+2
| | | | | | | (GH-91740) An error in one certificate should not cause the whole thing to fail. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* GH-73991: Rework `pathlib.Path.rmtree()` into `delete()` (#122368)Barney Gale2024-08-071-1/+1
| | | | | | Rename `pathlib.Path.rmtree()` to `delete()`, and add support for deleting non-directories. This simplifies the interface for users, and nicely complements the upcoming `move()` and `copy()` methods (which will also accept any type of file.)
* gh-122728: Fix SystemError in PyEval_GetLocals() (#122735)Victor Stinner2024-08-061-0/+2
| | | | | | | Fix PyEval_GetLocals() to avoid SystemError ("bad argument to internal function"). Don't redefine the 'ret' variable in the if block. Add an unit test on PyEval_GetLocals().
* gh-122744: Bump bundled pip to 24.2 (#122745)Pradyun Gedam2024-08-061-0/+1
| | | Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
* gh-122417: Implement per-thread heap type refcounts (#122418)Sam Gross2024-08-061-0/+4
| | | | | | | The free-threaded build partially stores heap type reference counts in distributed manner in per-thread arrays. This avoids reference count contention when creating or destroying instances. Co-authored-by: Ken Jin <kenjin@python.org>
* gh-112301: Add macOS warning tracking tooling (#122211)Nate Ohlson2024-08-061-0/+2
| | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-120104: IDLE: Fix padding in config and search dialogs (#120107)Serhiy Storchaka2024-08-061-0/+1
|
* gh-116622: Android logging fixes (#122698)Malcolm Smith2024-08-061-0/+1
| | | | Modifies the handling of stdout/stderr redirection on Android to accomodate the rate and buffer size limits imposed by Android's logging infrastructure.
* GH-118943: Handle races when moving jit_stencils.h (GH-120690)Miro Hrončok2024-08-051-0/+3
| | | Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* gh-122459: Optimize pickling by name objects without __module__ (GH-122460)Serhiy Storchaka2024-08-051-0/+2
|
* gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574)Jonathan Protzenko2024-08-041-0/+1
| | | | | | Match statements in tooling require a more recent Python. Tools/cases_generator/*.py (and `Tools/jit/*.py` in 3.13+). Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-122637: fix tanh(±0+infj) and tanh(±0+nanj) to return ±0+nanj (#122638)Sergey B Kirpichev2024-08-041-0/+1
| | | | | | | | | As per C11 DR#471, ctanh (0 + i NaN) and ctanh (0 + i Inf) should return 0 + i NaN (with "invalid" exception in the second case). This has corresponding implications for ctan(z), as its errors and special cases are handled as if the operation is implemented by -i*ctanh(i*z). This patch fixes cmath's code to do same. Glibs patch: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=d15e83c5f5231d971472b5ffc9219d54056ca0f1
* gh-121889: cmath.acosh(0+nanj) returns nan+pi/2j (#121892)Sergey B Kirpichev2024-08-041-0/+1
| | | | | As per C11 DR#471 (adjusted resolution accepted for C17), cacosh (0 + iNaN) should return NaN ± i pi/2, not NaN + iNaN. This patch fixes cmath's code to do same.
* gh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577)Sam Gross2024-08-021-0/+4
| | | | | | | | | | | | | | The `PyStructSequence` destructor would crash if it was deallocated after its type's dictionary was cleared by the GC, because it couldn't compute the "real size" of the instance. This could occur with relatively straightforward code in the free-threaded build or with a reference cycle involving the type in the default build, due to differing orders in which `tp_clear()` was called. Account for the non-sequence fields in `tp_basicsize` and use that, along with `Py_SIZE()`, to compute the "real" size of a `PyStructSequence` in the dealloc function. This avoids the accesses to the type's dictionary during dealloc, which were unsafe.
* gh-122445: populate only modified fields in __static_attributes__ (#122446)Irit Katriel2024-08-021-0/+1
|
* gh-122334: Fix crash when importing ssl after re-initialization (#122481)neonene2024-08-021-0/+1
| | | | * Fix crash when importing ssl after re-initialization
* gh-121723: Relax constraints on queue objects for ↵Bénédikt Tran2024-08-021-0/+3
| | | | `logging.handlers.QueueHandler`. (GH-122154)
* gh-120083: Add IDLE Hovertip foreground color needed for recent macOS (#120605)John Riggles2024-08-021-0/+1
| | | | | | | | On recent versions of macOS (sometime between Catalina and Sonoma 14.5), the default Hovertip foreground color changed from black to white, thereby matching the background. This might be a matter of matching the white foreground of the dark-mode text. The unreadable result is shown here (#120083 (comment)). The foreground and background colors were made parameters so we can pass different colors for future additional hovertips in IDLE. --------- Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* gh-116622: Don't expose `FICLONE` ioctl on Android (#122522)Malcolm Smith2024-08-011-0/+2
| | | | | Don't expose `FICLONE` ioctl on Android Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
* gh-87320: In the code module, handle exceptions raised in sys.excepthook ↵CF Bolz-Tereick2024-07-311-0/+3
| | | | | | | (GH-122456) Before, the exception caused by calling non-default sys.excepthook in code.InteractiveInterpreter bubbled up to the caller, ending the REPL.
* gh-121381 Remove subprocess._USE_VFORK escape hatch (#121383)Cody Maloney2024-07-311-0/+2
| | | | | | | | | | | 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
* gh-116622: Fix testPyObjectPrintOSError on Android (#122487)Malcolm Smith2024-07-311-0/+3
| | | Adds extra handling for way BSD/Android return errors from calls to fwrite.
* GH-122482: Make About IDLE direct discussion to DPO (#122483)Terry Jan Reedy2024-07-301-0/+2
| | | | | | | 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.
* gh-121650: Encode newlines in headers, and verify headers are sound (GH-122233)Petr Viktorin2024-07-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | ## 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>
* gh-120906: Support arbitrary hashable keys in FrameLocalsProxy (GH-122309)Petr Viktorin2024-07-301-0/+1
| | | Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* gh-121474: Add threading.Barrier parties arg sanity check. (GH-121480)Clinton2024-07-301-0/+2
|
* gh-122400: Handle ValueError in filecmp (GH-122401)Bénédikt Tran2024-07-301-0/+3
|
* gh-105733: Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. ↵Petr Viktorin2024-07-301-0/+2
| | | | | | | (GH-122281) Soft-deprecate ctypes.ARRAY, rather than hard-deprecating it. Partially reverts 2211454fe210637ed7fabda12690dac6cc9a8149
* gh-122133: Authenticate socket connection for `socket.socketpair()` fallback ↵Seth Michael Larson2024-07-291-0/+5
| | | | | | | (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>
* GH-116090: Fire RAISE events from _FOR_ITER_TIER_TWO (GH-122413)Brandt Bucher2024-07-291-0/+2
|
* gh-122311: Fix some error messages in pickle (GH-122386)Serhiy Storchaka2024-07-291-0/+1
|
* gh-122234: fix accuracy issues for sum() (#122236)Sergey B Kirpichev2024-07-291-0/+4
| | | | | | | | * 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.
* gh-119180: Add evaluate functions for type params and type aliases (#122212)Jelle Zijlstra2024-07-271-0/+7
|
* gh-119180: Use type descriptors to access annotations (PEP 749) (#122074)Jelle Zijlstra2024-07-271-0/+2
|
* gh-122170: Handle ValueError raised by os.stat() in linecache (GH-122176)Bénédikt Tran2024-07-271-0/+2
|
* gh-112301: Compiler warning management tooling (#121730)Nate Ohlson2024-07-271-0/+2
| | | | | Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* gh-122332: Fix missing `NULL` check in `asyncio.Task.get_coro` (#122338)Peter Bierma2024-07-271-0/+2
|
* gh-122245: Add test case of generic type with __debug__ (#122322)Irit Katriel2024-07-261-2/+2
|
* gh-122300: Preserve AST nodes for format specifiers with single elements ↵Pablo Galindo Salgado2024-07-261-0/+2
| | | | (#122308)
* gh-121999: Change default tarfile filter to 'data' (GH-122002)WilliamRoyNelson2024-07-261-0/+2
| | | | | | Co-authored-by: Tomas R <tomas.roun8@gmail.com> Co-authored-by: Scott Odle <scott@sjodle.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* gh-122245: move checks for writes and shadowing of __debug__ to symtable ↵Irit Katriel2024-07-261-0/+4
| | | | (#122246)
* gh-121489: Export private _PyBytes_Join() again (#122267)Marc Mueller2024-07-251-0/+1
|
* GH-122160: Remove BUILD_CONST_KEY_MAP opcode. (GH-122164)Mark Shannon2024-07-251-0/+1
|