summaryrefslogtreecommitdiffstats
path: root/Misc
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-40014: Fix os.getgrouplist() (GH-19126)Victor Stinner2020-03-241-3/+4
| | | | | | | | Fix os.getgrouplist(): if getgrouplist() function fails because the group list is too small, retry with a larger group list. On failure, the glibc implementation of getgrouplist() sets ngroups to the total number of groups. For other implementations, double the group list size.
* bpo-40050: Fix importlib._bootstrap_external (GH-19135)Victor Stinner2020-03-241-0/+3
| | | | | | Remove two unused imports: _thread and _weakref. Avoid creating a new winreg builtin module if it's already available in sys.modules. The winreg module is now stored as "winreg" rather than "_winreg".
* bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120)Victor Stinner2020-03-241-0/+3
| | | | | | | | PyThreadState.frame is a borrowed reference, not a strong reference: PyThreadState_Clear() must not call Py_CLEAR(tstate->frame). Remove test_threading.test_warnings_at_exit(): we cannot warranty that the Python thread state of daemon threads is cleared in a reliable way during Python shutdown.
* closes bpo-40017: Add CLOCK_TAI constant to the time module. (GH-19096)Russell Owen2020-03-241-0/+1
| | | Co-authored-by: Benjamin Peterson <benjamin@python.org>
* Merge tag 'v3.9.0a5'Łukasz Langa2020-03-23126-292/+1310
|\ | | | | | | Python 3.9.0a5
| * Python 3.9.0a5v3.9.0a5Łukasz Langa2020-03-23126-292/+1310
| |
* | bpo-36144: Add union operators to WeakKeyDictionary (#19106)Curtis Bucher2020-03-231-0/+1
| |
* | bpo-36144: Add PEP 584 operators to collections.ChainMap (#18832)Curtis Bucher2020-03-232-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update ChainMap to include | and |= Created __ior__, __or__ and __ror__ methods in ChainMap class. * Update ACKS * Update docs * Update test_collections.py to include test_issue584(). Added testing for | and |= operators for ChainMap objects. * Update test_union_operators Renamed test_union operators, fixed errors and style problems raised by brandtbucher. * Update test_union_operators in TestChainMap Added testing for union operator between ChainMap and iterable of key-value pairs. * Update test_union operators in test_collections.py Gave more descriptive variable names and eliminated unnecessary tmp variable. * Update test_union_operators in test_collections.py Added cm3 * Check .maps rather than Chainmap equality. * Add news entry * Update Lib/test/test_collections.py Co-Authored-By: Brandt Bucher <brandtbucher@gmail.com> * Removed whitespace * Added Guido's changes * Fixed Docs * Removed whitespace Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* | bpo-40014: Fix os.getgrouplist() on macOS (GH-19118)Victor Stinner2020-03-231-0/+3
| | | | | | | | | | On macOS, getgrouplist() returns a non-zero value without setting errno if the group list is too small. Double the list size and call it again in this case.
* | bpo-1635741: Port time module to multiphase initialization (PEP 489) (GH-19107)Paulo Henrique Silva2020-03-231-0/+2
|/
* bpo-39830: Add zipfile.Path to __all__ (GH-19115)Zackery Spytz2020-03-231-0/+1
|
* bpo-39999: Improve compatibility of the ast module. (GH-19056)Serhiy Storchaka2020-03-225-3/+6
| | | | | | | * Re-add removed classes Suite, slice, Param, AugLoad and AugStore. * Add docstrings for dummy classes. * Add docstrings for attribute aliases. * Set __module__ to "ast" instead of "_ast".
* bpo-22490: Remove __PYVENV_LAUNCHER__ from environment during launch (GH-9516)Ronald Oussoren2020-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | * bpo-22490: Remove "__PYVENV_LAUNCHER__" from the shell environment on macOS This changeset removes the environment varialbe "__PYVENV_LAUNCHER__" during interpreter launch as it is only needed to communicate between the stub executable in framework installs and the actual interpreter. Leaving the environment variable present may lead to misbehaviour when launching other scripts. * Actually commit the changes for issue 22490... * Correct typo Co-Authored-By: Nicola Soranzo <nicola.soranzo@gmail.com> * Run make patchcheck Co-authored-by: Jason R. Coombs <jaraco@jaraco.com> Co-authored-by: Nicola Soranzo <nicola.soranzo@gmail.com>
* bpo-40024: Add PyModule_AddType() helper function (GH-19088)Dong-hee Na2020-03-221-0/+1
|
* bpo-39652: Truncate the column name after '[' only if PARSE_COLNAMES is set. ↵Serhiy Storchaka2020-03-211-0/+2
| | | | (GH-18942)
* bpo-39946: Remove _PyThreadState_GetFrame (GH-19094)Victor Stinner2020-03-201-0/+3
| | | | | Remove _PyRuntime.getframe hook and remove _PyThreadState_GetFrame macro which was an alias to _PyRuntime.getframe. They were only exposed by the internal C API. Remove also PyThreadFrameGetter type.
* bpo-39947: Add PyThreadState_GetFrame() function (GH-19092)Victor Stinner2020-03-201-0/+2
| | | | Add PyThreadState_GetFrame() function: get the current frame of a Python thread state.
* bpo-40010: Optimize pending calls in multithreaded applications (GH-19091)Victor Stinner2020-03-201-0/+8
| | | | | | | | | | | | | | | If a thread different than the main thread schedules a pending call (Py_AddPendingCall()), the bytecode evaluation loop is no longer interrupted at each bytecode instruction to check for pending calls which cannot be executed. Only the main thread can execute pending calls. Previously, the bytecode evaluation loop was interrupted at each instruction until the main thread executes pending calls. * Add _Py_ThreadCanHandlePendingCalls() function. * SIGNAL_PENDING_CALLS() now only sets eval_breaker to 1 if the current thread can execute pending calls. Only the main thread can execute pending calls.
* bpo-1635741: Port _weakref extension module to multiphase initialization ↵Hai Shi2020-03-201-0/+1
| | | | (PEP 489) (GH-19084)
* bpo-40019: Skip test_gdb if Python was optimized (GH-19081)Victor Stinner2020-03-201-0/+2
| | | | test_gdb now skips tests if it detects that gdb failed to read debug information because the Python binary is optimized.
* bpo-40010: Optimize signal handling in multithreaded applications (GH-19067)Victor Stinner2020-03-191-0/+8
| | | | | | | | | | | | | | | If a thread different than the main thread gets a signal, the bytecode evaluation loop is no longer interrupted at each bytecode instruction to check for pending signals which cannot be handled. Only the main thread of the main interpreter can handle signals. Previously, the bytecode evaluation loop was interrupted at each instruction until the main thread handles signals. Changes: * COMPUTE_EVAL_BREAKER() and SIGNAL_PENDING_SIGNALS() no longer set eval_breaker to 1 if the current thread cannot handle signals. * take_gil() now always recomputes eval_breaker.
* bpo-1635741: Port _collections module to multiphase initialization (GH-19074)Dong-hee Na2020-03-191-0/+1
|
* bpo-39562: Allow executing asynchronous comprehensions in the asyncio REPL ↵Batuhan Taşkaya2020-03-191-0/+2
| | | | | (GH-18968) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40000: Improve error messages when validating invalid ast.Constant nodes ↵Batuhan Taşkaya2020-03-191-0/+2
| | | | | (GH-19055) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39984: Move pending calls to PyInterpreterState (GH-19066)Victor Stinner2020-03-191-0/+4
| | | | | | | | | | | | | | | | | If Py_AddPendingCall() is called in a subinterpreter, the function is now scheduled to be called from the subinterpreter, rather than being called from the main interpreter. Each subinterpreter now has its own list of scheduled calls. * Move pending and eval_breaker fields from _PyRuntimeState.ceval to PyInterpreterState.ceval. * new_interpreter() now calls _PyEval_InitThreads() to create pending calls lock. * Fix Py_AddPendingCall() for subinterpreters. It now calls _PyThreadState_GET() which works in a subinterpreter if the caller holds the GIL, and only falls back on PyGILState_GetThisThreadState() if _PyThreadState_GET() returns NULL.
* bpo-39220: Do not optimise annotation if 'from __future__ import ↵Pablo Galindo2020-03-181-0/+2
| | | | | | annotations' is used (GH-17866) Do not apply AST-based optimizations if 'from __future__ import annotations' is used in order to prevent information lost in the final version of the annotations.
* bpo-37207: Use PEP 590 vectorcall to speed up frozenset() (GH-19053)Dong-hee Na2020-03-181-0/+2
|
* bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)Victor Stinner2020-03-181-0/+2
| | | | | | test_site.test_startup_imports() is now skipped if a path of sys.path contains a .pth file. Sort test_site imports.
* bpo-1635741: Port _heapq module to multiphase initialization (GH19057)Dong-hee Na2020-03-181-0/+1
|
* bpo-38373: Change list overallocating strategy. (GH-18952)Serhiy Storchaka2020-03-171-0/+2
| | | | | * Add padding to make the allocated size multiple of 4. * Do not overallocate if the new size is closer to overalocated size than to the old size.
* bpo-39719: Remove softspace from tempfile.SpooledTemporaryFile (GH-18599)Shantanu2020-03-171-0/+1
|
* bpo-39988: Remove ast.AugLoad and ast.AugStore node classes. (GH-19038)Serhiy Storchaka2020-03-171-0/+2
|
* bpo-39984: Add PyInterpreterState.ceval (GH-19047)Victor Stinner2020-03-171-0/+3
| | | | | | | | | | | | | | | subinterpreters: Move _PyRuntimeState.ceval.tracing_possible to PyInterpreterState.ceval.tracing_possible: each interpreter now has its own variable. Changes: * Add _ceval_state structure. * Add PyInterpreterState.ceval field. * _PyEval_EvalFrameDefault(): add ceval2 variable (struct _ceval_state*). * Rename _PyEval_Initialize() to _PyEval_InitRuntimeState(). * Add _PyEval_InitState(). * Don't export internal _Py_FinishPendingCalls() and _PyEval_FiniThreads() functions anymore.
* bpo-1635741: Port itertools module to multiphase initialization (GH-19044)Dong-hee Na2020-03-171-0/+1
|
* bpo-39824: module_traverse() don't call m_traverse if md_state=NULL (GH-18738)Victor Stinner2020-03-171-0/+10
| | | | | | | | | | | | | Extension modules: m_traverse, m_clear and m_free functions of PyModuleDef are no longer called if the module state was requested but is not allocated yet. This is the case immediately after the module is created and before the module is executed (Py_mod_exec function). More precisely, these functions are not called if m_size is greater than 0 and the module state (as returned by PyModule_GetState()) is NULL. Extension modules without module state (m_size <= 0) are not affected. Co-Authored-By: Petr Viktorin <encukou@gmail.com>
* bpo-26067: Do not fail test_shutil / chown when gid/uid cannot be resolved ↵Matthias Braun2020-03-171-0/+1
| | | | | | | | | | | | | | | | | | | (#19032) * bpo-26067: Do not fail test_shutil.chown when gid/uid cannot be resolved There is no guarantee that the users primary uid or gid can be resolved in the unix group/account databases. Skip the last part of the chown test if we cannot resolve the gid or uid to a name. * 📜🤖 Added by blurb_it. * Address review feedback * address review feedback correctly * fix typo Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-39991: uuid._netstat_getnode() ignores IPv6 addresses (GH-19043)Victor Stinner2020-03-171-0/+2
| | | | uuid.getnode() now skips IPv6 addresses with the same string length than a MAC address (17 characters): only use MAC addresses.
* bpo-39656: Ensure `bin/python3.#` is always present in virtual environments ↵Anthony Sottile2020-03-171-0/+2
| | | | on POSIX (GH-19030)
* bpo-37207: Use PEP 590 vectorcall to speed up set() constructor (GH-19019)Dong-hee Na2020-03-161-0/+2
|
* bpo-35370: PyEval_SetTrace() logs unraisable error (GH-18977)Victor Stinner2020-03-161-0/+2
| | | | If PySys_Audit() fails in PyEval_SetProfile() or PyEval_SetTrace(), log the error as an unraisable exception.
* bpo-1635741: Port _statistics module to multiphase initialization (GH-19015)Dong-hee Na2020-03-161-0/+1
|
* bpo-37207: Add _PyArg_NoKwnames() helper function (GH-18980)Dong-hee Na2020-03-161-0/+1
|
* bpo-39968: Convert extension modules' macros of get_module_state() to inline ↵Hai Shi2020-03-161-0/+1
| | | | functions (GH-19017)
* bpo-39638: Keep ASDL signatures in the AST nodes (GH-18515)Batuhan Taşkaya2020-03-161-0/+2
|
* bpo-39360: Ensure all workers exit when finalizing a multiprocessing Pool ↵Batuhan Taşkaya2020-03-151-0/+4
| | | | | | | | | (GH-19009) When the pull is not used via the context manager or terminate() is called, there is a system in multiprocessing.util that handles finalization of all pools via an atexit handler (the Finalize) class. This class registers the _terminate_pool handler in the registry of finalizers of the module, and that registry is called on interpreter exit via _exit_function. The problem is that the "happy" path with the context manager or manual call to finalize() does some extra steps that _terminate_pool does not. The step that is not executed when the atexit() handler calls _terminate_pool is pinging the _change_notifier queue to unblock the maintenance threads. This commit moves the notification to the _terminate_pool function so is called from both code paths. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-39969: Remove ast.Param node class as is no longer used (GH-19020)Batuhan Taşkaya2020-03-151-0/+2
|
* bpo-39507: Add HTTP status 418 "I'm a Teapot" (GH-18291)Ross2020-03-151-0/+1
|
* bpo-39965: Correctly raise SyntaxError if await is used outside async ↵Pablo Galindo2020-03-151-0/+3
| | | | functions when PyCF_ALLOW_TOP_LEVEL_AWAIT is set (GH-19010)
* bpo-38576: Disallow control characters in hostnames in http.client (GH-18995)Ashwin Ramaswami2020-03-141-0/+1
| | | | Add host validation for control characters for more CVE-2019-18348 protection.
* bpo-39677: dis: rename the operand of MAKE_FUNCTION from `argc` to `flags` ↵Taine Zhao2020-03-141-0/+1
| | | | for 3.6+ (GC-18550)