]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Christian Heimes [Thu, 14 Apr 2022 14:27:41 +0000 (17:27 +0300)]
gh-84461: Drop -sWASM, fix building tests for browser (GH-91530)
- drop unnecessary ``=1`` suffix from Emscripten flags
- drop unnecessary ``-sWASM`` flag for side modules
- rename ``build_platform`` to ``build_wasm``. I introduced the target
for WASM builds a couple of months ago.
- fix ``--enable-test-modules`` for browser builds
Hood Chatham [Thu, 14 Apr 2022 14:27:01 +0000 (07:27 -0700)]
gh-91353: Fix void return type handling in ctypes (GH-32246)
Ezio Melotti [Thu, 14 Apr 2022 14:06:01 +0000 (16:06 +0200)]
Add redirects to Misc/NEWS bpo links (#91454)
slateny [Thu, 14 Apr 2022 08:23:57 +0000 (01:23 -0700)]
gh-90879: Fix missing parameter for put_nowait() (GH-91514)
Inada Naoki [Thu, 14 Apr 2022 07:00:35 +0000 (16:00 +0900)]
gh-91156: Fix `encoding="locale"` in UTF-8 mode (GH-70056)
Dong-hee Na [Thu, 14 Apr 2022 05:57:25 +0000 (14:57 +0900)]
gh-90699: Remove usage of _Py_IDENTIFIER from bisect module. (GH-91522)
slateny [Thu, 14 Apr 2022 04:15:00 +0000 (21:15 -0700)]
gh-90326: Remove quotes for logging config (GH-91516)
Pieter Eendebak [Thu, 14 Apr 2022 02:20:38 +0000 (04:20 +0200)]
gh-91266: refactor bytearray strip methods (GH-32096)
Alix Lourme [Thu, 14 Apr 2022 02:19:16 +0000 (04:19 +0200)]
gh-87497: Document that urllib.request sends headers in camel case (GH-24661)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
L. A. F. Pereira [Wed, 13 Apr 2022 22:09:20 +0000 (15:09 -0700)]
Fill holes in internal compiler structs (#91458)
Irit Katriel [Wed, 13 Apr 2022 20:45:33 +0000 (21:45 +0100)]
gh-90449: Improve accuracy and readability of exceptions tutorial (GH-31899)
Brett Cannon [Wed, 13 Apr 2022 17:47:41 +0000 (10:47 -0700)]
gh-91217: deprecate imghdr (#91461)
* Deprecate imghdr
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Update Doc/whatsnew/3.11.rst
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Inline `imghdr` into `email.mime.image`
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
David Foster [Wed, 13 Apr 2022 14:52:19 +0000 (10:52 -0400)]
gh-91243: Update authors for Required[] and NotRequired[] implementation (GH-91506)
Nikita Sobolev [Wed, 13 Apr 2022 14:42:25 +0000 (17:42 +0300)]
gh-90971: suppress deprecation warning in `test_lib2to3`(GH-31464)
Fixes GH-90971
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
Pablo Galindo Salgado [Wed, 13 Apr 2022 13:06:56 +0000 (14:06 +0100)]
gh-91502: Add a new API to check if a frame is an entry frame (GH-91503)
Dustin Rodrigues [Wed, 13 Apr 2022 08:07:10 +0000 (04:07 -0400)]
bpo-43218: Prevent venv creation when the target directory contains a PATH separator. (GH-24530)
Serhiy Storchaka [Wed, 13 Apr 2022 03:08:49 +0000 (06:08 +0300)]
bpo-43224: Forbid TypeVar substitution with Unpack (GH-32031)
Tobias Stoeckmann [Wed, 13 Apr 2022 03:01:02 +0000 (05:01 +0200)]
gh-91421: Use constant value check during runtime (GH-91422)
The left-hand side expression of the if-check can be converted to a
constant by the compiler, but the addition on the right-hand side is
performed during runtime.
Move the addition from the right-hand side to the left-hand side by
turning it into a subtraction there. Since the values are known to
be large enough to not turn negative, this is a safe operation.
Prevents a very unlikely integer overflow on 32 bit systems.
Fixes GH-91421.
Jelle Zijlstra [Tue, 12 Apr 2022 19:31:02 +0000 (12:31 -0700)]
gh-91243: Add typing.Required and NotRequired (PEP 655) (GH-32419)
I talked to @davidfstr and I offered to implement the runtime part of PEP 655
to make sure we can get it in before the feature freeze. We're going to defer
the documentation to a separate PR, because it can wait until after the feature
freeze.
The runtime implementation conveniently already exists in typing-extensions,
so I largely copied that.
Co-authored-by: David Foster <david@dafoster.net>
Serhiy Storchaka [Tue, 12 Apr 2022 15:34:06 +0000 (18:34 +0300)]
bpo-47152: Automatically regenerate sre_constants.h (GH-91439)
* Move the code for generating Modules/_sre/sre_constants.h from
Lib/re/_constants.py into a separate script
Tools/scripts/generate_sre_constants.py.
* Add target `regen-sre` in the makefile.
* Make target `regen-all` depending on `regen-sre`.
Ilya Leoshkevich [Tue, 12 Apr 2022 13:46:40 +0000 (15:46 +0200)]
gh-90839: Forward gzip.compress() compresslevel to zlib (gh-31215)
Irit Katriel [Tue, 12 Apr 2022 13:35:56 +0000 (14:35 +0100)]
gh-91276: make space for longer opcodes in dis output (GH-91444)
Jack DeVries [Tue, 12 Apr 2022 00:57:52 +0000 (20:57 -0400)]
gh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434)
* add a paragraph to document this kwarg in detail
* update docstring in the source accordingly
Erlend Egeberg Aasland [Tue, 12 Apr 2022 00:55:59 +0000 (02:55 +0200)]
gh-79097: Add support for aggregate window functions in sqlite3 (GH-20903)
Brett Cannon [Tue, 12 Apr 2022 00:02:19 +0000 (17:02 -0700)]
gh-91217: deprecate crypt (GH-91459)
Dennis Sweeney [Mon, 11 Apr 2022 22:33:00 +0000 (18:33 -0400)]
gh-91428: Add _PyOpcode_OpName to opcode.h of debug builds (GH-91430)
Brett Cannon [Mon, 11 Apr 2022 22:02:41 +0000 (15:02 -0700)]
gh-47061: Deprecate `chunk` (GH-91419)
Dennis Sweeney [Mon, 11 Apr 2022 20:07:09 +0000 (16:07 -0400)]
gh-91117: Ensure integer mod and pow operations use cached small ints (GH-31843)
Oleg Iarygin [Mon, 11 Apr 2022 16:34:17 +0000 (19:34 +0300)]
Remove dead "Check PRs with 'CLA not signed' label" (#91429)
Ezio Melotti [Mon, 11 Apr 2022 15:59:35 +0000 (17:59 +0200)]
Update Sphinx bpo role to use redirect URI. (#32342)
roy reznik [Mon, 11 Apr 2022 15:10:34 +0000 (18:10 +0300)]
gh-91423: Remove bugs.python.org from bugs.rst (GH-91425)
* Remove bugs.python.org from bugs.rst
* Update bugs.rst to the github issue tracker
* reflow
* Fix a typo and rephrase a sentence.
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Mark Shannon [Mon, 11 Apr 2022 15:05:20 +0000 (16:05 +0100)]
GH-89480: Document motivation, design and implementation of 3.11 frame stack. (GH-32304)
Adrian Garcia Badaracco [Mon, 11 Apr 2022 14:51:25 +0000 (09:51 -0500)]
bpo-44807: Allow Protocol classes to define __init__ (GH-31628)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
John Belmonte [Mon, 11 Apr 2022 14:34:18 +0000 (23:34 +0900)]
bpo-45995: add "z" format specifer to coerce negative 0 to zero (GH-30049)
Add "z" format specifier to coerce negative 0 to zero.
See https://github.com/python/cpython/issues/90153 (originally https://bugs.python.org/issue45995) for discussion.
This covers `str.format()` and f-strings. Old-style string interpolation is not supported.
Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Irit Katriel [Mon, 11 Apr 2022 09:40:24 +0000 (10:40 +0100)]
bpo-47120: make POP_JUMP_IF_TRUE/FALSE/NONE/NOT_NONE relative (GH-32400)
Oleg Iarygin [Sun, 10 Apr 2022 22:03:27 +0000 (01:03 +0300)]
Replace contributor-visible mentions of BPO in .github/* (GH-91426)
Łukasz Langa [Sun, 10 Apr 2022 20:50:18 +0000 (22:50 +0200)]
Remove linking to bugs.python.org from the README (#91418)
Fixes #91424.
Ezio Melotti [Sun, 10 Apr 2022 19:13:33 +0000 (21:13 +0200)]
Remove the issue template config after the migration (GH-32106)
Ee Durbin [Sun, 10 Apr 2022 17:48:53 +0000 (13:48 -0400)]
notify new-bugs-announce on new issue open (#32421)
Christian Heimes [Sun, 10 Apr 2022 07:29:51 +0000 (10:29 +0300)]
bpo-40280: WASM docs and smaller browser builds (GH-32412)
Co-authored-by: Brett Cannon <brett@python.org>
Ville Skyttä [Sat, 9 Apr 2022 18:37:01 +0000 (21:37 +0300)]
bpo-22295: use python -m pip rather than plain pip in more examples (GH-24003)
jonasdlindner [Sat, 9 Apr 2022 09:12:15 +0000 (11:12 +0200)]
Fix some typos in comments (GH-32422)
Inada Naoki [Sat, 9 Apr 2022 00:54:54 +0000 (09:54 +0900)]
bpo-47000: Add `locale.getencoding()` (GH-32068)
Brett Cannon [Sat, 9 Apr 2022 00:15:35 +0000 (17:15 -0700)]
bpo-47061: deprecate cgi and cgitb (GH-32410)
Part of PEP 594.
Alexey Izbyshev [Fri, 8 Apr 2022 17:40:39 +0000 (20:40 +0300)]
bpo-47260: Fix os.closerange() potentially being a no-op in a seccomp sandbox (GH-32418)
_Py_closerange() currently assumes that close_range() closes
all file descriptors even if it returns an error (other than ENOSYS).
This assumption can be wrong on Linux if a seccomp sandbox denies
the underlying syscall, pretending that it returns EPERM or EACCES.
In this case _Py_closerange() won't close any descriptors at all,
which in the worst case can be a security issue.
Fix this by falling back to other methods in case of any close_range()
error. Note that fallbacks will not be triggered on any problems with
closing individual file descriptors because close_range() is documented
to ignore such errors on both Linux[1] and FreeBSD[2].
[1] https://man7.org/linux/man-pages/man2/close_range.2.html
[2] https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2
Raymond Hettinger [Fri, 8 Apr 2022 13:36:20 +0000 (08:36 -0500)]
Fix bad grammar and import docstring for split/rsplit (GH-32381)
Petr Viktorin [Fri, 8 Apr 2022 12:35:11 +0000 (14:35 +0200)]
Add feature macro PY_HAVE_THREAD_NATIVE_ID to the stable ABI definition (GH-32365)
Mark Shannon [Fri, 8 Apr 2022 11:18:57 +0000 (12:18 +0100)]
Add new PyFrame_GetLasti C-API function (GH-32413)
Raymond Hettinger [Fri, 8 Apr 2022 02:10:00 +0000 (21:10 -0500)]
Clarify that this sentence applies to the above example. GH-32405
Dong-hee Na [Thu, 7 Apr 2022 23:27:00 +0000 (08:27 +0900)]
bpo-47250: Fix refleak from object.__getstate__() (GH-32403)
Co-authored-by: Brandt Bucher <brandt@python.org>
Brandt Bucher [Thu, 7 Apr 2022 19:31:01 +0000 (12:31 -0700)]
bpo-47177: Replace `f_lasti` with `prev_instr` (GH-32208)
Brett Cannon [Thu, 7 Apr 2022 19:27:35 +0000 (12:27 -0700)]
Deprecate audioop (GH-32392)
CAM Gerlach [Thu, 7 Apr 2022 18:27:14 +0000 (13:27 -0500)]
Doc: Fix spurious comma in the author metadata field (GH-32386)
Signed-off-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Frederick [Thu, 7 Apr 2022 16:29:23 +0000 (09:29 -0700)]
ssl docs: Fix typo (GH-32336)
Jelle Zijlstra [Thu, 7 Apr 2022 14:02:54 +0000 (07:02 -0700)]
c-api docs: There are five fields, not four (GH-32379)
Christian Heimes [Thu, 7 Apr 2022 07:22:47 +0000 (10:22 +0300)]
bpo-40280: Detect missing threading on WASM platforms (GH-32352)
Co-authored-by: Brett Cannon <brett@python.org>
Raymond Hettinger [Thu, 7 Apr 2022 03:00:47 +0000 (22:00 -0500)]
Remove micro-optimization that no longer shows a benefit. (GH-32397)
Géry Ogam [Thu, 7 Apr 2022 01:38:35 +0000 (03:38 +0200)]
pickle docs: Fix typos and improve wording (GH-24776)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Eric Wieser [Thu, 7 Apr 2022 01:31:39 +0000 (02:31 +0100)]
doc: Link to `string.capwords` from `str.title` (GH-20913)
Since `title()` mentions its own short-comings, it should also mention the library function which does not possess them.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Frederick [Thu, 7 Apr 2022 00:51:35 +0000 (17:51 -0700)]
ssl docs: Fix typo (GH-32314)
Boris Verkhovskiy [Thu, 7 Apr 2022 00:51:05 +0000 (17:51 -0700)]
pkgutil docs: Link sys constants, add backticks (GH-32356)
Co-authored-by: Éric <merwok@netwok.org>
Victor Stinner [Thu, 7 Apr 2022 00:29:52 +0000 (02:29 +0200)]
bpo-35134: Remove the Include/code.h header file (GH-32385)
Remove the Include/code.h header file. C extensions should only
include the main <Python.h> header file.
Python.h includes directly Include/cpython/code.h instead.
Victor Stinner [Wed, 6 Apr 2022 23:26:24 +0000 (01:26 +0200)]
bpo-35134: Add Include/cpython/setobject.h header (GH-32384)
Steve Dower [Wed, 6 Apr 2022 23:09:54 +0000 (00:09 +0100)]
bpo-47239: Fixes py.exe output when run in a virtual environment. (GH-32364)
Victor Stinner [Wed, 6 Apr 2022 23:05:27 +0000 (01:05 +0200)]
bpo-35134: Add Include/cpython/complexobject.h header (GH-32383)
Move the private _PyComplex_FormatAdvancedWriter() function to the
internal C API. This function is no longer exported.
Jeremy Kloth [Wed, 6 Apr 2022 21:55:58 +0000 (15:55 -0600)]
bpo-46576: Speed up test_peg_generator by using a static library for shared sources (GH-32338)
Speed up test_peg_generator by using a static library for shared sources to avoid recompiling as much code.
Raymond Hettinger [Wed, 6 Apr 2022 19:35:05 +0000 (14:35 -0500)]
Change parameter name from *x* for reals to *n* for integers. (GH-32377)
Brett Cannon [Wed, 6 Apr 2022 18:22:39 +0000 (11:22 -0700)]
bpo-47061: use `warnings._deprecated()` with asynchat, asyncore, and smtpd (GH-32350)
Géry Ogam [Wed, 6 Apr 2022 18:03:36 +0000 (20:03 +0200)]
Minor code nit: Move an unrelated statement out of a try clause in Sequence.index (GH-32330)
Serhiy Storchaka [Wed, 6 Apr 2022 17:00:14 +0000 (20:00 +0300)]
bpo-26579: Add object.__getstate__(). (GH-2821)
Copying and pickling instances of subclasses of builtin types
bytearray, set, frozenset, collections.OrderedDict, collections.deque,
weakref.WeakSet, and datetime.tzinfo now copies and pickles instance attributes
implemented as slots.
Mathieu Dupuy [Wed, 6 Apr 2022 16:57:54 +0000 (18:57 +0200)]
Remove python2 support in logging cookbook example. (GH-32362)
Serhiy Storchaka [Wed, 6 Apr 2022 16:57:13 +0000 (19:57 +0300)]
bpo-46721: Optimize set.issuperset() for non-set arguments (GH-31280)
Serhiy Storchaka [Wed, 6 Apr 2022 16:56:28 +0000 (19:56 +0300)]
bpo-43464: Optimize set.intersection() for non-set arguments (GH-31316)
Serhiy Storchaka [Wed, 6 Apr 2022 16:54:44 +0000 (19:54 +0300)]
bpo-47227: Suppress expression chaining for more RE parsing errors (GH-32333)
Serhiy Storchaka [Wed, 6 Apr 2022 16:53:50 +0000 (19:53 +0300)]
bpo-47211: Remove function re.template() and flag re.TEMPLATE (GH-32300)
They were undocumented and never working.
Ken Jin [Wed, 6 Apr 2022 15:40:51 +0000 (22:40 +0700)]
Fix whitespace/indentation issues in test_sys (GH-32369)
Ian [Wed, 6 Apr 2022 15:39:17 +0000 (11:39 -0400)]
stdtypes docs: fix typo (GH-32349)
Gregory P. Smith [Wed, 6 Apr 2022 15:06:58 +0000 (08:06 -0700)]
bpo-47235: Note where a typo is intentional in code. (GH-32348)
People keep popping up reporting these as typos in the docs despite
being described as typos in the surrounding text. Hopefully a comment
on the line itself makes it more obvious?
Arguably some of the typo examples are not using the "right" typo as the
"assret" one in particular is now detected by default due to how common
it was in actual code. But I don't want to to typo chasing by changing
these examples to be other not yet auto-detected typos as they still
illustrate the point well enough.
Petr Viktorin [Wed, 6 Apr 2022 14:50:45 +0000 (16:50 +0200)]
bpo-47115: Document which parts of structs are in limited API/stable ABI (GH-32196)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Victor Stinner [Wed, 6 Apr 2022 13:12:38 +0000 (15:12 +0200)]
bpo-40421: test_capi uses assertEqual(), not assertEquals() (GH-32361)
unittest.TestCase.assertEquals() alias is depracated. Fix the
warning:
Lib/test/test_capi.py:1100: DeprecationWarning: Please use assertEqual instead.
self.assertEquals(frame.f_locals, _testcapi.frame_getlocals(frame))
Christian Heimes [Wed, 6 Apr 2022 12:33:31 +0000 (15:33 +0300)]
bpo-40280: WASM defaults to no dynamic linking (GH-32360)
Victor Stinner [Wed, 6 Apr 2022 11:58:07 +0000 (13:58 +0200)]
Revert "bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)" (GH-32343)
* Revert "bpo-46850: Move _PyInterpreterState_SetEvalFrameFunc() to internal C API (GH-32054)"
This reverts commit
f877b40e3f7e0d97878884d80fbec879a85ab7e8 .
* Revert "bpo-46850: Move _PyEval_EvalFrameDefault() to internal C API (GH-32052)"
This reverts commit
b9a5522dd952125a99ff554f01f311cae25f5a91 .
Julien Palard [Wed, 6 Apr 2022 11:40:37 +0000 (13:40 +0200)]
[doc] Add missing backtick. (GH-32355)
Ken Jin [Wed, 6 Apr 2022 11:38:25 +0000 (18:38 +0700)]
bpo-47189: What's New in 3.11: Faster CPython (GH-32235)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@users.noreply.github.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Steve Dower [Wed, 6 Apr 2022 10:56:31 +0000 (11:56 +0100)]
bpo-47103: Copy pgort140.dll into output directory when building PGInstrument on Windows (GH-32083)
Steve Dower [Wed, 6 Apr 2022 10:55:47 +0000 (11:55 +0100)]
Fix generation of MD5 table at end of Windows release build (GH-32345)
Pablo Galindo [Tue, 5 Apr 2022 20:10:38 +0000 (21:10 +0100)]
Post 3.11.0a7
Pablo Galindo [Tue, 5 Apr 2022 19:52:24 +0000 (20:52 +0100)]
Python 3.11.0a7
Brett Cannon [Tue, 5 Apr 2022 19:05:48 +0000 (12:05 -0700)]
bpo-47061: deprecate the `aifc` module (GH-32134)
Co-authored-by: Christian Heimes <christian@python.org>
Jeremy Kloth [Tue, 5 Apr 2022 19:03:17 +0000 (13:03 -0600)]
bpo-47230: Silence compiler warnings on Windows from zlib 1.2.12 (GH-32337)
Sam Ezeh [Tue, 5 Apr 2022 18:41:38 +0000 (19:41 +0100)]
bpo-4833: Add ZipFile.mkdir (GH-32160)
Christian Heimes [Tue, 5 Apr 2022 16:18:02 +0000 (19:18 +0300)]
bpo-47009: Fix assert on big endian (GH-32332)
Hugo van Kemenade [Tue, 5 Apr 2022 15:15:11 +0000 (18:15 +0300)]
bpo-46607: Add DeprecationWarning for LegacyInterpolation, deprecated in docs since 3.2 (GH-30927)
Jelle Zijlstra [Tue, 5 Apr 2022 14:21:03 +0000 (07:21 -0700)]
bpo-47088: Add typing.LiteralString (PEP 675) (GH-32064)
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
Erlend Egeberg Aasland [Tue, 5 Apr 2022 14:15:25 +0000 (16:15 +0200)]
bpo-41930: Add support for SQLite serialise/deserialise API (GH-26728)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Matthieu Dartiailh [Tue, 5 Apr 2022 13:47:13 +0000 (15:47 +0200)]
bpo-47212: Improve error messages for un-parenthesized generator expressions (GH-32302)
Erlend Egeberg Aasland [Tue, 5 Apr 2022 12:54:47 +0000 (14:54 +0200)]
bpo-45774: Harden SQLite detection (GH-30016)
Irit Katriel [Tue, 5 Apr 2022 11:49:08 +0000 (12:49 +0100)]
bpo-47120: make JUMP_NO_INTERRUPT relative (GH-32221)
Irit Katriel [Tue, 5 Apr 2022 11:06:22 +0000 (12:06 +0100)]
bpo-47186: Replace JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH + jump (GH-32309)
Dennis Sweeney [Tue, 5 Apr 2022 10:18:30 +0000 (06:18 -0400)]
bpo-47009: Let PRECALL_NO_KW_LIST_APPEND do its own POP_TOP (GH-32239)