Commit graph

112781 commits

Author SHA1 Message Date
Erlend Egeberg Aasland b36d222110
bpo-45847: Port _tkinter to PY_STDLIB_MOD (GH-31698)
- Remove ``--with-tclk-*`` options from `configure`
- Use pkg-config to detect `_tkinter` dependencies (Tcl/Tk, X11)
- Manual override via environment variables `TCLTK_CFLAGS` and `TCLTK_LIBS`
2022-03-31 03:19:08 -07:00
Victor Stinner 7fc39a21cb
bpo-47164: Add _PyCFunctionObject_CAST() macr (GH-32190)
Add _PyCFunctionObject_CAST() and _PyCMethodObject_CAST() macros to
make macros casting their argument easier to read, but also to check
the type of their input in debug mode: assert(PyCFunction_Check(func)
and assert(PyCMethod_Check(func).

Reformat also PyCFunction_XXX() macros for readability.
2022-03-31 10:03:13 +02:00
Victor Stinner f0bc694856
bpo-47164: Add _PyCFunction_CAST() macro (GH-32192)
Use the macro in C files of the Python/ directory.
2022-03-31 10:02:34 +02:00
Victor Stinner c14d7e4b81
bpo-47164: Add _PyASCIIObject_CAST() macro (GH-32191)
Add macros to cast objects to PyASCIIObject*, PyCompactUnicodeObject*
and PyUnicodeObject*: _PyASCIIObject_CAST(),
_PyCompactUnicodeObject_CAST() and _PyUnicodeObject_CAST(). Using
these new macros make the code more readable and check their argument
with: assert(PyUnicode_Check(op)).

Remove redundant assert(PyUnicode_Check(op)) in macros using directly
or indirectly these new CAST macros.

Replacing existing casts with these macros.
2022-03-31 09:59:27 +02:00
Eric Snow db4dada510
bpo-47146: Avoid Using make Recursively (gh-32206)
https://bugs.python.org/issue47146
2022-03-30 19:24:02 -06:00
Steve Dower f3d5715492
bpo-46566: Make test_launcher more robust to a variety of installs (GH-32204) 2022-03-30 22:18:40 +01:00
Steve Dower 2ab609dd61
bpo-47171: Enable installing the py.exe launcher on Windows ARM64 (GH-32203) 2022-03-30 21:20:38 +01:00
Christian Heimes 581c4434de
bpo-47162: Add call trampoline to mitigate bad fpcasts on Emscripten (GH-32189) 2022-03-30 12:28:33 -07:00
Brett Cannon 795c00b91c
Add CODEOWNERS entry for pathlib (GH-32202) 2022-03-30 11:34:29 -07:00
Dong-hee Na d0c67ea064
bpo-46775: OSError should call winerror_to_errno unconditionally on Windows (GH-32179) 2022-03-30 18:31:33 +01:00
Oleg Iarygin a03a09e068
Replace with_traceback() with exception chaining and reraising (GH-32074) 2022-03-30 15:28:20 +03:00
Andrew Svetlov f08a191882
bpo-39622: Interrupt the main asyncio task on Ctrl+C (GH-32105)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-03-30 15:15:06 +03:00
Mark Shannon 04acfa94bb
Merge deoptimization blocks in interpreter (GH-32155) 2022-03-30 13:11:33 +01:00
Daniël van Noord 75eee1d57e
bpo-34861: Make cumtime the default sorting key for cProfile (GH-31929) 2022-03-30 12:10:10 +01:00
Hugo van Kemenade 6881ea936e
bpo-47126: Update to canonical PEP URLs specified by PEP 676 (GH-32124) 2022-03-30 12:00:27 +01:00
Christian Heimes d8f530fe32
bpo-46864: Suppress even more ob_shash deprecation warnings (GH-32176) 2022-03-30 08:35:15 +02:00
Irit Katriel 63f32fae79
bpo-26120: do not exclude __future__ import in pydoc of the __future__ module itself (GH-32180) 2022-03-29 23:07:15 +01:00
Andrew Svetlov a5ba445322
asyncio.Task: rename internal nested variable to don't hide another declaration from outer scope (GH-32181) 2022-03-30 00:33:51 +03:00
Dave Goncalves dc2d8404a3
bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480)
* bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes
* GH-25480: remove trailing whitespace in ctypes doc
* GH-25480: add news entry blurb
* GH-25480: corrected formatting error in news blurb
* GH-25480: simplified, corrected formatting in news blurb
* GH-25480: remove trailing whitespace in news blurb
* GH-25480: fixed class markup in news blurb
* GH-25480: fixed unsupported type tests and naming per review comments
* GH-25480: fixed whitepace errors
* condensed base class selection for unsupported byte order tests
* added versionadded tags for new EndianUnion classes
2022-03-29 14:26:27 -07:00
Géry Ogam 654bd2152d
Update glossary.rst (GH-32093) 2022-03-30 00:21:56 +03:00
benfogle d0906c90fc
bpo-42340: Document issues around KeyboardInterrupt (GH-23255)
Update documentation to note that in some circumstances,
KeyboardInterrupt may cause code to enter an inconsistent state. Also
document sample workaround to avoid KeyboardInterrupt, if needed.
2022-03-29 14:21:36 -07:00
Sam Ezeh 755be9b150
bpo-14265: Adds fully qualified test name to unittest output (GH-32138)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-29 18:02:09 +03:00
Ma Lin 356997cccc
bpo-35859: Fix a few long-standing bugs in re engine (GH-12427)
In rare cases, capturing group could get wrong result.

Regular expression engines in Perl and Java have similar bugs.
The new behavior now matches the behavior of more modern
RE engines: in the regex module and in PHP, Ruby and Node.js.
2022-03-29 17:31:01 +03:00
Dennis Sweeney 788154919c
bpo-47053: Refactor BINARY_OP_INPLACE_ADD_UNICODE (GH-32122) 2022-03-28 22:07:05 -04:00
Steve Dower bad86a621a
bpo-46566: Add new py.exe launcher implementation (GH-32062) 2022-03-29 00:21:08 +01:00
Vincent Bernat 5c30388f3c
bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-29 00:50:26 +03:00
Maciej Górski 7b44ade018
bpo-47129: Add more informative messages to f-string syntax errors (32127)
* Add more informative messages to f-string syntax errors

* 📜🤖 Added by blurb_it.

* Fix whitespaces

* Change error message

* Remove the 'else' statement (as sugested in review)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-03-28 17:08:36 -04:00
Irit Katriel 15ba8167d7
bpo-26120: make pydoc exclude __future__ imports from the data block of the module (GH-30888) 2022-03-28 22:02:57 +01:00
Eric Snow 4c116f716b
bpo-47146: Eliminate a race between make regen-deepfreeze and make regen-global-objects. (gh-32162)
The race likely originated with gh-32061.

https://bugs.python.org/issue47146
2022-03-28 14:56:05 -06:00
Steve Dower 295114dcd3
bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) 2022-03-28 21:38:31 +01:00
Jonathan 66584c890d
Fix typo in the sqlite3 docs (GH-31915)
Co-authored-by: Jonathan <89750679+AHypnotoad@users.noreply.github.com>
2022-03-28 11:44:41 -07:00
Pieter Eendebak 850687df47
bpo-47070: Add _PyBytes_Repeat() (GH-31999)
Use it where appropriate: the repeat functions of `array.array`, `bytes`, `bytearray`, and `str`.
2022-03-28 04:43:45 -04:00
vidhya 86384cf83f
bpo-28516: document contextlib.ExitStack.__enter__ behavior (GH-31636)
The enter_context is updated with following information: 'The :meth:`__enter__` method 
      returns the ExitStack instance, and performs no additional operations.'

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-27 21:31:32 -07:00
Yonatan Goldschmidt 76f14b0463
ctypes docs: Fix array-length reference to "non-negative" from "positive" (GH-32097) 2022-03-27 20:12:21 -07:00
ty f6b3a07b7d
bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)
Add missing terminated NUL in sockaddr_un's length

