summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-42639: Add script_helper.run_test_script() (GH-23777)Victor Stinner2020-12-153-16/+34
| | | | | | * Add run_test_script() function to test.support.script_helper. * Rename Lib/test/eintrdata/eintr_tester.py to Lib/test/_test_eintr.py. * test_eintr.py uses run_test_script().
* bpo-14935: Remove static state from the _csv module (GH-23224)Petr Viktorin2020-12-152-241/+304
| | | | | | | | Uses code from: https://github.com/python/cpython/pull/16078 Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com> Co-authored-by: Eddie Elizondo <eduardo.elizondorueda@gmail.com> Co-authored-by: Hai Shi <shihai1992@gmail.com>
* bpo-42639: Move atexit state to PyInterpreterState (GH-23763)Victor Stinner2020-12-157-113/+101
| | | | | | | | | * Add _PyAtExit_Call() function and remove pyexitfunc and pyexitmodule members of PyInterpreterState. The function logs atexit callback errors using _PyErr_WriteUnraisableMsg(). * Add _PyAtExit_Init() and _PyAtExit_Fini() functions. * Remove traverse, clear and free functions of the atexit module. Co-authored-by: Dong-hee Na <donghee.na@python.org>
* bpo-42246: Remove DO_NOT_EMIT_BYTECODE macros, so that while loops and if ↵Mark Shannon2020-12-158-3545/+3486
| | | | statements conform to PEP 626. (GH-23743)
* bpo-33610: Edit idlelib.codecontext (GH-23773)Terry Jan Reedy2020-12-151-5/+8
| | | Add sentence to module docstring and import tkinter items.
* bpo-31904: Enable libpython3.so shared library for VxWorks (GH-23741)pxinwr2020-12-143-4/+5
|
* bpo-42639: atexit now logs callbacks exceptions (GH-23771)Victor Stinner2020-12-148-28/+53
| | | | | | | | | | | 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.
* bpo-42639: Cleanup atexitmodule.c (GH-23770)Victor Stinner2020-12-145-158/+125
| | | | | | | | | * 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.
* bpo-41877: Check for misspelled speccing arguments (GH-23737)vabr-g2020-12-143-8/+84
| | | | | | | | | | | | 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.
* bpo-36541: Add lib2to3 grammar PEP-570 pos-only arg parsing (GH-23759)Gregory P. Smith2020-12-143-6/+79
| | | | | | | | | 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.
* bpo-42635: Mark JUMP_ABSOLUTE at end of 'for' loop as artificial to avoid ↵Mark Shannon2020-12-144-3767/+3795
| | | | spurious line events. (GH-23761)
* Don't generate spurious line number in try-except-finally. (#23760)Mark Shannon2020-12-144-1732/+1751
|
* bpo-42598: Fix implicit function declarations in configure (GH-23690)Joshua Root2020-12-133-12/+16
| | | | | | 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.
* bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and ↵kj2020-12-139-63/+212
| | | | typing (GH-23060)
* bpo-30858: Improve error location for expressions with assignments (GH-23753)Pablo Galindo2020-12-135-6/+15
| | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* Add two spaces around equal sign (#23719)sblondon2020-12-131-1/+1
| | | Fit to PEP8 coding style
* bpo-39717: [tarfile] update nested exception raising (GH-23739)Ethan Furman2020-12-122-32/+34
| | | | - `from None` if the new exception uses, or doesn't need, the previous one - `from e` if the previous exception is still relevant
* bpo-41879: Doc: Fix description of async for statement (GH-23548)Nick Gaya2020-12-111-4/+4
| | | Fix the wording in the documentation of `async for` to correctly describe asynchronous iterables. This fix is relevant for version 3.7 onward.
* bpo-42059: Fix required/optional keys for TypedDict(..., total=False) (GH-22736)Alex Grönholm2020-12-103-2/+7
|
* bpo-34750: [Enum] add `_EnumDict.update()` support (GH-23725)Ethan Furman2020-12-103-1/+40
| | | | | | | | | | | | | | | | 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()
* bpo-42385: [Enum] add `_generate_next_value_` to StrEnum (GH-23735)Ethan Furman2020-12-104-2/+17
| | | 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.
* bpo-41877: Improve docs for assert misspellings check in mock (GH-23729)vabr-g2020-12-104-6/+9
| | | | | | | | | 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
* bpo-42591: Export missing Py_FrozenMain() symbol (GH-23730)Victor Stinner2020-12-103-0/+6
| | | | | | | 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.
* bpo-42517: [Enum] do not convert private names into members (GH-23722)Ethan Furman2020-12-104-1/+54
| | | private names, such as `_Color__hue` and `_Color__hue_` are now normal attributes, and do not become members nor raise exceptions
* bpo-42567: [Enum] call __init_subclass__ after members are added (GH-23714)Ethan Furman2020-12-103-2/+104
| | | | | 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.
* [doc] Link to issue regarding logging.disable level param default value ↵Andre Delfino2020-12-091-2/+2
| | | | (GH-23726)
* [doc] Document logging.basicConfig default format (GH-23710)Andre Delfino2020-12-091-1/+3
| | | Automerge-Triggered-By: GH:vsajip
* bpo-31904: Define THREAD_STACK_SIZE for VxWorks (GH-23718)pxinwr2020-12-092-0/+5
|
* bpo-32381: Add _PyRun_AnyFileObject() (GH-23723)Victor Stinner2020-12-095-53/+106
| | | | | | | | | | 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()
* bpo-32381: Remove unused _Py_fopen() function (GH-23711)Victor Stinner2020-12-093-31/+3
| | | | Remove the private _Py_fopen() function which is no longer needed. Use _Py_wfopen() or _Py_fopen_obj() instead.
* bpo-32381: Add _PyRun_SimpleFileObject() (GH-23709)Victor Stinner2020-12-083-31/+23
| | | | pymain_run_startup() now pass the filename as a Python object to _PyRun_SimpleFileObject().
* bpo-41439: Skip test_ssl and test_uuid tests if fork() is not supported ↵pxinwr2020-12-083-2/+3
| | | | (GH-21684)
* bpo-41443: Add more attribute checking in test_posix (GH-21688)pxinwr2020-12-082-3/+8
|
* bpo-35134: Add Include/cpython/pythonrun.h file (GH-23701)Victor Stinner2020-12-085-117/+129
| | | | | Py_CompileString() is now always declared as a function by Include/pythonrun.h. It is overriden with a macro in Include/cpython/pythonrun.h.
* bpo-32381: Rewrite PyErr_ProgramText() (GH-23700)Victor Stinner2020-12-081-5/+10
| | | PyErr_ProgramText() now calls PyErr_ProgramTextObject().
* [Enum] reformat and add doc strings (GH-23705)Ethan Furman2020-12-082-54/+135
|
* bpo-41907: [Enum] fix format() behavior for IntFlag (GH-22497)Ethan Furman2020-12-083-1/+16
|
* bpo-42111: Make the xxlimited module an example of best extension module ↵Petr Viktorin2020-12-0811-158/+748
| | | | | | | 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
* bpo-41910: move news entry (GH-23695)Terry Jan Reedy2020-12-081-9/+9
|
* bpo-42599: Remove useless PyModule_GetWarningsModule() (GH-23691)Hai Shi2020-12-083-11/+5
| | | | Removed PyModule_GetWarningsModule() which is useless due to the _warnings module was converted to a builtin module in 2.6.
* bpo-32381: Fix PyRun_SimpleFileExFlags() encoding (GH-23642)Victor Stinner2020-12-082-92/+135
| | | | | | | | | | 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().
* Post 3.10.0a3Pablo Galindo2020-12-081-1/+1
|
* Merge tag 'v3.10.0a3'Pablo Galindo2020-12-08148-372/+1573
|\ | | | | | | Python 3.10.0a3
| * Python 3.10.0a3v3.10.0a3Pablo Galindo2020-12-07148-372/+1573
| |
* | bpo-41462: Add os.set_blocking() support for VxWorks RTOS (GH-21713)pxinwr2020-12-072-1/+4
| |
* | bpo-42579: Make workaround for various versions of Sphinx more robust (GH-23662)Matěj Cepl2020-12-071-1/+6
|/ | | | | | 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.
* bpo-39825: Fixes sysconfig.get_config_var('EXT_SUFFIX') on Windows to match ↵Matti Picus2020-12-073-2/+10
| | | | distutils (GH-22088)
* bpo-30459: Cast the result of PyCell_SET to void (GH-23654)Victor Stinner2020-12-073-3/+14
|
* bpo-41889: [Enum] fix multiple-inheritance regression (GH-22487)Ethan Furman2020-12-073-3/+35
|
* Update macos installer ReadMe for 3.10.0a3 (GH-23671)Ned Deily2020-12-071-2/+10
|