summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gh-95914: Add What's New item describing PEP 670 changes (#98315)C.A.M. Gerlach2022-10-171-0/+11
|
* Remove unused arrange_output_buffer function from zlibmodule.c. (GH-98358)Benjamin Peterson2022-10-171-16/+0
|
* gh-98174: Handle EPROTOTYPE under macOS in ↵fancidev2022-10-171-2/+12
| | | | | test_sendfile_fallback_close_peer_in_the_middle_of_receiving (#98316) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* GH-98327: Reduce scope of catch_warnings() in _make_subprocess_transport ↵Kumar Aditya2022-10-172-33/+30
| | | | | (#98333) Alas, warnings.catch_warnings() has global scope, not thread scope, so this is still not perfect, but it reduces the time during which warnings are ignored. Better solution welcome.
* gh-93691: Compiler's code-gen passes location around instead of holding it ↵Irit Katriel2022-10-171-848/+975
| | | | on the global compiler state (GH-98001)
* gh-97669: Create Tools/build/ directory (#97963)Victor Stinner2022-10-1741-84/+102
| | | | | | | | | | | | | | | | | | | | | | | Create Tools/build/ directory. Move the following scripts from Tools/scripts/ to Tools/build/: * check_extension_modules.py * deepfreeze.py * freeze_modules.py * generate_global_objects.py * generate_levenshtein_examples.py * generate_opcode_h.py * generate_re_casefix.py * generate_sre_constants.py * generate_stdlib_module_names.py * generate_token.py * parse_html5_entities.py * smelly.py * stable_abi.py * umarshal.py * update_file.py * verify_ensurepip_wheels.py Update references to these scripts.
* gh-95534: Improve gzip reading speed by 10% (#97664)Ruben Vorderman2022-10-175-80/+850
| | | | | | | | | 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-95913: Forward-port int/str security change to 3.11 What's New in main ↵C.A.M. Gerlach2022-10-171-0/+11
| | | | | | | (#98344) Add int/str security change from issue gh-95778 PRs gh-96499 / gh-95800 Co-authored-by: Gregory P. Smith <greg@krypto.org> [Google]
* GH-91415: Mention alphabetical sort ordering in the Sorting HOWTO (GH-98336)Raymond Hettinger2022-10-161-76/+22
|
* gh-97930: Merge with importlib_resources 5.9 (GH-97929)Jason R. Coombs2022-10-167-29/+102
| | | | | * Merge with importlib_resources 5.9 * Update changelog
* gh-85525: Remove extra row in doc (#98337)Joannah Nanjekye2022-10-162-1/+1
| | | | | | | * remove extra row * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-85299: Add note warning about entry point guard for asyncio example (#93457)Stanley2022-10-162-1/+9
|
* gh-97527: IDLE - fix buggy macosx patch (#98313)Terry Jan Reedy2022-10-163-16/+34
| | | | | | #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-163-1/+21
| | | | | (GH-98319) Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* gh-94808: Cover `PyFunction_GetCode`, `PyFunction_GetGlobals`, ↵Nikita Sobolev2022-10-162-0/+74
| | | | `PyFunction_GetModule` (#98158)
* GH-94597: Deprecate child watcher getters and setters (#98215)Kumar Aditya2022-10-159-52/+105
| | | | | | | 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-156-31/+101
|
* Improve speed. Reduce auxiliary memory to 16.6% of the main array. (GH-98294)Raymond Hettinger2022-10-151-4/+5
|
* [doc] Update logging cookbook with an example of custom handling of levels. ↵Vinay Sajip2022-10-151-4/+206
| | | | | (GH-98290) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* docs(typing): harmonize "See PEP x for more details" (#97927)Simon Legner2022-10-151-10/+8
|
* gh-94808: Cover `str.rsplit` for UCS1, UCS2 or UCS4 (#98228)Nikita Sobolev2022-10-152-2/+14
|
* Faster sieve() recipe (#98287)Raymond Hettinger2022-10-151-8/+27
|
* gh-98227: executionmodel.rst: except* can also bind names (#98256)BiscuitCandy2022-10-151-1/+1
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-94808: Cover `PyEval_GetFuncName` (#98246)Nikita Sobolev2022-10-152-0/+22
|
* gh-95731: Fix module docstring extraction in pygettext (#95732)Jakub Kuczys2022-10-153-3/+25
|
* gh-95971: Turn @writes_bytecode_files to skip when not running (#95972)Jeong YunWon2022-10-151-1/+1
| | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-96258: move Py_REFCNT and Py_SET_REFCNT to reference counting page (#96259)QuakeIV2022-10-152-21/+22
|
* gh-85455: Add missing doc strings and improve docs (#21573)Joannah Nanjekye2022-10-152-11/+16
| | | | | | | * Add missing doc strings and improve docs * Use imperative form * Modify docstring wording
* gh-85525: Indicate supported sound header formats (#21575)Joannah Nanjekye2022-10-152-0/+57
| | | | | | | * Indicate supported sound header formats * modify file names Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* gh-91485: Doc: Using Python syntax to document builtin Python functions. ↵Julien Palard2022-10-151-65/+84
| | | | (GH-96579)
* gh-98251: Allow venv to pass along PYTHON* variables to pip and ensurepip ↵Steve Dower2022-10-143-13/+25
| | | | when they do not impact path resolution (GH-98259)
* Bpo-41246: IOCP Proactor avoid callback code duplication (#21399)Tony Solomonik2022-10-132-65/+20
| | | 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-133-4/+24
| | | | 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-132-0/+9
| | | | | | 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.
* Mark all targets in `Doc/Makefile` as `PHONY` (GH-98189)Nikita Sobolev2022-10-121-3/+3
|
* gh-97982: Factorize PyUnicode_Count() and unicode_count() code (#98025)Nikita Sobolev2022-10-122-60/+36
| | | | Add unicode_count_impl() to factorize PyUnicode_Count() and unicode_count() code.
* gh-96265: Formatting changes for faq/general (#98129)Stanley2022-10-121-12/+18
| | | | | | | | | | | | | | | | | | | | * Some formatting changes for general faq * Use list for Python versioning Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> * New line for list, list for a/b/rc * Line wrap for 80 chars * More line wrap * Remove PythonWin mention. Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* tutorial: remove "with single quotes" (#98204)Jelle Zijlstra2022-10-121-1/+1
| | | | | | Closes #91856. On Windows double quotes are sometimes better, on Unix usually single quotes. It's not our place to explain that, so just don't.
* gh-97669: Remove Tools/scripts/startuptime.py (#98214)Victor Stinner2022-10-121-22/+0
| | | | | | | | | | The "pyperf command" tool be used instead. Example: $ python3 -m pyperf command -- python3 -c pass ..................... command: Mean +- std dev: 17.8 ms +- 0.4 ms pyperf also computes the standard deviation which gives an idea of the benchmark looks reliable or not.
* signalmodule.c uses _PyErr_WriteUnraisableMsg() (#98217)Victor Stinner2022-10-121-7/+6
| | | | | | | Signal wakeup fd errors are now logged with _PyErr_WriteUnraisableMsg(), rather than PySys_WriteStderr() and PyErr_WriteUnraisable(), to pass the error message to sys.unraisablehook. By default, it's still written into stderr (unless sys.unraisablehook is overriden).
* gh-97669: Fix test_tools reference leak (#98216)Victor Stinner2022-10-123-8/+14
| | | | | | | | test_tools.test_sundry() now uses an unittest mock to prevent the logging module to register a real "atfork" function which kept the logging module dictionary alive. So the logging module can be properly unloaded. Previously, the logging module was loaded before test_sundry(), but it's no longer the case since recent test_tools sub-tests removals.
* gh-97669: Create Tools/patchcheck/ directory (#98186)Victor Stinner2022-10-127-8/+5
| | | | Move patchcheck.py, reindent.py and untabify.py scripts to a new Tools/patchcheck/ directory.
* gh-65046: Link to logging cookbook from asyncio docs (#98207)Shantanu2022-10-122-1/+4
|
* Formatting fixes in contextlib docs (#98111)Stanley2022-10-121-11/+17
|
* gh-95276: Add callable entry to the glossary (#95738)MonadChains2022-10-121-0/+10
|
* gh-96130: Rephrase use of "typecheck" verb for clarity (#98144)Shantanu2022-10-121-10/+10
| | | | I'm sympathetic to the issue report, especially in case this helps clarify to new users that Python itself does not do type checking at runtime
* Fix some incorrect indentation around the main switch (#98177)Guido van Rossum2022-10-111-21/+20
| | | | | | The `}` marked with `/* End instructions */` is the end of the switch. There is another pair of `{}` around the switch, which is vestigial from ancient times when it was `for (;;) { switch (opcode) { ... } }`. All `DISPATCH` macro calls should be inside that pair.
* gh-98172: Fix formatting in `except*` docs (#98173)Jelle Zijlstra2022-10-111-12/+11
|
* gh-97982: Remove asciilib_count() (#98164)Victor Stinner2022-10-112-15/+11
| | | | | asciilib_count() is the same than ucs1lib_count(): the code is not specialized for ASCII strings, so it's not worth it to have a separated function. Remove asciilib_count() function.
* gh-95756: Free and NULL-out code caches when needed (GH-98181)Ken Jin2022-10-112-0/+3
|