]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 years agobpo-33610: Edit idlelib.codecontext (GH-23773)
Terry Jan Reedy [Tue, 15 Dec 2020 05:24:01 +0000 (00:24 -0500)] 
bpo-33610: Edit idlelib.codecontext (GH-23773)

Add sentence to module docstring and import tkinter items.

4 years agobpo-31904: Enable libpython3.so shared library for VxWorks (GH-23741)
pxinwr [Mon, 14 Dec 2020 22:14:43 +0000 (06:14 +0800)] 
bpo-31904: Enable libpython3.so shared library for VxWorks (GH-23741)

4 years agobpo-42639: atexit now logs callbacks exceptions (GH-23771)
Victor Stinner [Mon, 14 Dec 2020 22:07:54 +0000 (23:07 +0100)] 
bpo-42639: atexit now logs callbacks exceptions (GH-23771)

At Python exit, if a callback registered with atexit.register()
fails, its exception is now logged. Previously, only some exceptions
were logged, and the last exception was always silently ignored.

Add _PyAtExit_Call() function and remove
PyInterpreterState.atexit_func member. call_py_exitfuncs() now calls
directly _PyAtExit_Call().

The atexit module must now always be built as a built-in module.

4 years agobpo-42639: Cleanup atexitmodule.c (GH-23770)
Victor Stinner [Mon, 14 Dec 2020 21:40:40 +0000 (22:40 +0100)] 
bpo-42639: Cleanup atexitmodule.c (GH-23770)

* Rename "atexitmodule_state" to "struct atexit_state".
* Rename "modstate" to "state".
* Rename "self" parameter to "module".
* test_atexit uses textwrap.dedent().
* Remove _Py_PyAtExit() function: inline it into atexit_exec().
* PyInterpreterState: rename pyexitfunc to atexit_func, rename
  pyexitmodule to atexit_module.

4 years agobpo-41877: Check for misspelled speccing arguments (GH-23737)
vabr-g [Mon, 14 Dec 2020 18:30:09 +0000 (19:30 +0100)] 
bpo-41877: Check for misspelled speccing arguments (GH-23737)

patch, patch.object and create_autospec silently ignore misspelled
arguments such as autospect, auto_spec and set_spec. This can lead
to tests failing to check what they are supposed to check.

This change adds a check causing a RuntimeError if the above
functions get any of the above misspellings as arguments. It also
adds a new argument, "unsafe", which can be set to True to disable
this check.

Also add "!r" to format specifiers in added error messages.

4 years agobpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)
Gregory P. Smith [Mon, 14 Dec 2020 17:10:10 +0000 (09:10 -0800)] 
bpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)

Add positional only args support to lib2to3 pgen2.

This adds 3.8's PEP-570 support to lib2to3's pgen2.  lib2to3, while
being deprecated is still used by things to parse all versions of Python
code today.  We need it to support parsing modern 3.8 and 3.9 constructs.

Also add tests for complex *expr and **expr's.

4 years agobpo-42635: Mark JUMP_ABSOLUTE at end of 'for' loop as artificial to avoid spurious...
Mark Shannon [Mon, 14 Dec 2020 11:28:39 +0000 (11:28 +0000)] 
bpo-42635: Mark JUMP_ABSOLUTE at end of 'for' loop as artificial to avoid spurious line events. (GH-23761)

4 years agoDon't generate spurious line number in try-except-finally. (#23760)
Mark Shannon [Mon, 14 Dec 2020 10:19:10 +0000 (10:19 +0000)] 
Don't generate spurious line number in try-except-finally. (#23760)

4 years agobpo-42598: Fix implicit function declarations in configure (GH-23690)
Joshua Root [Sun, 13 Dec 2020 20:56:34 +0000 (07:56 +1100)] 
bpo-42598: Fix implicit function declarations in configure (GH-23690)

This is invalid in C99 and later and is an error with some compilers
(e.g. clang in Xcode 12), and can thus cause configure checks to
produce incorrect results.

4 years agobpo-42195: Ensure consistency of Callable's __args__ in collections.abc and typing...
kj [Sun, 13 Dec 2020 18:38:24 +0000 (02:38 +0800)] 
bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and typing (GH-23060)

