Commit Graph

112335 Commits

Author SHA1 Message Date
Terry Jan Reedy fcde0bc10d
bpo-45296: Clarify close, quit, and exit in IDLE (GH-30936)
In the File menu, 'Close' and 'Exit' are now 'Close Window' (the current
one) and 'Exit' is now 'Exit IDLE' (by closing all windows).
In Shell, 'quit()' and 'exit()' mean 'close Shell'.
If there are no other windows, this also exits IDLE.
2022-01-26 22:16:31 -05:00
Gregory Beauregard ced50051bb
bpo-46539: Pass status of special typeforms to forward references (GH-30926)
Previously this didn't matter because there weren't any valid code paths
that could trigger a type check with a special form, but after the bug
fix for `Annotated` wrapping special forms it's now possible to annotate
something like `Annotated['ClassVar[int]', (3, 4)]`. This change would
also be needed for proposed future changes, such as allowing `ClassVar`
and `Final` to nest each other in dataclasses.
2022-01-26 19:11:51 -08:00
Victor Stinner 6b491b9dc0
bpo-40170: Remove _Py_GetAllocatedBlocks() function (GH-30940)
Move _Py_GetAllocatedBlocks() and _PyObject_DebugMallocStats()
private functions to the internal C API.
2022-01-27 03:35:51 +01:00
Victor Stinner af32b3ef1f
bpo-40170: PyType_SUPPORTS_WEAKREFS() becomes a regular function (GH-30938)
Convert the PyType_SUPPORTS_WEAKREFS() macro to a regular function.
It no longer access the PyTypeObject.tp_weaklistoffset member
directly.

Add _PyType_SUPPORTS_WEAKREFS() static inline functions, used
internally by Python for best performance.
2022-01-27 03:00:55 +01:00
Mateusz Łoskot f0a648152f
bpo-46502: Remove "How do I tell incomplete input" from FAQ (GH-30925)
Since,

- Py_CompileString no longer allows to distinguish "incomplete input"
  from "invalid input"
- there is no alternative solution available from the Python C API
  due to how the new parser works (rewritten in 3.9)
- the only supported way is to manually import the codeop module from C
  and use its API as IDLE does, and accept its own complications

it is desirable to remove this Q&A from the official FAQ.
2022-01-26 23:49:06 +00:00
Victor Stinner 13194084b4
make regen-all now suggests running: make autoconf (GH-30893)
"make autoconf" also runs autoheader, whereas "autoconf" does not.
2022-01-27 00:35:40 +01:00
Victor Stinner a9503ac394
bpo-38472: setup.py uses LC_ALL=C to check the C compiler (GH-30929)
Fix GCC detection in setup.py when cross-compiling. The C compiler is
now run with LC_ALL=C. Previously, the detection failed with a German
locale.
2022-01-27 00:22:04 +01:00
Brandt Bucher 8548366864
bpo-46528: Simplify the VM's stack manipulations (GH-30902) 2022-01-26 12:47:45 -08:00
Victor Stinner d4a85f104b
bpo-35134: Add Include/cpython/descrobject.h (GH-30923)
Move Include/descrobject.h non-limited API to a new
Include/cpython/descrobject.h header file.
2022-01-26 17:32:47 +01:00
Erlend Egeberg Aasland 3eb3b4f270
bpo-43853: Expand test suite for SQLite UDF's (GH-27642) 2022-01-26 08:26:16 -08:00
Jelle Zijlstra ac0c6e128c
bpo-46527: allow calling enumerate(iterable=...) again (GH-30904) 2022-01-27 00:46:48 +09:00
Kumar Aditya 1e8a3a5579
Use existing unbound_local_error label in DELETE_FAST opcode (GH-30882) 2022-01-26 13:58:28 +00:00
Nikita Sobolev d0c690b5f8
bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911) 2022-01-26 18:13:02 +08:00
Nikita Sobolev b9d8980d89
bpo-43698: do not use `...` as argument name in docs (GH-30502) 2022-01-26 19:06:10 +09:00
Nikita Sobolev 84f093918a
bpo-45578: add a test case for `dis.findlabels` (GH-30058) 2022-01-26 19:05:35 +09:00
Christian Heimes 6e5a193816
bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) 2022-01-26 01:03:49 -08:00
Terry Jan Reedy 7cf285d82e
bpo-41844: Update IDLE part of What's New 3.9 to 20228 (GH-30905) 2022-01-25 23:49:54 -05:00
Terry Jan Reedy 4a49fa6ca6
bpo-48146: Update IDLE part of What's New 3.10 to 2022 (GH-30906) 2022-01-25 23:48:53 -05:00
Irit Katriel 072f4a473e
bpo-46431: use raw string for regex in test (GH-30901) 2022-01-25 23:52:43 +00:00
Pablo Galindo Salgado a27505345e
Add skips to crashing tests under sanitizers instead of manually skipping them (GH-30897) 2022-01-25 23:14:03 +00:00
Pablo Galindo Salgado a0efc0c196
bpo-46091: Correctly calculate indentation levels for whitespace lines with continuation characters (GH-30130) 2022-01-25 22:12:14 +00:00
Pablo Galindo Salgado b1cb843050
Refactor sanitiser skip tests into test.support (GH-30889)
* Refactor sanitizer skip tests into test.support

* fixup! Refactor sanitizer skip tests into test.support

