]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
slateny [Sat, 30 Apr 2022 21:24:01 +0000 (14:24 -0700)]
gh-87192: Update wording for fcntl 'Changed in' (#91658)
Dennis Sweeney [Sat, 30 Apr 2022 19:53:59 +0000 (15:53 -0400)]
Convert :issue: to :gh: in whatsnew (GH-92089)
Dennis Sweeney [Sat, 30 Apr 2022 18:35:33 +0000 (14:35 -0400)]
gh-92063: Enforce types in specialized PRECALL opcodes (GH-92068)
* Check the types of PRECALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS
* fix PRECALL_NO_KW_METHOD_DESCRIPTOR_NOARGS as well
* fix PRECALL_NO_KW_METHOD_DESCRIPTOR_O
* fix PRECALL_NO_KW_METHOD_DESCRIPTOR_FAST
slateny [Sat, 30 Apr 2022 15:22:33 +0000 (08:22 -0700)]
gh-85864: io docs: Add missing position-only parameters (#91950)
Erlend Egeberg Aasland [Sat, 30 Apr 2022 15:01:37 +0000 (09:01 -0600)]
gh-92019: Make sqlite3.Blob indexing conform with the norm (#92020)
- get index now returns an int
- set index now requires an int in range(0, 256)
Resolves #92019
Serhiy Storchaka [Sat, 30 Apr 2022 10:17:23 +0000 (13:17 +0300)]
bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137)
It was raised if the charset itself contains characters not encodable
in UTF-8 (in particular \udcxx characters representing non-decodable
bytes in the source).
Serhiy Storchaka [Sat, 30 Apr 2022 10:16:27 +0000 (13:16 +0300)]
gh-81548: Deprecate octal escape sequences with value larger than 0o377 (GH-91668)
Serhiy Storchaka [Sat, 30 Apr 2022 10:15:02 +0000 (13:15 +0300)]
gh-91583: AC: Fix regression for functions with defining_class (GH-91739)
Argument Clinic now generates the same efficient code as before
adding the defining_class parameter.
Serhiy Storchaka [Sat, 30 Apr 2022 10:13:46 +0000 (13:13 +0300)]
gh-91760: Deprecate group names and numbers which will be invalid in future (GH-91794)
Only sequence of ASCII digits will be accepted as a numerical reference.
The group name in bytes patterns and replacement strings could only
contain ASCII letters and digits and underscore.
Serhiy Storchaka [Sat, 30 Apr 2022 10:03:23 +0000 (13:03 +0300)]
gh-92049: Forbid pickling constants re._constants.SUCCESS etc (GH-92070)
Previously, pickling did not fail, but the result could not be unpickled.
Inada Naoki [Sat, 30 Apr 2022 06:53:29 +0000 (15:53 +0900)]
gh-91954: Emit EncodingWarning from locale and subprocess (GH-91977)
locale.getpreferredencoding() and subprocess.Popen() emit EncodingWarning
David Hewitt [Sat, 30 Apr 2022 05:23:54 +0000 (06:23 +0100)]
gh-91880 - fix typo (GH-92069)
https://github.com/python/cpython/issues/91880#issuecomment-
1113914241 - With thanks to @MojoVampire for spotting this.
Automerge-Triggered-By: GH:gvanrossum
Serhiy Storchaka [Sat, 30 Apr 2022 05:22:46 +0000 (08:22 +0300)]
bpo-43224: Implement substitution of unpacked TypeVarTuple in C (GH-31828)
Co-authored-by: Matthew Rahtz <mrahtz@gmail.com>
Dennis Sweeney [Sat, 30 Apr 2022 03:18:38 +0000 (23:18 -0400)]
gh-92064: Fix global variable name collision in test_typing (#92067)
Fixes #92064
Shantanu [Sat, 30 Apr 2022 03:13:21 +0000 (21:13 -0600)]
Rephrase typing.assert_never docs (#92061)
This change is similar to that in #32069
Shantanu [Sat, 30 Apr 2022 03:12:45 +0000 (21:12 -0600)]
gh-91491: Add several typing features to What's New (#92060)
This gets all the major items in #91491. However, I didn't get around to
adding what's new entries for the large clump of changes in the last
bullet point in the issue.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Brett Cannon [Sat, 30 Apr 2022 01:22:10 +0000 (18:22 -0700)]
gh-91217: deprecate xdrlib (GH-92066)
Automerge-Triggered-By: GH:brettcannon
Jelle Zijlstra [Fri, 29 Apr 2022 22:58:40 +0000 (16:58 -0600)]
Fix indentation for typing.Unpack docs (#92058)
https://docs.python.org/3.11/library/typing.html#typing.Unpack
slateny [Fri, 29 Apr 2022 22:08:07 +0000 (15:08 -0700)]
sorting howto: Add clarification on < using __lt__ (#92010)
Serhiy Storchaka [Fri, 29 Apr 2022 21:01:40 +0000 (00:01 +0300)]
bpo-44791: Accept ellipsis as the last argument of typing.Concatenate (#30969)
Matthew Rahtz [Fri, 29 Apr 2022 20:03:21 +0000 (14:03 -0600)]
gh-87390: Add tests demonstrating current type variable substitution behaviour (#32341)
Humbled Drugman [Fri, 29 Apr 2022 18:22:46 +0000 (19:22 +0100)]
bpo-26792: Improve docstrings of runpy module run_functions (#30729)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Petr Viktorin [Fri, 29 Apr 2022 14:18:08 +0000 (16:18 +0200)]
gh-91324: Convert the stable ABI manifest to TOML (GH-92026)
Hugo van Kemenade [Fri, 29 Apr 2022 13:47:26 +0000 (16:47 +0300)]
bpo-36329: Remove 'make -C Doc serve' in favour of 'make -C Doc htmlview' (GH-32354)
Also updated `make -C htmlview` so it used a full path with `file://`, because the original didn't open the page (macOS).
For example:
```sh
cd Doc
# Doesn't open anything:
python3 -c "import webbrowser; webbrowser.open('build/html/index.html')"
# Opens the docs page e.g. file:///Users/hugo/github/cpython/Doc/build/html/index.html :
python3 -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
```
https://bugs.python.org/issue36329
Ken Jin [Fri, 29 Apr 2022 04:22:25 +0000 (11:22 +0700)]
gh-91873: Summarise deprecations in typing at the top level (GH-91864)
Eisuke Kawashima [Thu, 28 Apr 2022 19:45:03 +0000 (04:45 +0900)]
bpo-22276: Change pathlib.Path.glob not to ignore trailing path separator (GH-10349)
Now pathlib.Path.glob() **only** matches directories when the pattern ends in a path separator.
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Yurii Karabas [Thu, 28 Apr 2022 15:24:19 +0000 (18:24 +0300)]
gh-91603: Speed up isinstance/issubclass on union types (GH-91631)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Abhigyan Bose [Thu, 28 Apr 2022 14:50:27 +0000 (20:20 +0530)]
gh-91832: Add 'required' attr to argparse.Action repr (GH-91841)
# Adding 'required' to names in Lib.argparse.Action
gh-91832:
Added 'required' to the list `names` in `Lib.argparse.Action`.
Changed constant strings that test the Action object.
Automerge-Triggered-By: GH:merwok
Petr Viktorin [Thu, 28 Apr 2022 14:30:28 +0000 (16:30 +0200)]
gh-91324: List feature macros in the stable ABI manifest, improve tests (GH-32415)
Ethan Smith [Thu, 28 Apr 2022 12:14:19 +0000 (05:14 -0700)]
gh-84461: Add HOSTRUNNER for program to run Python executable (GH-91931)
`HOSTRUNNER` is a program which can be used to run `BUILDPYTHON` for the host platform (for example, `python.js` requires `node`).
Also change depedencies from `build_all` to `all` so that targets which can't build everything (e.g. WASM) can still run `buildbottest` and `pythoninfo`.
cc @tiran
Victor Stinner [Thu, 28 Apr 2022 12:02:45 +0000 (14:02 +0200)]
gh-89479: Export _Py_GetSpecializationStats() internal function (#92011)
When Python is built with "./configure --enable-pystats" (if the
Py_STATS macro is defined), the _Py_GetSpecializationStats() function
must be exported, since it's used by the _opcode extension which is
built as a shared library.
Abhigyan Bose [Thu, 28 Apr 2022 11:29:24 +0000 (16:59 +0530)]
gh-91984: Fix trailing spaces in multiline test strings in test_argparse (GH-91986)
Serhiy Storchaka [Thu, 28 Apr 2022 10:25:33 +0000 (13:25 +0300)]
gh-91603: Speed up operator "|" for UnionType (GH-91955)
Reduce the complexity from O((M+N)^2) to O(M*N), where M and N are the length
of __args__ for both operands (1 for operand which is not a UnionType).
As a consequence, the complexity of parameter substitution in UnionType has
been reduced from O(N^3) to O(N^2).
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
Dennis Sweeney [Thu, 28 Apr 2022 04:36:34 +0000 (00:36 -0400)]
gh-91869: Fix tracing of specialized instructions with extended args (GH-91945)
Brett Cannon [Thu, 28 Apr 2022 03:26:33 +0000 (20:26 -0700)]
gh-91217: deprecate uu (GH-92009)
Automerge-Triggered-By: GH:brettcannon
Ashwin Ramaswami [Wed, 27 Apr 2022 22:25:03 +0000 (18:25 -0400)]
Add note that headers added via urllib.request.add_header are added to redirected requests (#30708)
slateny [Wed, 27 Apr 2022 22:03:03 +0000 (15:03 -0700)]
gh-84459: Make wording more specific for Path.replace (GH-91853)
#84459
Simon de Vlieger [Wed, 27 Apr 2022 21:28:56 +0000 (23:28 +0200)]
Correct method name typo (#91970)
Serhiy Storchaka [Wed, 27 Apr 2022 17:15:14 +0000 (20:15 +0300)]
gh-87999: Change warning type for numeric literal followed by keyword (GH-91980)
The warning emitted by the Python parser for a numeric literal
immediately followed by keyword has been changed from deprecation
warning to syntax warning.
Serhiy Storchaka [Wed, 27 Apr 2022 16:16:20 +0000 (19:16 +0300)]
gh-91810: Expand ElementTree.write() tests to use non-ASCII data (GH-91989)
David CARLIER [Wed, 27 Apr 2022 12:47:17 +0000 (13:47 +0100)]
gh-91498: socket: Add TCP_CONNECTION_INFO on macOS (#69256)
Fixes GH-91498
Dennis Sweeney [Wed, 27 Apr 2022 10:45:40 +0000 (06:45 -0400)]
gh-91719: Mark pycore_opcode.h as generated in .gitattributes (#91976)
Victor Stinner [Wed, 27 Apr 2022 08:40:57 +0000 (10:40 +0200)]
gh-91320: Add _Py_reinterpret_cast() macro (#91959)
Fix C++ compiler warnings about "old-style cast"
(g++ -Wold-style-cast) in the Python C API. Use C++
reinterpret_cast<> and static_cast<> casts when the Python C API is
used in C++.
Example of fixed warning:
Include/object.h:107:43: error: use of old-style cast to
‘PyObject*’ {aka ‘struct _object*’} [-Werror=old-style-cast]
#define _PyObject_CAST(op) ((PyObject*)(op))
Add _Py_reinterpret_cast() and _Py_static_cast() macros.
Alexander Shadchin [Wed, 27 Apr 2022 06:30:54 +0000 (09:30 +0300)]
Fix missing `f` prefix on f-strings (GH-91910)
Victor Stinner [Tue, 26 Apr 2022 20:43:50 +0000 (22:43 +0200)]
gh-68966: Deprecate the mailcap module (#91951)
slateny [Tue, 26 Apr 2022 19:12:02 +0000 (12:12 -0700)]
bpo-21761: Clarify __file__/__cached__ in import reference (GH-31565)
Automerge-Triggered-By: GH:brettcannon
Serhiy Storchaka [Tue, 26 Apr 2022 18:07:25 +0000 (21:07 +0300)]
gh-91870: Remove unsupported SRE opcode CALL (GH-91872)
It was initially added to support atomic groups, but that
support was never fully implemented, and CALL was only left
in the compiler, but not interpreter and parser.
ATOMIC_GROUP is now used to support atomic groups.
Brett Cannon [Tue, 26 Apr 2022 17:45:08 +0000 (10:45 -0700)]
gh-91217: deprecate telnetlib (GH-91958)
Serhiy Storchaka [Tue, 26 Apr 2022 05:01:33 +0000 (08:01 +0300)]
gh-91917: Fix test_zipfile on non-UTF-8 locale (GH-91921)
Skip the extraction test if file names are not encodable.
Serhiy Storchaka [Tue, 26 Apr 2022 05:00:47 +0000 (08:00 +0300)]
gh-91916: Fix test_runpy on non-UTF-8 locale (GH-91920)
If use a non-builtin codec, partially implemented in Python
(e.g. ISO-8859-15), a new RecursionError (with empty error message)
can be raised while handle a RecursionError.
Testing for error message was needed to distinguish
a recursion error from arbitrary RuntimeError. After introducing
RecursionError, it became unnecessary.
Serhiy Storchaka [Tue, 26 Apr 2022 04:59:56 +0000 (07:59 +0300)]
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
Serhiy Storchaka [Tue, 26 Apr 2022 04:58:41 +0000 (07:58 +0300)]
gh-91915: Fix test_netrc on non-UTF-8 locale (GH-91918)
Jelle Zijlstra [Tue, 26 Apr 2022 03:30:25 +0000 (20:30 -0700)]
gh-91860: Add typing.dataclass_transform (PEP 681) (#91861)
Copied from typing-extensions (python/typing#1054, python/typing#1120).
Documentation is intentionally omitted, so we can focus on getting the
runtime part in before the feature freeze.
Brett Cannon [Mon, 25 Apr 2022 23:26:43 +0000 (16:26 -0700)]
gh-91217: deprecate sunau (GH-91866)
Gregory P. Smith [Mon, 25 Apr 2022 23:19:39 +0000 (16:19 -0700)]
gh-91401: Add a failsafe way to disable vfork. (#91490)
Just in case there is ever an issue with _posixsubprocess's use of
vfork() due to the complexity of using it properly and potential
directions that Linux platforms where it defaults to on could take, this
adds a failsafe so that users can disable its use entirely by setting
a global flag.
No known reason to disable it exists. But it'd be a shame to encounter
one and not be able to use CPython without patching and rebuilding it.
See the linked issue for some discussion on reasoning.
Also documents the existing way to disable posix_spawn.
Mariusz Felisiak [Mon, 25 Apr 2022 22:33:45 +0000 (00:33 +0200)]
bpo-46907: Update Windows installer to SQLite 3.38.2 (GH-32147)
Victor Stinner [Mon, 25 Apr 2022 22:14:30 +0000 (00:14 +0200)]
gh-91719: Add pycore_opcode.h internal header file (#91906)
Move the following API from Include/opcode.h (public C API) to a new
Include/internal/pycore_opcode.h header file (internal C API):
* EXTRA_CASES
* _PyOpcode_Caches
* _PyOpcode_Deopt
* _PyOpcode_Jump
* _PyOpcode_OpName
* _PyOpcode_RelativeJump
Victor Stinner [Mon, 25 Apr 2022 22:13:31 +0000 (00:13 +0200)]
gh-64783: Fix signal.NSIG value on FreeBSD (#91929)
Fix signal.NSIG value on FreeBSD to accept signal numbers greater
than 32, like signal.SIGRTMIN and signal.SIGRTMAX.
* Add Py_NSIG constant.
* Add pycore_signal.h internal header file.
* _Py_Sigset_Converter() now includes the range of valid signals in
the error message.
Victor Stinner [Mon, 25 Apr 2022 22:11:34 +0000 (00:11 +0200)]
gh-89653: PEP 670: Functions don't cast pointers (#91697)
In the limited C API version 3.11 and newer, the following functions
no longer cast their object pointer argument with _PyObject_CAST() or
_PyObject_CAST_CONST():
* Py_REFCNT(), Py_TYPE(), Py_SIZE()
* Py_SET_REFCNT(), Py_SET_TYPE(), Py_SET_SIZE()
* Py_IS_TYPE()
* Py_INCREF(), Py_DECREF()
* Py_XINCREF(), Py_XDECREF()
* Py_NewRef(), Py_XNewRef()
* PyObject_TypeCheck()
* PyType_Check()
* PyType_CheckExact()
Split Py_DECREF() implementation in 3 versions to make the code more
readable.
Update the xxlimited.c extension, which uses the limited C API
version 3.11, to pass PyObject* to these functions.
David Hewitt [Mon, 25 Apr 2022 15:56:20 +0000 (16:56 +0100)]
gh-91880: add try/except around `signal.signal` (#91881)
Fixes gh-91880.
Serhiy Storchaka [Mon, 25 Apr 2022 14:35:14 +0000 (17:35 +0300)]
gh-91904: Fix setting envvar PYTHONREGRTEST_UNICODE_GUARD (GH-91905)
It always failed on non-UTF-8 locale and prevented running regrtests.
Jelle Zijlstra [Mon, 25 Apr 2022 13:40:18 +0000 (06:40 -0700)]
gh-90633: Improve error and docs for typing.assert_never (#91720)
Closes #90633
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Christian Heimes [Mon, 25 Apr 2022 10:58:25 +0000 (13:58 +0300)]
gh-84461: Include _emscripten_info in pythoninfo output (GH-91907)
Ezio Melotti [Mon, 25 Apr 2022 10:05:54 +0000 (12:05 +0200)]
gh-91888: add a `:gh:` role to the documentation (#91889)
* Add a new :gh:`...` role for GitHub issues.
* Fix a GitHub id to use the :gh: role.
* Add Misc/NEWS entry.
* Refactoring and rephrasing.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Barry Warsaw [Sun, 24 Apr 2022 22:50:07 +0000 (15:50 -0700)]
Rewrite audio.py to jive with image.py (#91886)
Similar to the rewrite of email/mime/image.py and associated test after the
deprecation of imghdr.py, thisrewrites email/mime/audio.py and associated
tests after the deprecation of sndhdr.py.
Closes #91885
Jelle Zijlstra [Sun, 24 Apr 2022 22:02:57 +0000 (15:02 -0700)]
gh-91821: Make decimal test succeed consistently (#91825)
The test relies on precision being set to 9, but some ways of
invoking this test leave it set to 28 instead. I don't know
exactly how it happens, but setting the precision directly should
make the behavior consistent.
Jelle Zijlstra [Sun, 24 Apr 2022 21:13:15 +0000 (14:13 -0700)]
gh-91491: What's New in 3.11 section for typing PEPs (#91721)
Other aspects of typing aren't covered yet; I'll do that in a
separate PR.
Serhiy Storchaka [Sun, 24 Apr 2022 07:23:59 +0000 (10:23 +0300)]
Simplify testing the warning filename (GH-91868)
The context manager result has the "filename" attribute.
Zac Hatfield-Dodds [Sun, 24 Apr 2022 00:55:22 +0000 (17:55 -0700)]
gh-91230: Concise catch_warnings with simplefilter (#91435)
Brett Cannon [Sat, 23 Apr 2022 21:48:17 +0000 (14:48 -0700)]
gh-91217: deprecate spwd (#91846)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Serhiy Storchaka [Sat, 23 Apr 2022 15:49:23 +0000 (18:49 +0300)]
RE: Pre-split the list of opcode names (GH-91859)
1. It makes them interned.
2. It allows to add comments to individual opcodes.
Christian Heimes [Sat, 23 Apr 2022 12:59:33 +0000 (15:59 +0300)]
gh-84461: Add --enable-wasm-pthreads and more file systems (GH-91820)
Serhiy Storchaka [Sat, 23 Apr 2022 09:50:42 +0000 (12:50 +0300)]
gh-91308: Simplify parsing inline flag "x" (verbose) (GH-91855)
Serhiy Storchaka [Sat, 23 Apr 2022 09:49:06 +0000 (12:49 +0300)]
RE: Add more tests for inline flag "x" and re.VERBOSE (GH-91854)
Christian Heimes [Sat, 23 Apr 2022 07:52:16 +0000 (10:52 +0300)]
gh-84461: Add sys._emscripten_info, improve docs and build (gh-91781)
Pablo Galindo Salgado [Sat, 23 Apr 2022 02:16:48 +0000 (03:16 +0100)]
gh-88116: Enhance the inspect frame APIs to use the extended position information (GH-91531)
slateny [Sat, 23 Apr 2022 00:30:52 +0000 (17:30 -0700)]
gh-85864: Mark positional-only args in io docs (#91683)
Shantanu [Fri, 22 Apr 2022 23:01:52 +0000 (16:01 -0700)]
gh-91547: Remove "Undocumented modules" page (#91682)
Brett Cannon [Fri, 22 Apr 2022 22:48:03 +0000 (15:48 -0700)]
gh-91217: deprecate-sndhdr (#91806)
Also inline necessary functionality from `sndhdr` into `email.mime.audio` for `MIMEAudio`.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Géry Ogam [Fri, 22 Apr 2022 22:47:09 +0000 (00:47 +0200)]
bpo-46720: Add support for path-like objects to multiprocessing.set_executable for Windows (GH-31279)
This bring the API to be on a par with Unix-like systems.
Serhiy Storchaka [Fri, 22 Apr 2022 18:37:46 +0000 (21:37 +0300)]
gh-91575: Add a script for generating data for case-insensitive matching in re (GH-91660)
Also test that all extra cases are in BMP.
Serhiy Storchaka [Fri, 22 Apr 2022 16:53:10 +0000 (19:53 +0300)]
gh-91700: Validate the group number in conditional expression in RE (GH-91702)
In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.
Previously it raised RuntimeError: invalid SRE code.
Serhiy Storchaka [Fri, 22 Apr 2022 15:35:28 +0000 (18:35 +0300)]
gh-90568: Fix exception type for \N with a named sequence in RE (GH-91665)
re.error is now raised instead of TypeError.
Guido van Rossum [Fri, 22 Apr 2022 14:46:26 +0000 (07:46 -0700)]
gh-89279: In ceval.c, redefine some macros for speed (#32387)
Macros Py_DECREF, Py_XDECREF, Py_IS_TYPE, _Py_atomic_load_32bit_impl
and _Py_DECREF_SPECIALIZED are redefined as macros
that completely replace the inline functions of the same name.
These three came out in the top four of functions that (in MSVC)
somehow weren't inlined.
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Dominic Davis-Foster [Fri, 22 Apr 2022 14:28:39 +0000 (15:28 +0100)]
gh-91764: Mark version typing.Unpack and LiteralString were added in (#91817)
Closes GH-91764
Erlend Egeberg Aasland [Fri, 22 Apr 2022 12:59:18 +0000 (14:59 +0200)]
gh-89653: PEP 670: Amend docs (GH-91813)
Victor Stinner [Fri, 22 Apr 2022 11:05:36 +0000 (13:05 +0200)]
gh-80527: Deprecate PEP 623 Unicode functions (#91801)
Deprecate functions:
* PyUnicode_AS_DATA()
* PyUnicode_AS_UNICODE()
* PyUnicode_GET_DATA_SIZE()
* PyUnicode_GET_SIZE()
Previously, these functions were macros and so it wasn't possible to
decorate them with Py_DEPRECATED().
Petr Viktorin [Fri, 22 Apr 2022 10:44:43 +0000 (12:44 +0200)]
Docs: Clarify availability of PyOS_CheckStack (GH-91816)
Sam Ezeh [Fri, 22 Apr 2022 04:27:15 +0000 (05:27 +0100)]
gh-91291: Accept attributes as keyword arguments in decimal.localcontext (#32242)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Matthew Rahtz [Fri, 22 Apr 2022 04:22:53 +0000 (05:22 +0100)]
bpo-43224: Implement pickling of TypeVarTuples (#32119)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Brett Cannon [Fri, 22 Apr 2022 02:28:34 +0000 (19:28 -0700)]
gh-91217: deprecate-pipes (GH-91779)
Erlend Egeberg Aasland [Fri, 22 Apr 2022 01:45:16 +0000 (03:45 +0200)]
gh-69093: Add indexing and slicing support to sqlite3.Blob (#91599)
Authored-by: Aviv Palivoda <palaviv@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
Inada Naoki [Fri, 22 Apr 2022 01:39:24 +0000 (10:39 +0900)]
gh-91156: Use `locale.getencoding()` instead of getpreferredencoding (GH-91732)
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Thu, 21 Apr 2022 21:26:25 +0000 (23:26 +0200)]
gh-89653: Add assertions to unicodeobject.h functions (#91800)
Victor Stinner [Thu, 21 Apr 2022 21:07:13 +0000 (23:07 +0200)]
gh-89653: PEP 670: Convert unicodeobject.h macros to functions (#91799)
Convert unicodeobject.h macros to static inline functions:
* PyUnicode_AS_DATA()
* PyUnicode_AS_UNICODE()
* PyUnicode_GET_DATA_SIZE()
* PyUnicode_GET_SIZE()
Static inline functions are wrapped by macros which casts arguments
with _PyObject_CAST() to prevent introducing new compiler warnings
when passing "const PyObject*".
Victor Stinner [Thu, 21 Apr 2022 21:04:01 +0000 (23:04 +0200)]
gh-89373: _Py_Dealloc() checks tp_dealloc exception (#32357)
If Python is built in debug mode, _Py_Dealloc() now ensures that the
tp_dealloc function leaves the current exception unchanged.
Victor Stinner [Thu, 21 Apr 2022 21:00:42 +0000 (23:00 +0200)]
gh-79315: Add Include/cpython/pythread.h header (#91798)
Victor Stinner [Thu, 21 Apr 2022 21:00:26 +0000 (23:00 +0200)]
gh-79315: Add Include/cpython/modsupport.h header (#91797)
Victor Stinner [Thu, 21 Apr 2022 20:44:23 +0000 (22:44 +0200)]
gh-89653: PEP 670: Group deprecated API in unicodeobject.h (#91796)
Victor Stinner [Thu, 21 Apr 2022 20:07:19 +0000 (22:07 +0200)]
gh-91768: C API no longer use "const PyObject*" type (#91769)
Py_REFCNT(), Py_TYPE(), Py_SIZE() and Py_IS_TYPE() functions argument
type is now "PyObject*", rather than "const PyObject*".
* Replace also "const PyObject*" with "PyObject*" in functions:
* _Py_strhex_impl()
* _Py_strhex_with_sep()
* _Py_strhex_bytes_with_sep()
* Remove _PyObject_CAST_CONST() and _PyVarObject_CAST_CONST() macros.
* Py_IS_TYPE() can now use Py_TYPE() in its implementation.