4 years agobpo-30858: Improve error location for expressions with assignments (GH-23753)
Pablo Galindo [Sun, 13 Dec 2020 16:46:48 +0000 (16:46 +0000)] 
bpo-30858: Improve error location for expressions with assignments (GH-23753)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 years agoAdd two spaces around equal sign (#23719)
sblondon [Sun, 13 Dec 2020 05:27:22 +0000 (06:27 +0100)] 
Add two spaces around equal sign (#23719)

Fit to PEP8 coding style

4 years agobpo-39717: [tarfile] update nested exception raising (GH-23739)
Ethan Furman [Sat, 12 Dec 2020 21:26:44 +0000 (13:26 -0800)] 
bpo-39717: [tarfile] update nested exception raising (GH-23739)

- `from None` if the new exception uses, or doesn't need, the previous one
- `from e` if the previous exception is still relevant

4 years agobpo-41879: Doc: Fix description of async for statement (GH-23548)
Nick Gaya [Fri, 11 Dec 2020 08:27:35 +0000 (00:27 -0800)] 
bpo-41879: Doc: Fix description of async for statement (GH-23548)

Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables.  This fix is relevant for version 3.7 onward.

4 years agobpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736)
Alex Grönholm [Thu, 10 Dec 2020 21:49:05 +0000 (23:49 +0200)] 
bpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736)

4 years agobpo-34750: [Enum] add `_EnumDict.update()` support (GH-23725)
Ethan Furman [Thu, 10 Dec 2020 21:07:00 +0000 (13:07 -0800)] 
bpo-34750: [Enum] add `_EnumDict.update()` support (GH-23725)

This allows easier Enum construction in unusual cases, such as including dynamic member definitions into a class definition:

# created dynamically
foo_defines = {'FOO_CAT': 'aloof', 'BAR_DOG': 'friendly', 'FOO_HORSE': 'big'}

class Foo(Enum):
    vars().update({
            k: v
            for k, v in foo_defines.items()
            if k.startswith('FOO_')
            })
    def upper(self):
        # example method
        return self.value.upper()

4 years agobpo-42385: [Enum] add `_generate_next_value_` to StrEnum (GH-23735)
Ethan Furman [Thu, 10 Dec 2020 20:20:06 +0000 (12:20 -0800)] 
bpo-42385: [Enum] add `_generate_next_value_` to StrEnum (GH-23735)

The default for auto() is to return an integer, which doesn't work for `StrEnum`.  The new `_generate_next_value_` for `StrEnum` returns the member name, lower cased.

4 years agobpo-41877: Improve docs for assert misspellings check in mock (GH-23729)
vabr-g [Thu, 10 Dec 2020 18:35:28 +0000 (19:35 +0100)] 
bpo-41877: Improve docs for assert misspellings check in mock (GH-23729)

This is a follow-up to
https://github.com/python/cpython/commit/4662fa9bfe4a849fe87bfb321d8ef0956c89a772.
That original commit expanded guards against misspelling assertions on
mocks. This follow-up updates the documentation and improves the error
message by pointing out the potential cause and solution.

Automerge-Triggered-By: GH:gpshead
4 years agobpo-42591: Export missing Py_FrozenMain() symbol (GH-23730)
Victor Stinner [Thu, 10 Dec 2020 17:39:17 +0000 (18:39 +0100)] 
bpo-42591: Export missing Py_FrozenMain() symbol (GH-23730)

Export the Py_FrozenMain() function: fix a Python 3.9.0 regression.
Python 3.9 uses -fvisibility=hidden and the function was not exported
explicitly and so not exported.

Add also Py_FrozenMain to the stable ABI on Windows.

4 years agobpo-42517: [Enum] do not convert private names into members (GH-23722)
Ethan Furman [Thu, 10 Dec 2020 01:12:11 +0000 (17:12 -0800)] 
bpo-42517: [Enum] do not convert private names into members (GH-23722)

private names, such as `_Color__hue` and `_Color__hue_` are now normal attributes, and do not become members nor raise exceptions

4 years agobpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714)
Ethan Furman [Thu, 10 Dec 2020 00:41:22 +0000 (16:41 -0800)] 
bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714)

When creating an Enum, type.__new__ calls __init_subclass__, but at that point the members have not been added.

This patch suppresses the initial call, then manually calls the ancestor __init_subclass__ before returning the new Enum class.

4 years ago[doc] Link to issue regarding logging.disable level param default value (GH-23726)
Andre Delfino [Wed, 9 Dec 2020 23:37:39 +0000 (20:37 -0300)] 
[doc] Link to issue regarding logging.disable level param default value (GH-23726)

