summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
Commit message (Collapse)AuthorAgeFilesLines
* gh-95534: Improve gzip reading speed by 10% (#97664)Ruben Vorderman2022-10-171-0/+1
| | | | | | | | | Change summary: + There is now a `gzip.READ_BUFFER_SIZE` constant that is 128KB. Other programs that read in 128KB chunks: pigz and cat. So this seems best practice among good programs. Also it is faster than 8 kb chunks. + a zlib._ZlibDecompressor was added. This is the _bz2.BZ2Decompressor ported to zlib. Since the zlib.Decompress object is better for in-memory decompression, the _ZlibDecompressor is hidden. It only makes sense in file decompression, and that is already implemented now in the gzip library. No need to bother the users with this. + The ZlibDecompressor uses the older Cpython arrange_output_buffer functions, as those are faster and more appropriate for the use case. + GzipFile.read has been optimized. There is no longer a `unconsumed_tail` member to write back to padded file. This is instead handled by the ZlibDecompressor itself, which has an internal buffer. `_add_read_data` has been inlined, as it was just two calls. EDIT: While I am adding improvements anyway, I figured I could add another one-liner optimization now to the python -m gzip application. That read chunks in io.DEFAULT_BUFFER_SIZE previously, but has been updated now to use READ_BUFFER_SIZE chunks.
* gh-97930: Merge with importlib_resources 5.9 (GH-97929)Jason R. Coombs2022-10-161-0/+3
| | | | | * Merge with importlib_resources 5.9 * Update changelog
* gh-85525: Remove extra row in doc (#98337)Joannah Nanjekye2022-10-161-0/+1
| | | | | | | * remove extra row * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-97527: IDLE - fix buggy macosx patch (#98313)Terry Jan Reedy2022-10-161-0/+3
| | | | | | #97530 fixed IDLE tests possibly crashing on a Mac without a GUI. But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and Microsoft Python 3.10.2288.0 when test/* is not installed. After this patch, test.* is only imported when testing on Mac.
* gh-98307: Add docstring and documentation for SysLogHandler.createSocket ↵Vinay Sajip2022-10-161-0/+2
| | | | | (GH-98319) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* GH-94597: Deprecate child watcher getters and setters (#98215)Kumar Aditya2022-10-151-0/+1
| | | | | | | This is the next step for deprecating child watchers. Until we've removed the API completely we have to use it, so this PR is mostly suppressing a lot of warnings when using the API internally. Once the child watcher API is totally removed, the two child watcher implementations we actually use and need (Pidfd and Thread) will be turned into internal helpers.
* gh-98254: Include stdlib module names in error messages for NameErrors (#98255)Pablo Galindo Salgado2022-10-151-0/+3
|
* gh-95731: Fix module docstring extraction in pygettext (#95732)Jakub Kuczys2022-10-151-0/+1
|
* gh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip ↵Steve Dower2022-10-141-0/+2
| | | | when they do not impact path resolution (GH-98259)
* Bpo-41246: IOCP Proactor avoid callback code duplication (#21399)Tony Solomonik2022-10-131-0/+3
| | | Use the same callback function for overlapped operations recv, recv_into, recvfrom, sendto, send, and sendfile inside IocpProactor.
* bpo-46364: Use sockets for stdin of asyncio only on AIX (#30596)Christoph Hamsen2022-10-131-0/+1
| | | | Signed-off-by: Christoph Hamsen <hamsen.christoph@posteo.de> Co-authored-by: July Tikhonov <july.tikh@gmail.com>
* gh-98178: syslog() is not thread-safe on macOS (#98213)Victor Stinner2022-10-131-0/+4
| | | | | | On macOS, fix a crash in syslog.syslog() in multi-threaded applications. On macOS, the libc syslog() function is not thread-safe, so syslog.syslog() no longer releases the GIL to call it.
* gh-86404: Doc: Drop now unused make suspicious and rstlint. (GH-98179)Julien Palard2022-10-111-0/+3
| | | | They have been replaced by [sphinx-lint](https://github.com/sphinx-contrib/sphinx-lint).
* gh-95756: Lazily created cached co_* attrs (GH-97791)Ken Jin2022-10-111-0/+1
|
* gh-44098: Release the GIL during mmap on Unix (GH-98146)Shantanu2022-10-101-0/+1
| | | | | This seems pretty straightforward. The issue mentions other calls in mmapmodule that we could release the GIL on, but those are in methods where we'd need to be careful to ensure that something sensible happens if those are called concurrently. In prior art, note that #12073 released the GIL for munmap. In a toy benchmark, I see the speedup you'd expect from doing this. Automerge-Triggered-By: GH:gvanrossum
* gh-96821: Fix undefined behaviour in `audioop.c` (#96923)Matthias Görgens2022-10-101-0/+1
| | | | | | | | | | | * gh-96821: Fix undefined behaviour in `audioop.c` Left-shifting negative numbers is undefined behaviour. Fortunately, multiplication works just as well, is defined behaviour, and gets compiled to the same machine code as before by optimizing compilers. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-43564: preserve original exception in args of FTP URLError (#24938)Carl Meyer2022-10-101-0/+3
| | | | | | | * bpo-43564: preserve original error in args of FTP URLError * Add NEWS blurb Co-authored-by: Carl Meyer <carljm@instagram.com>
* GH-94597: deprecate `SafeChildWatcher`, `FastChildWatcher` and ↵Kumar Aditya2022-10-081-0/+1
| | | | `MultiLoopChildWatcher` child watchers (#98089)
* gh-68686: Retire eptag ptag scripts (#98064)Joannah Nanjekye2022-10-081-0/+1
| | | | | | | | | * Retire eptag ptag scripts * 📜🤖 Added by blurb_it. * fix news entry error Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-97922: Run the GC only on eval breaker (#97920)Pablo Galindo Salgado2022-10-081-0/+5
|
* GH-98023: Change default child watcher to PidfdChildWatcher on supported ↵Kumar Aditya2022-10-081-0/+1
| | | | systems (#98024)
* GH-94182: Run the PidfdChildWatcher on the running loop (#94184)Thomas Grainger2022-10-081-0/+1
| | | | | | | | There is no reason for this watcher to be attached to any particular loop. This should make it safe to use regardless of the lifetime of the event loop running in the main thread (relative to other loops). Co-authored-by: Yury Selivanov <yury@edgedb.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-90085: Remove vestigial -t and -c timeit options (#94941)Shantanu2022-10-071-0/+3
| | | | | See bpo-28240. The functionality was removed in 3d7feb9ac2. The options had been deprecated since Python 3.3
* GH-83901: Improve Signature.bind error message for missing keyword-only ↵Frazer McLean2022-10-071-0/+1
| | | | | | params (#95347) Fixes GH-83901
* gh-96073: fix backticks in NEWS entry (GH-98056)Jelle Zijlstra2022-10-071-1/+1
| | | Automerge-Triggered-By: GH:JelleZijlstra
* gh-97997: Add col_offset field to tokenizer and use that for AST nodes (#98000)Lysandros Nikolaou2022-10-071-0/+1
|
* gh-96346: Use double caching for re._compile() (#96347)Serhiy Storchaka2022-10-071-0/+1
|
* gh-97646: Change `.js` and `.mjs` files mimetype to conform to RFC 9239 (#97934)Noam Cohen2022-10-071-0/+1
|
* GH-96073: Fix wild replacement in inspect.formatannotation (#96074)Anh71me2022-10-071-0/+1
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-97955: Migrate `zoneinfo` to Argument Clinic (#97958)Nikita Sobolev2022-10-071-0/+1
|
* gh-64373: Convert `_functools` to Argument Clinic (#96640)Nikita Sobolev2022-10-071-0/+1
|
* gh-96415: Remove `types._cell_factory` from a module namespace (#96416)Nikita Sobolev2022-10-071-0/+1
| | | Closes #96415
* gh-86298: Ensure that __loader__ and __spec__.loader agree in ↵Barry Warsaw2022-10-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | warnings.warn_explicit() (GH-97803) In `_warnings.c`, in the C equivalent of `warnings.warn_explicit()`, if the module globals are given (and not None), the warning will attempt to get the source line for the issued warning. To do this, it needs the module's loader. Previously, it would only look up `__loader__` in the module globals. In https://github.com/python/cpython/issues/86298 we want to defer to the `__spec__.loader` if available. The first step on this journey is to check that `loader == __spec__.loader` and issue another warning if it is not. This commit does that. Since this is a PoC, only manual testing for now. ```python # /tmp/foo.py import warnings import bar warnings.warn_explicit( 'warning!', RuntimeWarning, 'bar.py', 2, module='bar knee', module_globals=bar.__dict__, ) ``` ```python # /tmp/bar.py import sys import os import pathlib # __loader__ = pathlib.Path() ``` Then running this: `./python.exe -Wdefault /tmp/foo.py` Produces: ``` bar.py:2: RuntimeWarning: warning! import os ``` Uncomment the `__loader__ = ` line in `bar.py` and try it again: ``` sys:1: ImportWarning: Module bar; __loader__ != __spec__.loader (<_frozen_importlib_external.SourceFileLoader object at 0x109f7dfa0> != PosixPath('.')) bar.py:2: RuntimeWarning: warning! import os ``` Automerge-Triggered-By: GH:warsaw
* gh-82874: Convert remaining importlib format uses to f-str. (#98005)Gregory P. Smith2022-10-071-1/+1
| | | f-yes
* Docs: Fix backtick errors found by sphinx-lint (#97998)Hugo van Kemenade2022-10-074-4/+4
| | | Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* gh-97850: Remove deprecated functions from `importlib.utils` (#97898)Nikita Sobolev2022-10-071-0/+2
| | | | | * gh-97850: Remove deprecated functions from `importlib.utils` * Rebase and remove `set_package` from diff
* GH-90985: Revert "Deprecate passing a message into cancel()" (#97999)Guido van Rossum2022-10-071-0/+1
| | | | | Reason: we were too hasty in deprecating this. We shouldn't deprecate it before we have a replacement.
* bpo-35540 dataclasses.asdict now supports defaultdict fields (gh-32056)Tiger2022-10-071-0/+1
|
* GH-91052: Add C API for watching dictionaries (GH-31787)Carl Meyer2022-10-071-0/+1
|
* bpo-38693: Use f-strings instead of str.format() within importlib (#17058)Gregory P. Smith2022-10-061-0/+1
| | | | | | | | | This is a small performance improvement, especially for one or two hot places such as _handle_fromlist() that are called a lot and the .format() method was being used just to join two strings with a dot. Otherwise it is merely a readability improvement. We keep `_ERR_MSG` and `_ERR_MSG_PREFIX` as those may be used elsewhere for canonical looking error messages.
* GH-97002: Prevent `_PyInterpreterFrame`s from backing more than one ↵Brandt Bucher2022-10-061-0/+3
| | | | `PyFrameObject` (GH-97996)
* gh-97973: Return all necessary information from the tokenizer (GH-97984)Lysandros Nikolaou2022-10-061-0/+1
| | | | | Right now, the tokenizer only returns type and two pointers to the start and end of the token. This PR modifies the tokenizer to return the type and set all of the necessary information, so that the parser does not have to this.
* fixes gh-96078: os.sched_yield release the GIL while calling sched_yield(2). ↵Dong-hee Na2022-10-061-0/+2
| | | | (gh-97965)
* gh-65961: Do not rely solely on `__cached__` (GH-97990)Brett Cannon2022-10-061-0/+2
| | | Make sure `__spec__.cached` (at minimum) can be used.
* gh-97781: Apply changes from importlib_metadata 5. (GH-97785)Jason R. Coombs2022-10-061-0/+5
| | | | | | | * gh-97781: Apply changes from importlib_metadata 5. * Apply changes from upstream * Apply changes from upstream.
* gh-86482: Document assignment expression need for ()s (#23291)Terry Jan Reedy2022-10-061-0/+1
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-97943: PyFunction_GetAnnotations should return a borrowed reference. (#97949)larryhastings2022-10-061-0/+2
|
* gh-97897: Prevent os.mkfifo and os.mknod segfaults with macOS 13 SDK (GH-97944)Ned Deily2022-10-061-0/+6
| | | | | | | | The macOS 13 SDK includes support for the `mkfifoat` and `mknodat` system calls. Using the `dir_fd` option with either `os.mkfifo` or `os.mknod` could result in a segfault if cpython is built with the macOS 13 SDK but run on an earlier version of macOS. Prevent this by adding runtime support for detection of these system calls ("weaklinking") as is done for other newer syscalls on macOS.
* gh-96865: [Enum] fix Flag to use CONFORM boundary (GH-97528)Ethan Furman2022-10-051-0/+9
|
* gh-65961: Raise `DeprecationWarning` when `__package__` differs from ↵Brett Cannon2022-10-051-0/+5
| | | | | | | `__spec__.parent` (#97879) Also remove `importlib.util.set_package()` which was already slated for removal. Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>