Christian Heimes
276c234ce0
bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)
2022-01-13 21:47:42 +01:00
Pablo Galindo
9471106fd5
Python 3.11.0a4
2022-01-13 19:38:15 +00:00
Victor Stinner
1a4d1c1c9b
bpo-46070: _PyGC_Fini() untracks objects (GH-30577)
...
Py_EndInterpreter() now explicitly untracks all objects currently
tracked by the GC. Previously, if an object was used later by another
interpreter, calling PyObject_GC_UnTrack() on the object crashed if
the previous or the next object of the PyGC_Head structure became a
dangling pointer.
2022-01-13 19:28:32 +01:00
Victor Stinner
6be848922b
bpo-44133: Link Python executable with object files (GH-30556)
...
When Python is built without --enable-shared, the "python" program is
now linked to object files, rather than being linked to the Python
library (libpython.a), to make sure that all symbols are exported.
Previously, the linker omitted some symbols like the Py_FrozenMain()
function.
When Python is configured with --without-static-libpython, the Python
static library (libpython.a) is no longer built.
* Check --without-static-libpython earlier in configure.ac
* Add LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variables to Makefile.
* test_capi now ensures that the "Py_FrozenMain" symbol is exported.
2022-01-13 19:24:28 +01:00
Victor Stinner
0885999a8e
bpo-46355: Document PyFrameObject and PyThreadState changes (GH-30558)
...
Document PyFrameObject and PyThreadState changes in What's New in
Python 3.11 and explain how to port code.
2022-01-13 19:21:50 +01:00
Nikita Sobolev
f779faccd3
bpo-46358: modernize `test_asyncio` (GH-30562)
2022-01-13 23:28:02 +09:00
Nikita Sobolev
8c49d057bf
bpo-46359: Modernize `test_typing` by removing checks for EOL Python versions (GH-30563)
...
Also removes unused tests meant for older versions of Python.
2022-01-13 21:09:40 +08:00
Irit Katriel
c590b581bb
bpo-46328: Add sys.exception() (GH-30514)
2022-01-13 12:35:58 +00:00
Irit Katriel
9c2ebb906d
bpo-46344: Fix trace bug in else of try and try-star blocks (GH-30544)
2022-01-13 12:34:38 +00:00
Christian Heimes
443b308fee
bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455)
2022-01-13 09:46:38 +01:00
Christian Heimes
a6ca8eee22
bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507)
2022-01-13 09:46:04 +01:00
Nikita Sobolev
1de60155d5
bpo-46345: Add a test case for implicit `Optional` class attribute (GH-30535)
2022-01-12 15:35:44 -08:00
Eric Snow
ed57b36c32
bpo-45953: Statically allocate the main interpreter (and initial thread state). (gh-29883)
...
Previously, the main interpreter was allocated on the heap during runtime initialization. Here we instead embed it into _PyRuntimeState, which means it is statically allocated as part of the _PyRuntime global. The same goes for the initial thread state (of each interpreter, including the main one). Consequently there are fewer allocations during runtime/interpreter init, fewer possible failures, and better memory locality.
FYI, this also helps efforts to consolidate globals, which in turns helps work on subinterpreter isolation.
https://bugs.python.org/issue45953
2022-01-12 16:28:46 -07:00
Jelle Zijlstra
0bbf30e2b9
bpo-46342: make @typing.final introspectable (GH-30530)
...
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2022-01-12 11:38:25 -08:00
Christian Heimes
e34c9367f8
bpo-40280: Allow to compile _testcapi as builtin module (GH-30559)
2022-01-12 20:27:37 +01:00
Tim Peters
fc05e6bfce
bpo-46020: Optimize long_pow for the common case (GH-30555)
...
This cuts a bit of overhead by not initializing the table of small
odd powers unless it's needed for a large exponent.
2022-01-12 12:55:02 -06:00
Nikita Sobolev
e2a9c8ef09
bpo-46348: modernize `test_typing` (GH-30547)
2022-01-12 08:48:10 -08:00
Christian Heimes
43839ba438
bpo-40280: Add --with-emscripten-target to build for browser or node (GH-30552)
...
Co-authored-by: Ethan Smith <ethan@ethanhs.me>
2022-01-12 16:08:19 +01:00
Yury Selivanov
be578e0c06
bpo-46347: Yet another fix in the erorr path of PyEval_EvalCodeEx ( #30554 )
2022-01-11 16:35:19 -08:00
Yury Selivanov
20b5791ce9
bpo-46347: Fix PyEval_EvalCodeEx to correctly cleanup in error paths ( #30551 )
2022-01-11 15:37:09 -08:00
Victor Stinner
08bc1bad11
bpo-46303: Fix fileutils.h compiler warnings (GH-30550)
...
Add missing pycore_fileutils.h include in _tkinter.c and
_testconsole.c.
2022-01-12 00:35:26 +01:00
Yury Selivanov
607d8a838f
bpo-46347: Fix memory leak in PyEval_EvalCodeEx. ( #30546 )
...
First introduced in 0332e569c1
2022-01-11 14:25:28 -08:00
Ben Kehoe
dce642f244
bpo-46307: Add string.Template.get_identifiers() method (GH-30493)
...
Add `string.Template.get_identifiers()` method that returns the identifiers within the template. By default, raises an error if it encounters an invalid identifier (like `substitute()`). The keyword-only argument `raise_on_invalid` can be set to `False` to ignore invalid identifiers (like `safe_substitute()`).
Automerge-Triggered-By: GH:warsaw
2022-01-11 11:15:42 -08:00
Eric Snow
cf496d657a
bpo-45953: Statically allocate and initialize global bytes objects. (gh-30096)
...
The empty bytes object (b'') and the 256 one-character bytes objects were allocated at runtime init. Now we statically allocate and initialize them.
https://bugs.python.org/issue45953
2022-01-11 09:37:24 -07:00
Julien Palard
6f05e1ec19
[doc] Add license_url for python-docs-theme 2022.1. (GH-30527)
2022-01-11 17:32:42 +01:00
Pablo Galindo Salgado
cedec19be8
bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529)
...
Automerge-Triggered-By: GH:pablogsal
2022-01-11 08:30:39 -08:00
Julian Gilbey
43c5c1369c
closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387)
2022-01-11 08:33:06 -06:00
Michael Oliver
73decdf021
Remove unused `Any` from `Concatenate` example in typing docs (GH-30516)
2022-01-11 21:59:26 +08:00
Mark Shannon
7357ac94f8
News item for issue 46314. (GH-30515)
2022-01-11 11:29:48 +00:00
Mark Shannon
bd04fac7eb
bpo-46331: Do not set line number of instruction storing doc-string. (GH-30518)
2022-01-11 11:28:30 +00:00
Victor Stinner
ea1a54506b
bpo-46303: Move fileutils.h private functions to internal C API (GH-30484)
...
Move almost all private functions of Include/cpython/fileutils.h to
the internal C API Include/internal/pycore_fileutils.h.
Only keep _Py_fopen_obj() in Include/cpython/fileutils.h, since it's
used by _testcapi which must not use the internal C API.
Move EncodeLocaleEx() and DecodeLocaleEx() functions from _testcapi
to _testinternalcapi, since the C API moved to the internal C API.
2022-01-11 11:56:16 +01:00
Nikita Sobolev
fc75bfb8be
bpo-46310: simplify `for` loop in `asyncio/windows_events` (GH-30334)
2022-01-11 12:51:34 +02:00
Sam Gross
e13cdca0f5
bpo-46205: exit if no workers are alive in runtest_mp (GH-30470)
2022-01-11 12:03:09 +09:00
Arie Bovenberg
081a214008
bpo-46244: Remove __slots__ from typing.TypeVar, .ParamSpec ( #30444 )
...
* add missing __slots__ to typing._TypeVarLike
* add news entry
* remove slots from _TypeVarLike base classes
* cleanup diff
* fix broken link in blurb
2022-01-11 07:43:39 +08:00
Nikita Sobolev
6223cbf86a
bpo-45331: [Enum] add rule to docs that mixin type must be subclassable (GH-30521)
2022-01-10 15:42:45 -08:00
Nikita Sobolev
13e4659276
bpo-46327: [Enum] remove skipped tests (GH-30512)
2022-01-10 11:12:34 -08:00
Nikita Sobolev
582286d71c
bpo-46301: [Enum] fix refleak tests (GH30510)
2022-01-10 11:09:00 -08:00
Irit Katriel
0d639678d3
bpo-46332: use raise..from instead of assigning __cause__ and raising (GH-30517)
2022-01-10 18:59:21 +00:00
Mark Shannon
ec0c392f34
bpo-46314: Remove extra RESUME when compiling a lamdba. (GH-30513)
2022-01-10 12:29:02 +00:00
Raymond Hettinger
d24cd49acb
bpo-46270: Describe the `in` and `not in` operators as membership tests. (GH-30504)
2022-01-09 18:02:06 -08:00
Inada Naoki
0b2b9d2513
bpo-23882: unittest: Drop PEP 420 support from discovery. (GH-29745)
2022-01-10 10:38:33 +09:00
Mark Dickinson
1bee9a4625
bpo-46272: Fix two heading comments in python.gram (GH-30499)
...
One typo fix and one heading change, both in comments. No functional changes.
2022-01-09 08:22:54 -08:00
Serhiy Storchaka
2d787971c6
bpo-37295: Use constant-time comb() and perm() for larger n depending on k (GH-30305)
2022-01-09 15:32:25 +02:00
Ethan Smith
5c66414b55
bpo-40280: Disable epoll_create in Emscripten config.site (GH-30494)
...
Co-authored-by: nick.pope@infogrid.io
2022-01-09 11:58:59 +01:00
Mark Dickinson
0ea2ef5fa8
Add a (conservative) timeout for Windows builds on GitHub Actions (GH-30301)
2022-01-09 10:28:34 +00:00
Thomas Klausner
3d11c1b8b4
bpo-46308: Fix unportable test(1) operator in configure script (GH-30490)
2022-01-08 19:54:13 -05:00
Nikita Sobolev
0fc58c1e05
bpo-46306: simplify `CodeType` attribute access in `doctest.py` (GH-30481)
...
Assume co_firstlineno always exists on types.CodeType objects.
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-01-08 15:13:42 -05:00
Nikita Sobolev
8d59d2563b
bpo-46301: [Enum] test uncomparable values in `_convert_` (GH-30472)
...
add tests that cover different types, and same non-comparable types
2022-01-08 11:43:42 -08:00
Erlend Egeberg Aasland
b6aa38f1ca
bpo-46261: Update `sqlite3.Cursor.lastrowid` docs (GH-30407)
2022-01-08 21:17:09 +02:00
Zsolt Dollenstein
ef5376e69e
bpo-46290: Fix parameter names in dataclasses docs (GH-30450)
2022-01-08 12:56:35 +02:00