Commit Graph

111992 Commits

Author SHA1 Message Date
Pablo Galindo Salgado 8c2fd09f36
bpo-46339: Include clarification on assert in 'get_error_line_from_tokenizer_buffers' (#30545) 2022-01-18 11:13:00 +00:00
Raymond Hettinger 243c31667c
bpo-42161: Hoist the _PyLong_GetOne() call out of the inner loop. (GH-30656) 2022-01-18 00:02:35 -08:00
Irit Katriel a287b31bcb
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638) 2022-01-18 07:05:16 +00:00
bneuburg c47c9e6589
bpo-44934: Add optional feature AppendPath to Windows MSI installer (GH-27889)
The option must be enabled from the command line
2022-01-18 00:18:44 +00:00
Steve Dower 9e20ec4d43
Restore MSIX signing and ensure expired certificates are not selected (GH-30649)
Reverts the change in d6c6e6b and applies a better fix.
2022-01-17 20:22:52 +00:00
Nikita Sobolev 596cf51a4d
bpo-46418: [Enum] simplify `MODULE` declaration in tests (GH-30647) 2022-01-17 12:16:56 -08:00
Steve Dower d6c6e6ba73
Skip signing side-loadable MSIX for Windows (GH-30644)
We currently do not release these files, and so there's nothing lost by signing them.
Our code signing certificate is somehow incompatible with signing MSIX files. We may be able to re-enable this when we next renew, or if Microsoft updates their signing tool to work with our certificate.
2022-01-17 18:05:16 +00:00
zq1997 c118c2455c
bpo-46161: Fix bug in starunpack_helper in compile.c (GH-30235) 2022-01-17 17:45:44 +00:00
Ethan Furman 62a6594e66
bpo-40066: [Enum] fix tests (GH-30643)
- skip doctest that changes depending on target system
- skip doctest that only fails on CI
- substitute in values that change depending on target system
2022-01-17 08:52:42 -08:00
Kumar Aditya a4bc2218d2
bpo-46405: fix msvc compiler warnings (GH-30627) 2022-01-17 16:30:10 +00:00
Kumar Aditya 83d544b929
bpo-40066: [Enum] skip failing doc test (GH-30637) 2022-01-17 07:18:13 -08:00
Victor Stinner 16901c0482
bpo-44133: Skip PyThread_get_thread_native_id() if not available (GH-30636)
test_capi.test_export_symbols() doesn't check if Python exports the
"PyThread_get_thread_native_id" symbol if the _thread.get_native_id()
function is not available (if the PY_HAVE_THREAD_NATIVE_ID macro is
not defined).
2022-01-17 14:49:20 +01:00
Victor Stinner ad6e640f91
bpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631)
Skip test_builtin PTY tests on non-ASCII characters if the readline
module is loaded. The readline module changes input() behavior, but
test_builtin is not intented to test the readline module.

When the readline module is loaded, PyOS_Readline() uses the readline
implementation. In some cases, the Python readline callback
rlhandler() is called by readline with a string without non-ASCII
characters.
2022-01-17 14:00:50 +01:00
Victor Stinner 42a64c03ec
Revert "bpo-40066: [Enum] update str() and format() output (GH-30582)" (GH-30632)
This reverts commit acf7403f9b.
2022-01-17 13:58:40 +01:00
Christian Heimes 7f4b69b907
bpo-40280: Change subprocess imports for cleaner error on wasm32 (GH-30620) 2022-01-17 07:23:36 +01:00
Christian Heimes 91e33ac3d0
bpo-40280: Add requires_fork test helper (GH-30622) 2022-01-16 22:52:43 +01:00
Brandt Bucher 5cd9a162cd
bpo-46361: Fix "small" `int` caching (GH-30583) 2022-01-16 16:06:37 +00:00
Nikita Sobolev 09087b8519
bpo-46386: improve `test_typing:test_immutability_by_copy_and_pickle` (GH-30613) 2022-01-16 16:32:11 +09:00
Ethan Furman acf7403f9b
bpo-40066: [Enum] update str() and format() output (GH-30582)
Undo rejected PEP-663 changes:

- restore `repr()` to its 3.10 status
- restore `str()` to its 3.10 status

New changes:

- `IntEnum` and `IntFlag` now leave `__str__` as the original `int.__str__` so that str() and format() return the same result
- zero-valued flags without a name have a slightly changed repr(), e.g. `repr(Color(0)) == '<Color: 0>'`
- update `dir()` for mixed-in types to return all the methods and attributes of the mixed-in type
- added `_numeric_repr_` to `Flag` to control display of unnamed values
- enums without doc strings have a more comprehensive doc string added
- `ReprEnum` added -- inheriting from this makes it so only `__repr__` is replaced, not `__str__` nor `__format__`; `IntEnum`, `IntFlag`, and `StrEnum` all inherit from `ReprEnum`
2022-01-15 22:41:43 -08:00
Nikita Sobolev 37eab55ac9
bpo-46387: test all pickle protos in `test_field_descriptor` in `test_collections` (GH-30614) 2022-01-15 22:33:28 -06:00
Russel Webber 0a28118324
bpo-46388: Test NotImplemented code path for functools.total_ordering (GH-30616) 2022-01-15 14:15:32 -08:00
Mark Dickinson d02c5e9b55
bpo-46258: Streamline isqrt fast path (#30333) 2022-01-15 09:58:04 +00:00
Christian Heimes cfbde65df3
bpo-46383: Fix signature of zoneinfo module_free function (GH-30607) 2022-01-15 09:52:19 +01:00
Hugo van Kemenade 305588c67c
bpo-20281, bpo-29964: update datetime docs to refer %z and %Z to a pre-existing footnote (GH-30354) 2022-01-14 14:49:12 -08:00
Nikita Sobolev e674e48ddc
bpo-46242: [Enum] better error message for extending `Enum` with members (GH-30357) 2022-01-14 14:18:00 -08:00
Pablo Galindo 2402f1e1f8
Merge remote-tracking branch 'upstream/main' 2022-01-14 21:20:56 +00:00
Pablo Galindo 01d4fe0976
Post 3.11.0a4 2022-01-14 21:20:41 +00:00
Nikita Sobolev c5640ef875
bpo-46380: Apply tests to both C and Python version (GH-30606) 2022-01-14 13:13:45 -08:00
Mark Dickinson 025cbe7a9b
bpo-45569: Change PYLONG_BITS_IN_DIGIT default to 30 (GH-30497) 2022-01-14 18:54:56 +00:00
Christian Heimes ee1a8b336d
bpo-40280: Block more syscalls that are causing crashes in tests (GH-30601) 2022-01-14 18:48:44 +01:00
Hugo van Kemenade 73140de97c
bpo-23183: Document the timeit output (GH-30359)
Co-authored-by: Robert Collins <robertc@robertcollins.net>
2022-01-14 17:25:36 +00:00
neonene 71c0b859ae
bpo-46362: Ensure abspath() tests pass through environment variables to subprocess (GH-30595) 2022-01-14 15:31:15 +00:00
Christian Heimes c8319f7921
bpo-40280: Build WASM stdlib bundle and more modules for node (GH-30597) 2022-01-14 12:11:49 +01:00
Victor Stinner 7c770d3350
bpo-46280: Fix tracemalloc_copy_domain() (GH-30591)
Test if tracemalloc_copy_traces() failed to allocated memory in
tracemalloc_copy_domain().
2022-01-14 05:11:38 +01:00
Eric Snow 322f962f3e
bpo-45953: Statically initialize all the non-object PyInterpreterState fields we can. (gh-30589)
https://bugs.python.org/issue45953
2022-01-13 17:17:28 -07:00
Eric Snow 324908ba93
bpo-45953: Statically initialize all the PyThreadState fields we can. (gh-30590)
https://bugs.python.org/issue45953
2022-01-13 17:09:24 -07:00
neonene d4e64cd4b0
bpo-46362: Ensure ntpath.abspath() uses the Windows API correctly (GH-30571)
This makes ntpath.abspath()/getpath_abspath() follow normpath(), since some WinAPIs such as PathCchSkipRoot() require backslashed paths.
2022-01-13 23:35:42 +00:00
Eric Snow b8ddf7e794
Statically initialize _PyRuntimeState fields. (gh-30588)
https://bugs.python.org/issue45953
2022-01-13 16:33:40 -07:00
Eric Snow bc02eac9d2
bpo-46370: Move the static initializer for _PyRuntime to its own header file. (gh-30587)
https://bugs.python.org/issue46370
2022-01-13 15:54:36 -07:00
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