4 years ago[doc] Document logging.basicConfig default format (GH-23710)
Andre Delfino [Wed, 9 Dec 2020 21:56:17 +0000 (18:56 -0300)] 
[doc] Document logging.basicConfig default format (GH-23710)

Automerge-Triggered-By: GH:vsajip
4 years agobpo-31904: Define THREAD_STACK_SIZE for VxWorks (GH-23718)
pxinwr [Wed, 9 Dec 2020 21:47:28 +0000 (05:47 +0800)] 
bpo-31904: Define THREAD_STACK_SIZE for VxWorks (GH-23718)

4 years agobpo-32381: Add _PyRun_AnyFileObject() (GH-23723)
Victor Stinner [Wed, 9 Dec 2020 21:37:27 +0000 (22:37 +0100)] 
bpo-32381: Add _PyRun_AnyFileObject() (GH-23723)

pymain_run_file() no longer encodes the filename: pass the filename
as an object to the new _PyRun_AnyFileObject() function.

Add new private functions:

* _PyRun_AnyFileObject()
* _PyRun_InteractiveLoopObject()
* _Py_FdIsInteractive()

4 years agobpo-32381: Remove unused _Py_fopen() function (GH-23711)
Victor Stinner [Wed, 9 Dec 2020 19:54:31 +0000 (20:54 +0100)] 
bpo-32381: Remove unused _Py_fopen() function (GH-23711)

Remove the private _Py_fopen() function which is no longer needed.
Use _Py_wfopen() or _Py_fopen_obj() instead.

4 years agobpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)
Victor Stinner [Tue, 8 Dec 2020 23:32:54 +0000 (00:32 +0100)] 
bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)

pymain_run_startup() now pass the filename as a Python object to
_PyRun_SimpleFileObject().

4 years agobpo-41439: Skip test_ssl and test_uuid tests if fork() is not supported (GH-21684)
pxinwr [Tue, 8 Dec 2020 23:20:19 +0000 (07:20 +0800)] 
bpo-41439: Skip test_ssl and test_uuid tests if fork() is not supported (GH-21684)

4 years agobpo-41443: Add more attribute checking in test_posix (GH-21688)
pxinwr [Tue, 8 Dec 2020 23:18:37 +0000 (07:18 +0800)] 
bpo-41443:  Add more attribute checking in test_posix (GH-21688)

4 years agobpo-35134: Add Include/cpython/pythonrun.h file (GH-23701)
Victor Stinner [Tue, 8 Dec 2020 22:51:54 +0000 (23:51 +0100)] 
bpo-35134: Add Include/cpython/pythonrun.h file (GH-23701)

Py_CompileString() is now always declared as a function by
Include/pythonrun.h. It is overriden with a macro in
Include/cpython/pythonrun.h.

4 years agobpo-32381: Rewrite PyErr_ProgramText() (GH-23700)
Victor Stinner [Tue, 8 Dec 2020 22:51:26 +0000 (23:51 +0100)] 
bpo-32381: Rewrite PyErr_ProgramText() (GH-23700)

PyErr_ProgramText() now calls PyErr_ProgramTextObject().

4 years ago[Enum] reformat and add doc strings (GH-23705)
Ethan Furman [Tue, 8 Dec 2020 20:26:56 +0000 (12:26 -0800)] 
[Enum] reformat and add doc strings (GH-23705)

4 years agobpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497)
Ethan Furman [Tue, 8 Dec 2020 19:14:10 +0000 (11:14 -0800)] 
bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497)

4 years agobpo-42111: Make the xxlimited module an example of best extension module practices...
Petr Viktorin [Tue, 8 Dec 2020 16:36:53 +0000 (17:36 +0100)] 
bpo-42111: Make the xxlimited module an example of best extension module practices (GH-23226)

- Copy existing xxlimited to xxlimited53 (named for the limited API version it uses)
- Build both modules, both in debug and release
- Test both modules

4 years ago bpo-41910: move news entry (GH-23695)
Terry Jan Reedy [Tue, 8 Dec 2020 15:29:49 +0000 (10:29 -0500)] 
 bpo-41910: move news entry  (GH-23695)

4 years agobpo-42599: Remove useless PyModule_GetWarningsModule() (GH-23691)
Hai Shi [Tue, 8 Dec 2020 14:42:42 +0000 (22:42 +0800)] 
bpo-42599: Remove useless PyModule_GetWarningsModule() (GH-23691)