* fixup! fixup! Refactor sanitizer skip tests into test.support
2022-01-25 22:01:10 +00:00
Victor Stinner cef0a5458f
bpo-45382: test.pythoninfo: set wmic.exe encoding to OEM (GH-30890) 2022-01-25 20:02:23 +01:00
Irit Katriel ec7c17ea23
bpo-46510: Add missing test for types.TracebackType/FrameType. Calculate them directly from the caught exception. (GH-30880) 2022-01-25 18:00:57 +00:00
Irit Katriel d69d3d8b2f
bpo-46510: simplify exception handling code in xmlrpc (GH-30878) 2022-01-25 17:58:13 +00:00
Kumar Aditya 45f5f52601
bpo-46510: update Python2-style exception handling in argparse (GH-30881) 2022-01-25 15:34:03 +00:00
Raymond Hettinger ee60550e9b
Move doctests to the main docs. Eliminate duplication. Improve coverage. (GH-30869) 2022-01-25 06:56:53 -06:00
Dennis Sweeney 96bf84d57a
bpo-46420: Use NOTRACE_DISPATCH() in specialized opcodes (GH-30652) 2022-01-25 12:28:29 +00:00
Terry Jan Reedy b1a3446f07
bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30875) 2022-01-25 03:27:09 -05:00
Christian Heimes 8464fbc42e
bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615) 2022-01-25 08:09:06 +01:00
Gregory Beauregard e1abffca45
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)
We treat Annotated type arg as class-level annotation. This exempts it from checks against Final and ClassVar in order to allow using them in any nesting order.

Automerge-Triggered-By: GH:gvanrossum
2022-01-24 22:37:15 -08:00
Terry Jan Reedy 9d3c9788a6
bpo-41841: update idlelib News up to 3.10.0. (GH-30868) 2022-01-24 23:48:40 -05:00
Eric V. Smith 0daf72194b
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865)
* bpo-46503: Prevent an assert from firing.  Also fix one nearby tiny PEP-7 nit.

* Added blurb.
2022-01-24 21:53:27 -05:00
Tim Peters 7c26472d09
bpo-46504: faster code for trial quotient in x_divrem() (GH-30856)
* bpo-46504: faster code for trial quotient in x_divrem()

This brings x_divrem() back into synch with x_divrem1(), which was changed
in bpo-46406 to generate faster code to find machine-word division
quotients and remainders. Modern processors compute both with a single
machine instruction, but convincing C to exploit that requires writing
_less_ "clever" C code.
2022-01-24 19:06:00 -06:00
Irit Katriel b18fd54f8c
bpo-46431: Add example of subclassing ExceptionGroup. Document the message and exceptions attributes (GH-30852) 2022-01-24 21:50:18 +00:00
Irit Katriel 573b545157
bpo-46431: improve error message on invalid calls to BaseExceptionGroup.__new__ (GH-30854) 2022-01-24 21:47:40 +00:00
Kumar Aditya 1c705fda8f
fixed flaky test (GH-30845) 2022-01-24 21:04:47 +00:00
Christian Heimes d5fd438b38
bpo-40280: Get help() working and more (GH-30858) 2022-01-24 22:02:01 +01:00
Irit Katriel 80e1def9de
bpo-45711: move whatsnew entries which are incorrectly listed under New Features (GH-30849) 2022-01-24 17:44:42 +00:00
Nikita Sobolev c144d93631
bpo-46470: remove unused branch from `typing._remove_dups_flatten` (GH-30780)
The branch was a remnant of old 3.6 typing.Union implementation.
2022-01-24 23:42:54 +08:00
Mario Corchero d7c6863979
bpo-41906: Accept built filters in dictConfig (GH-30756)
When configuring the logging stack, accept already built filters (or
just callables) in the filters array of loggers and handlers.
This facilitates passing quick callables as filters.

Automerge-Triggered-By: GH:vsajip
2022-01-24 04:39:50 -08:00
Nikita Sobolev 58f3d98098
bpo-46422: use `dis.Positions` in `dis.Instruction` (GH-30716)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2022-01-24 14:09:20 +03:00
Mark Shannon 0367a36fdc
bpo-43683: Streamline YIELD_VALUE and SEND (GH-30723)
* Split YIELD_VALUE into ASYNC_GEN_WRAP; YIELD_VALUE for async generators.

* Split SEND into SEND; YIELD_VALUE.

* Document new opcodes.
2022-01-24 11:08:53 +00:00
Jelle Zijlstra d75a51bea3
fix typo in typing.rst (#30841) 2022-01-23 15:36:08 -08:00
Kumar Aditya d1beb241d9
bpo-46486: Fixed misspelled name DesciptorClassification 2022-01-23 16:03:50 -06:00
Raymond Hettinger 270a09184d
Improve grouper() recipe to demonstrate all forms of zip() (GH-30837) 2022-01-23 14:31:10 -06:00
Irit Katriel f7955a82e3
bpo-41403: Improve error message for invalid mock target (GH-30833) 2022-01-23 18:42:41 +00:00
Kumar Aditya ca78130d7e
bpo-46471: Use single byte singletons (GH-30781) 2022-01-23 09:45:39 -08:00
Weipeng Hong 691506f4e9
bpo-46103: Fix inspect.getmembers to only get __bases__ from class (GH-30147) 2022-01-23 09:40:38 -08:00
Dong-hee Na 76dc047a0e
bpo-46481: Implement vectorcall for weakref.ref.__call__ method. (GH-30820) 2022-01-24 00:39:45 +09:00