- Linux: https://man7.org/linux/man-pages/man7/unix.7.html
- *BSD: SUN_LEN
2022-03-27 13:22:22 -07:00
Kumar Aditya 58448cbd96
bpo-47127: Specialize calls for fastcall c methods with keywords (GH-32125)
* add PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
2022-03-28 03:53:25 +08:00
Kumar Aditya 785cc67705
bpo-46429: tweak deepfreeze output (#32107) 2022-03-27 11:46:22 -07:00
Jouke Witteveen c12ba6b2ff
bpo-45171: Remove tests of deprecated logger.warn(). (GH-32139) 2022-03-27 19:22:05 +01:00
Jouke Witteveen 5ca6d7469b
bpo-45171: Fix stacklevel handling in logging. (GH-28287) 2022-03-27 14:49:28 +01:00
Christian Heimes 5fd8c574e0
bpo-47098: Replace Keccak Code Package with tiny_sha3 (GH-32060) 2022-03-26 21:36:08 +01:00
Christian Heimes b16b6bb8da
bpo-47095: Use libb2 to provide blake2 implementation (GH-32059) 2022-03-26 20:52:24 +01:00
Pieter Eendebak c23ddf5ec2
bpo-47116: use _PyLong_FromUnsignedChar instead of PyLong_FromLong (GH-32110) 2022-03-26 15:47:38 -04:00
Matthew Rahtz e8e737bcf6
bpo-43224: Implement PEP 646 grammar changes (GH-31018)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-26 09:55:35 -07:00
Pablo Galindo Salgado 26cca8067b
bpo-47117: Don't crash if we fail to decode characters when the tokenizer buffers are uninitialized (GH-32129)
Automerge-Triggered-By: GH:pablogsal
2022-03-26 09:29:02 -07:00
Alex Hedges ee912ad6f6
bpo-47105: Cite grp.h instead of pwd.h in grp docs (GH-32091) 2022-03-25 20:09:40 -04:00
Andrew Svetlov bad6ffaa64
bpo-47062: Rename factory argument to loop_factory (GH-32113) 2022-03-26 00:26:23 +02:00
Duprat d03acd7270
bpo-43352: Add a Barrier object in asyncio lib (GH-24903)
Co-authored-by: Yury Selivanov <yury@edgedb.com>
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-03-26 00:01:21 +02:00
Andrew Svetlov 20e6e5636a
bpo-47118: Fix asyncio.Runner tests error (32117) 2022-03-25 19:59:29 +02:00
Kurt McKee c07ca1aab6
Fix some typos in whatsnew (GH-32098)
* Fix some typos and phrasing

* Convert the `hash()` text to a link

* Remove definite article
2022-03-25 10:32:05 -07:00
Dennis Sweeney cca43b7d64
bpo-47053: Reduce deoptimization in BINARY_OP_INPLACE_ADD_UNICODE (GH-31318)
* Don't deopt if refcounts are too big

* Detect more at specialization time
2022-03-25 16:13:19 +00:00