Removed PyModule_GetWarningsModule() which is useless due to
the _warnings module was converted to a builtin module in 2.6.

4 years agobpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642)
Victor Stinner [Tue, 8 Dec 2020 13:38:08 +0000 (14:38 +0100)] 
bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642)

Fix encoding name when running a ".pyc" file on Windows:
PyRun_SimpleFileExFlags() now uses the correct encoding to decode the
filename.

* Add pyrun_file() subfunction.
* Add pyrun_simple_file() subfunction.
* PyRun_SimpleFileExFlags() now calls _Py_fopen_obj() rather than
  _Py_fopen().

4 years agoPost 3.10.0a3
Pablo Galindo [Tue, 8 Dec 2020 02:31:04 +0000 (02:31 +0000)] 
Post 3.10.0a3

4 years agoMerge tag 'v3.10.0a3'
Pablo Galindo [Tue, 8 Dec 2020 02:30:25 +0000 (02:30 +0000)] 
Merge tag 'v3.10.0a3'

Python 3.10.0a3

4 years agobpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)
pxinwr [Mon, 7 Dec 2020 20:41:12 +0000 (04:41 +0800)] 
bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)

4 years agobpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)
MatÄ›j Cepl [Mon, 7 Dec 2020 20:05:13 +0000 (21:05 +0100)] 
bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)

The solution in gh#python/cpython#13236 is too strict because it
effectively requires the use of Sphinx >= 2.0. It is not too difficult to
make the same solution more robust so it works with all normal versions
of Sphinx.

4 years agoPython 3.10.0a3 v3.10.0a3
Pablo Galindo [Mon, 7 Dec 2020 19:33:00 +0000 (19:33 +0000)] 
Python 3.10.0a3

4 years agobpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match distutils...
Matti Picus [Mon, 7 Dec 2020 17:33:20 +0000 (19:33 +0200)] 
bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match distutils (GH-22088)

4 years agobpo-30459: Cast the result of PyCell_SET to void (GH-23654)
Victor Stinner [Mon, 7 Dec 2020 10:56:20 +0000 (11:56 +0100)] 
bpo-30459: Cast the result of PyCell_SET to void (GH-23654)

4 years agobpo-41889: [Enum] fix multiple-inheritance regression (GH-22487)
Ethan Furman [Mon, 7 Dec 2020 08:17:31 +0000 (00:17 -0800)] 
bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487)

4 years agoUpdate macos installer ReadMe for 3.10.0a3 (GH-23671)
Ned Deily [Mon, 7 Dec 2020 03:55:12 +0000 (22:55 -0500)] 
Update macos installer ReadMe for 3.10.0a3 (GH-23671)

4 years agobpo-42508: Keep IDLE running on macOS (GH-23577)
Terry Jan Reedy [Mon, 7 Dec 2020 03:22:33 +0000 (22:22 -0500)] 
bpo-42508: Keep IDLE running on macOS (GH-23577)

Remove obsolete workaround that prevented running files with
shortcuts when using new universal2 installers built on macOS 11.
Ignore buggy 2nd run_module_event call.

4 years agobpo-38843: Document behavior of default when the attribute is already set (GH-23653)
Raymond Hettinger [Mon, 7 Dec 2020 02:29:08 +0000 (18:29 -0800)] 
bpo-38843: Document behavior of default when the attribute is already set (GH-23653)

4 years agobpo-42582: Remove asyncio._all_tasks_compat(). (GH-23664)
Serhiy Storchaka [Sun, 6 Dec 2020 16:54:33 +0000 (18:54 +0200)] 
bpo-42582: Remove asyncio._all_tasks_compat(). (GH-23664)

It was used to implement now removed asyncio.Task.all_tasks().

4 years agobpo-42576: Clarify only debug builds are affected in news (GH-23663)
kj [Sun, 6 Dec 2020 16:37:59 +0000 (23:37 +0700)] 
bpo-42576: Clarify only debug builds are affected in news (GH-23663)

4 years agobpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool...
idanw206 [Sun, 6 Dec 2020 09:59:36 +0000 (11:59 +0200)] 
bpo-42532: Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function (GH23613)

Check if NonCallableMock's spec_arg is not None instead of call its __bool__ function

4 years agobpo-42576: Raise TypeError when passing in keyword arguments to GenericAlias (GH...
kj [Sat, 5 Dec 2020 16:02:14 +0000 (23:02 +0700)] 
bpo-42576: Raise TypeError when passing in keyword arguments to GenericAlias (GH-23656)

Use `_PyArg_NoKeywords` instead of `_PyArg_NoKwnames` when checking the `kwds` tuple when creating `GenericAlias`. This fixes an interpreter crash when passing in keyword arguments to `GenericAlias`'s constructor.

Needs backport to 3.9.

Automerge-Triggered-By: GH:gvanrossum
4 years agoGH-5054: CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed (#23638)
Senthil Kumaran [Sat, 5 Dec 2020 13:26:24 +0000 (05:26 -0800)] 
GH-5054: CGIHTTPRequestHandler.run_cgi() HTTP_ACCEPT improperly parsed (#23638)

4 years agobpo-30459: Cast the result of PyList_SET_ITEM() to void (GH-19975)
Zackery Spytz [Sat, 5 Dec 2020 10:34:51 +0000 (03:34 -0700)] 
bpo-30459: Cast the result of PyList_SET_ITEM() to void (GH-19975)

Do the same for PyTuple_SET_ITEM().

4 years agobpo-41116: Fix setup.py test for macOS Tcl/Tk frameworks (GH-23649)
Ned Deily [Sat, 5 Dec 2020 04:02:09 +0000 (23:02 -0500)] 
bpo-41116: Fix setup.py test for macOS Tcl/Tk frameworks (GH-23649)

If no explicit macOS SDK was specified, setup.py should check for
Tcl and TK frameworks in /Library/Frameworks; the previous commit
inadvertently broke that test.

4 years agobpo-42536: GC track recycled tuples (GH-23623)
Brandt Bucher [Sat, 5 Dec 2020 03:45:57 +0000 (19:45 -0800)] 
bpo-42536: GC track recycled tuples (GH-23623)

Several built-in and standard library types now ensure that their internal result tuples are always tracked by the garbage collector:

- collections.OrderedDict.items
- dict.items
- enumerate
- functools.reduce
- itertools.combinations
- itertools.combinations_with_replacement
- itertools.permutations
- itertools.product
- itertools.zip_longest
- zip

Previously, they could have become untracked by a prior garbage collection.

4 years agobpo-26131: Deprecate usage of load_module() (GH-23469)
Brett Cannon [Fri, 4 Dec 2020 23:39:21 +0000 (15:39 -0800)] 
bpo-26131: Deprecate usage of load_module() (GH-23469)

Raise an ImportWarning when the import system falls back on load_module(). As for implementations of load_module(), raise a DeprecationWarning.

4 years agobpo-42545: Improve the error message in the stable API script (GH-23648)
Pablo Galindo [Fri, 4 Dec 2020 23:19:21 +0000 (23:19 +0000)] 
bpo-42545: Improve the error message in the stable API script (GH-23648)

4 years agobpo-42545: Check that all symbols in the limited ABI are exported (GH-23616)
Pablo Galindo [Fri, 4 Dec 2020 22:05:58 +0000 (22:05 +0000)] 
bpo-42545: Check that all symbols in the limited ABI are exported (GH-23616)

4 years agobpo-17735: inspect.findsource now raises OSError when co_lineno is out of range ...
Irit Katriel [Fri, 4 Dec 2020 21:22:03 +0000 (21:22 +0000)] 
bpo-17735: inspect.findsource now raises OSError when co_lineno is out of range (GH-23633)

This can happen when a file was edited after it was imported.

4 years agobpo-31904: fix test_doctest.py failures for VxWorks (GH-23419)
pxinwr [Fri, 4 Dec 2020 20:19:32 +0000 (04:19 +0800)] 
bpo-31904: fix test_doctest.py failures for VxWorks (GH-23419)

Fix test_doctest.py failures for VxWorks by avoiding exact error message checks. (better for everyone all around)

4 years agobpo-42116: Fix inspect.getsource handling of trailing comments (GH-23630)
Irit Katriel [Fri, 4 Dec 2020 16:45:38 +0000 (16:45 +0000)] 
bpo-42116: Fix inspect.getsource handling of trailing comments (GH-23630)

4 years agobpo-41473: Reenable test_gdb on gdb 9.2 and newer (GH-23637)
Victor Stinner [Fri, 4 Dec 2020 15:23:56 +0000 (16:23 +0100)] 
bpo-41473: Reenable test_gdb on gdb 9.2 and newer (GH-23637)

https://bugzilla.redhat.com/show_bug.cgi?id=1866884 is fixed in gdb
10.1 (failed to reproduce on gdb-10.1-1.fc34.aarch64).

4 years agobpo-42246: Don't forget the entry block when ensuring that all exits have a line...
Mark Shannon [Fri, 4 Dec 2020 15:22:12 +0000 (15:22 +0000)] 
bpo-42246: Don't forget the entry block when ensuring that all exits have a line number (GH-23636)

Don't forget the entry block when ensuring that all exits have a line number.

4 years agobpo-42562: Fix issue when dis failed to parse function that has no line numbers ...
Yurii Karabas [Fri, 4 Dec 2020 15:20:53 +0000 (17:20 +0200)] 
bpo-42562: Fix issue when dis failed to parse function that has no line numbers (GH-23632)

Fix issue when dis failed to parse function that has only annotations

4 years agobpo-42523: Fix supported versions in "Using Python on Windows" (GH-23603)
Zackery Spytz [Thu, 3 Dec 2020 17:22:04 +0000 (10:22 -0700)] 
bpo-42523: Fix supported versions in "Using Python on Windows" (GH-23603)

4 years agobpo-42262: Py_NewRef() casts its argument to PyObject* (GH-23626)
Victor Stinner [Thu, 3 Dec 2020 13:01:10 +0000 (14:01 +0100)] 
bpo-42262: Py_NewRef() casts its argument to PyObject* (GH-23626)

Write also unit tests on Py_NewRef() and Py_XNewRef().

4 years agobpo-42553: Fix test_asyncio.test_call_later() (GH-23627)
Victor Stinner [Thu, 3 Dec 2020 12:56:41 +0000 (13:56 +0100)] 
bpo-42553: Fix test_asyncio.test_call_later() (GH-23627)

Fix test_asyncio.test_call_later() race condition: don't measure
asyncio performance in the call_later() unit test. The test failed
randomly on the CI.

4 years agobpo-42431: Fix outdated bytes comments (GH-23458)
Serhiy Storchaka [Thu, 3 Dec 2020 10:46:16 +0000 (12:46 +0200)] 
bpo-42431: Fix outdated bytes comments (GH-23458)

Also move definitions of internal macros F_LJUST etc to private header.

4 years agobpo-42328: Skip some tests with themes vista and xpnative on Windows 7 (GH-23612)
Serhiy Storchaka [Thu, 3 Dec 2020 08:48:26 +0000 (10:48 +0200)] 
bpo-42328: Skip some tests with themes vista and xpnative on Windows 7 (GH-23612)

4 years agoRemove the conditional for setting query. (#23604)
Senthil Kumaran [Thu, 3 Dec 2020 03:48:14 +0000 (19:48 -0800)] 
Remove the conditional for setting query. (#23604)

4 years agobpo-42504: fix for MACOSX_DEPLOYMENT_TARGET=11 (GH-23556)
FX Coudert [Thu, 3 Dec 2020 03:20:18 +0000 (04:20 +0100)] 
bpo-42504: fix for MACOSX_DEPLOYMENT_TARGET=11 (GH-23556)

macOS releases numbering has changed as of macOS 11 Big Sur.  Previously, major releases were of the form 10.x, 10.x+1, 10.x+2, etc; as of Big Sur, they are now x, x+1, etc, so, for example, 10.15, 10.15.1, ..., 10.15.7, 11, 11.0.1, 11.1, ..., 12, 12.1, etc. Allow Python to build with single-digit deployment target values. Patch provided by FX Coudert.

4 years agobpo-41625: Do not add os.splice on AIX due to compatibility issues (GH-23608)
Pablo Galindo [Wed, 2 Dec 2020 17:57:18 +0000 (17:57 +0000)] 
bpo-41625: Do not add os.splice on AIX due to compatibility issues (GH-23608)

4 years agobpo-42521: Add note about 'Python -d' only working on debug builds (GH-23607)
Pablo Galindo [Wed, 2 Dec 2020 17:56:17 +0000 (17:56 +0000)] 
bpo-42521: Add note about 'Python -d' only working on debug builds (GH-23607)

4 years agobpo-42246: Make sure that line number is correct after a return, as required by PEP...
Mark Shannon [Wed, 2 Dec 2020 13:31:40 +0000 (13:31 +0000)] 
bpo-42246: Make sure that line number is correct after a return, as required by PEP 626 (GH-23495)

Make sure that line number is correct after a return, as defined by PEP 626.

4 years agobpo-42500: Fix recursion in or after except (GH-23568)
Mark Shannon [Wed, 2 Dec 2020 13:30:55 +0000 (13:30 +0000)] 
bpo-42500: Fix recursion in or after except (GH-23568)

* Use counter, rather boolean state when handling soft overflows.

4 years agoCorrect return type in Modules/_ssl.c::sslmodule_legacy (GH-23609)
Pablo Galindo [Wed, 2 Dec 2020 06:07:56 +0000 (06:07 +0000)] 
Correct return type in Modules/_ssl.c::sslmodule_legacy (GH-23609)

4 years agobpo-40939: Restore some stable API functions incorrectly deleted (GH-23606)
Pablo Galindo [Wed, 2 Dec 2020 05:16:31 +0000 (05:16 +0000)] 
bpo-40939: Restore some stable API functions incorrectly deleted (GH-23606)

4 years agobpo-31904: Fix test_netrc for VxWorks RTOS (GH-21675)
pxinwr [Tue, 1 Dec 2020 20:34:42 +0000 (04:34 +0800)] 
bpo-31904: Fix test_netrc for VxWorks RTOS (GH-21675)

Fix test_netrc on VxWorks: create temporary directories using temp_cwd().

4 years agobpo-37221: PyCode_New() didn't change in Python 3.8 (GH-23595)
Victor Stinner [Tue, 1 Dec 2020 15:22:25 +0000 (16:22 +0100)] 
bpo-37221: PyCode_New() didn't change in Python 3.8 (GH-23595)

4 years agobuild(deps): bump actions/upload-artifact from v2.2.0 to v2.2.1 (GH-23583)
dependabot[bot] [Tue, 1 Dec 2020 15:00:11 +0000 (09:00 -0600)] 
build(deps): bump actions/upload-artifact from v2.2.0 to v2.2.1 (GH-23583)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from v2.2.0 to v2.2.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.2.0...726a6dcd0199f578459862705eed35cda05af50b)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agobuild(deps): bump actions/cache from v2.1.2 to v2.1.3 (23582)
dependabot[bot] [Tue, 1 Dec 2020 14:59:12 +0000 (08:59 -0600)] 
build(deps): bump actions/cache from v2.1.2 to v2.1.3 (23582)

Bumps [actions/cache](https://github.com/actions/cache) from v2.1.2 to v2.1.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.2...0781355a23dac32fd3bac414512f4b903437991a)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years ago[doc] Fix abc.update_abstractmethods markup (GH-23576)
Andre Delfino [Tue, 1 Dec 2020 09:45:11 +0000 (06:45 -0300)] 
[doc] Fix abc.update_abstractmethods markup (GH-23576)

Add link to ABCMeta while at it.

4 years agoFix bz2 examples markup (#23580)
Andre Delfino [Tue, 1 Dec 2020 09:41:12 +0000 (06:41 -0300)] 
Fix bz2 examples markup (#23580)

4 years agobpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)
Victor Stinner [Tue, 1 Dec 2020 09:37:39 +0000 (10:37 +0100)] 
bpo-42519: Replace PyObject_MALLOC() with PyObject_Malloc() (GH-23587)

No longer use deprecated aliases to functions:

* Replace PyObject_MALLOC() with PyObject_Malloc()
* Replace PyObject_REALLOC() with PyObject_Realloc()
* Replace PyObject_FREE() with PyObject_Free()
* Replace PyObject_Del() with PyObject_Free()
* Replace PyObject_DEL() with PyObject_Free()

4 years agobpo-42519: Replace PyMem_MALLOC() with PyMem_Malloc() (GH-23586)
Victor Stinner [Tue, 1 Dec 2020 08:56:42 +0000 (09:56 +0100)] 
bpo-42519: Replace PyMem_MALLOC() with PyMem_Malloc() (GH-23586)

No longer use deprecated aliases to functions:

* Replace PyMem_MALLOC() with PyMem_Malloc()
* Replace PyMem_REALLOC() with PyMem_Realloc()
* Replace PyMem_FREE() with PyMem_Free()
* Replace PyMem_Del() with PyMem_Free()
* Replace PyMem_DEL() with PyMem_Free()

Modify also the PyMem_DEL() macro to use directly PyMem_Free().

4 years agobpo-31904: Fix fifo test cases for VxWorks (GH-20254)
pxinwr [Tue, 1 Dec 2020 08:20:50 +0000 (16:20 +0800)] 
bpo-31904: Fix fifo test cases for VxWorks (GH-20254)

4 years agobpo-38200: Add itertools.pairwise() (GH-23549)
Raymond Hettinger [Tue, 1 Dec 2020 04:42:54 +0000 (20:42 -0800)] 
bpo-38200: Add itertools.pairwise() (GH-23549)

4 years agobpo-42482: remove reference to exc_traceback from TracebackException (GH-23531)
Irit Katriel [Tue, 1 Dec 2020 01:35:25 +0000 (01:35 +0000)] 
bpo-42482: remove reference to exc_traceback from TracebackException (GH-23531)

4 years agobpo-31904: Support signal module on VxWorks (GH-23391)
pxinwr [Mon, 30 Nov 2020 21:48:33 +0000 (05:48 +0800)] 
bpo-31904: Support signal module on VxWorks (GH-23391)

4 years agobpo-28468: Add platform.freedesktop_os_release() (GH-23492)
Christian Heimes [Mon, 30 Nov 2020 21:34:45 +0000 (22:34 +0100)] 
bpo-28468: Add platform.freedesktop_os_release() (GH-23492)

Add platform.freedesktop_os_release() function to parse freedesktop.org
os-release files.

Signed-off-by: Christian Heimes <christian@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 years agoRefactor the grammar to match the language specification docs (GH-23574)
Pablo Galindo [Mon, 30 Nov 2020 19:42:38 +0000 (19:42 +0000)] 
Refactor the grammar to match the language specification docs (GH-23574)

4 years agobpo-42485: [Doc] Link to PEP 617 from full grammar specification (GH-23532)
James Gerity [Mon, 30 Nov 2020 19:08:26 +0000 (14:08 -0500)] 
bpo-42485: [Doc] Link to PEP 617 from full grammar specification (GH-23532)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 years agobpo-42501: Revise the usage note for Enums with the choices (GH-23563)
Raymond Hettinger [Mon, 30 Nov 2020 17:55:13 +0000 (09:55 -0800)] 
bpo-42501:  Revise the usage note for Enums with the choices (GH-23563)

4 years agobpo-42508: Remove bogus idlelib.pyshell.ModifiedInterpreter attribute (GH-23570)
Terry Jan Reedy [Mon, 30 Nov 2020 17:09:43 +0000 (12:09 -0500)] 
bpo-42508: Remove bogus idlelib.pyshell.ModifiedInterpreter attribute (GH-23570)

restart_subprocess is a method of self, the pyshell.InteractiveInterpreter instance. The latter does not have an interp attribute redundantly referring to itself. (The PyShell instance does have an interp attribute, referring to the InteractiveInterpreter instance.)

4 years agobpo-42487: don't call __getitem__ of underlying maps in ChainMap.__iter__ (GH-23534)
Andreas Poehlmann [Mon, 30 Nov 2020 16:34:15 +0000 (17:34 +0100)] 
bpo-42487: don't call __getitem__ of underlying maps in ChainMap.__iter__ (GH-23534)

4 years agobpo-42451: Indicate that PyTuple_GetItem does not support negative indices (GH-23529)
Yasser A [Mon, 30 Nov 2020 09:53:11 +0000 (01:53 -0800)] 
bpo-42451: Indicate that PyTuple_GetItem does not support negative indices (GH-23529)

4 years agobpo-42506: Fix unexpected output in test_format (GH-23564)
Zackery Spytz [Mon, 30 Nov 2020 08:39:12 +0000 (01:39 -0700)] 
bpo-42506: Fix unexpected output in test_format (GH-23564)

4 years agobpo-42142: Try to fix timeouts in ttk tests (GH-23474)
Serhiy Storchaka [Mon, 30 Nov 2020 08:24:07 +0000 (10:24 +0200)] 
bpo-42142: Try to fix timeouts in ttk tests (GH-23474)

Instead of using wait_visibility() which waits event <VisibilityNotify> in dead loop
use update() which should proceed all queued events.

4 years agobpo-42450: Minor updates to the itertools recipes (GH-23555)
Raymond Hettinger [Sun, 29 Nov 2020 18:47:22 +0000 (10:47 -0800)] 
bpo-42450: Minor updates to the itertools recipes (GH-23555)