summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* bpo-39877: Refactor take_gil() function (GH-18885)Victor Stinner2020-03-092-66/+53
| | | | | | | | | * Remove ceval parameter of take_gil(): get it from tstate. * Move exit_thread_if_finalizing() call inside take_gil(). Replace exit_thread_if_finalizing() with tstate_must_exit(): the caller is now responsible to call PyThread_exit_thread(). * Move is_tstate_valid() assertion inside take_gil(). Remove is_tstate_valid(): inline code into take_gil(). * Move gil_created() assertion inside take_gil().
* bpo-27115: Use Query subclass for IDLE editor Goto (GH-18871)Terry Jan Reedy2020-03-095-12/+74
| | | | Replace tkinter tkSimpleDialog.askinteger with a standard IDLE query dialog. The new box checks for positivity before returning.
* bpo-38870: Simplify sequence interleaves in ast.unparse (GH-17892)Batuhan Taşkaya2020-03-092-37/+34
|
* bpo-39877: Py_Initialize() pass tstate to PyEval_InitThreads() (GH-18884)Victor Stinner2020-03-093-9/+28
|
* bpo-39877: Remove useless PyEval_InitThreads() calls (GH-18883)Victor Stinner2020-03-098-21/+7
| | | | Py_Initialize() calls PyEval_InitThreads() since Python 3.7. It's no longer needed to call it explicitly.
* bpo-38249: Expand Py_UNREACHABLE() to __builtin_unreachable() in the release ↵Serhiy Storchaka2020-03-098-15/+39
| | | | | mode. (GH-16329) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-36184: Port python-gdb.py to FreeBSD (GH-18873)Victor Stinner2020-03-092-1/+5
| | | | | | python-gdb.py now checks for "take_gil" function name to check if a frame tries to acquire the GIL, instead of checking for "pthread_cond_timedwait" which is specific to Linux and can be a different condition than the GIL.
* bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is ↵Serhiy Storchaka2020-03-094-9/+36
| | | | called with invalid base. (GH-18863)
* bpo-39904: Move handling of one-argument call of type() from type.__new__() ↵Serhiy Storchaka2020-03-091-39/+32
| | | | to type.__call__(). (GH-18852)
* bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)Pablo Galindo2020-03-096-5/+58
|
* bpo-39822: Use NULL instead of None for empty attrib in Element. (GH-18735)Serhiy Storchaka2020-03-092-41/+37
|
* bpo-39903: Fix double decref in _elementtree.Element.__getstate__ (GH-18850)Serhiy Storchaka2020-03-091-26/+17
|
* bpo-38691: importlib ignores PYTHONCASEOK if -E is used (GH-18627)idomic2020-03-097-2629/+2652
| | | | | The importlib module now ignores the PYTHONCASEOK environment variable when the -E or -I command line options are being used.
* bpo-27115: Move IDLE Query error blanking (GH-18868)Terry Jan Reedy2020-03-091-5/+2
| | | | Move required blanking of error text to non-overridden entry_ok(). (Omit news item.)
* Fix typo in the parser generator (GH-18603)xatier2020-03-091-1/+1
|
* bpo-39517: Allow runpy.run_path() to accept path-like objects (GH-18699)Maor Kleinberger2020-03-083-2/+14
|
* bpo-39885: IDLE context menu clears selection (#18859)Terry Jan Reedy2020-03-083-0/+6
| | | | | Since clicking to get an IDLE context menu moves the cursor, any text selection should be and now is cleared.
* bpo-39852: IDLE 'Go to line' deletes selection, updates status (GH-18801)Terry Jan Reedy2020-03-085-16/+31
| | | | | | It appears standard that moving the text insert cursor away from a selection clears the selection. Clearing prevents accidental deletion of a possibly off-screen bit of text. The update is for Ln and Col on the status bar.
* fix typo: add space (GH-18853)Julin S2020-03-081-2/+2
| | | | Fix typo in cmdline.rst Add space between the `-m` option and the module name (`timeit`).
* closes bpo-39898: Remove unused arg from append_formattedvalue. (GH-18840)Andy Lester2020-03-081-4/+4
|
* bpo-39567: Document audit for os.walk, os.fwalk, Path.glob and Path.rglob. ↵Serhiy Storchaka2020-03-082-0/+8
| | | | (GH-18499)
* bpo-39877: Fix PyEval_RestoreThread() for daemon threads (GH-18811)Victor Stinner2020-03-084-26/+74
| | | | | | | | | | | | | | | | | | | | * exit_thread_if_finalizing() does now access directly _PyRuntime variable, rather than using tstate->interp->runtime since tstate can be a dangling pointer after Py_Finalize() has been called. * exit_thread_if_finalizing() is now called *before* calling take_gil(). _PyRuntime.finalizing is an atomic variable, we don't need to hold the GIL to access it. * Add ensure_tstate_not_null() function to check that tstate is not NULL at runtime. Check tstate earlier. take_gil() does not longer check if tstate is NULL. Cleanup: * PyEval_RestoreThread() no longer saves/restores errno: it's already done inside take_gil(). * PyEval_AcquireLock(), PyEval_AcquireThread(), PyEval_RestoreThread() and _PyEval_EvalFrameDefault() now check if tstate is valid with the new is_tstate_valid() function which uses _PyMem_IsPtrFreed().
* bpo-39890: Don't mutate the AST when compiling starred assignments (GH-18833)Brandt Bucher2020-03-081-2/+4
|
* bpo-36144: Update MappingProxyType with PEP 584's operators (#18814)Brandt Bucher2020-03-074-1/+51
| | | We make `|=` raise TypeError, since it would be surprising if `C.__dict__ |= {'x': 0}` silently did nothing, while `C.__dict__.update({'x': 0})` is an error.
* bpo-39702: Update the Language Reference (PEP 614) (GH-18802)Brandt Bucher2020-03-072-1/+15
|
* bpo-39199: Use 'eval' mode for the examples with expression nodes (GH-18828)Pablo Galindo2020-03-071-292/+211
| | | Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
* bpo-38894: Fix pathlib.Path.glob in the presence of symlinks and ↵Pablo Galindo2020-03-073-13/+56
| | | | | insufficient permissions (GH-18815) Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
* closes bpo-39886: Remove unused arg from config_get_stdio_errors. (GH-18823)Andy Lester2020-03-071-2/+2
|
* closes bpo-39878: Remove unused arguments from static functions. (GH-18822)Andy Lester2020-03-071-10/+10
| | | | | calc_number_widths -> PyObject *number fill_number -> Py_ssize_t d_end
* bpo-39889: Fix ast.unparse() for subscript. (GH-18824)Serhiy Storchaka2020-03-073-2/+34
|
* bpo-39837: Disable macOS tests on Azure Pipelines (GH-18818)Steve Dower2020-03-072-2/+6
|
* bpo-39882: Py_FatalError() logs the function name (GH-18819)Victor Stinner2020-03-0617-69/+112
| | | | | | | | | | | | The Py_FatalError() function is replaced with a macro which logs automatically the name of the current function, unless the Py_LIMITED_API macro is defined. Changes: * Add _Py_FatalErrorFunc() function. * Remove the function name from the message of Py_FatalError() calls which included the function name. * Update tests.
* bpo-39877: _PyRuntimeState.finalizing becomes atomic (GH-18816)Victor Stinner2020-03-065-15/+29
| | | | | | | | | | | | Convert _PyRuntimeState.finalizing field to an atomic variable: * Rename it to _finalizing * Change its type to _Py_atomic_address * Add _PyRuntimeState_GetFinalizing() and _PyRuntimeState_SetFinalizing() functions * Remove _Py_CURRENTLY_FINALIZING() function: replace it with testing directly _PyRuntimeState_GetFinalizing() value Convert _PyRuntimeState_GetThreadState() to static inline function.
* bpo-39573: Use Py_IS_TYPE() macro to check for types (GH-18809)Andy Lester2020-03-0610-17/+15
| | | Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-17422: slightly more precise language (GH-18682)Caleb Donovick2020-03-062-1/+3
|
* bpo-39873: Cleanup _PyObject_CheckConsistency() (GH-18807)Victor Stinner2020-03-061-1/+0
| | | | Remove redundant check on Py_TYPE() value: it's already checked inside _PyType_CheckConsistency().
* bpo-36144: Implement defaultdict union (GH-18729)Brandt Bucher2020-03-064-6/+88
| | | For PEP 585 (this isn't in the PEP but is an obvious follow-up).
* closes bpo-39872: Remove unused args from symtable_exit_block and ↵Andy Lester2020-03-061-16/+15
| | | | symtable_visit_annotations. (GH-18800)
* bpo-39873: PyObject_Init() uses PyObject_INIT() (GH-18804)Victor Stinner2020-03-061-9/+2
| | | | | | Avoid duplicated code: * PyObject_Init() uses PyObject_INIT() * PyObject_InitVar() uses PyObject_INIT_VAR()
* PyPy already supports Python 3 (GH-18774)Slam2020-03-061-2/+1
|
* bpo-39573: Make Py_IS_TYPE() take constant parameters (GH-18799)Andy Lester2020-03-061-2/+3
| | | Add _PyObject_CAST_CONST() macro: cast a pointer to (const PyObject *).
* bpo-39868: Update Language Reference for PEP 572. (#18793)Brandt Bucher2020-03-063-6/+19
|
* closes bpo-39859: Do not downcast result of hstrerror (GH-18790)Andy Lester2020-03-061-1/+1
| | | | | set_herror builds a string by calling hstrerror but downcasts its return value to char *. It should be const char *. Automerge-Triggered-By: @benjaminp
* closes bpo-39870: Remove unused arg from sys_displayhook_unencodable. (GH-18796)Andy Lester2020-03-061-3/+3
| | | Also move int err to its innermost scope.
* IDLE doc: improve Startup failure subsection. (#18771)Jules Lasne (jlasne)2020-03-061-7/+10
| | | | | | Eliminate repeat of 'Options', reported by Jules Lasne, and improve wording elsewhere. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Add a comment to _Py_RestoreSignals() (GH-18792)Victor Stinner2020-03-051-0/+2
| | | subprocess _posix_spawn() should stay in sync with _Py_RestoreSignals().
* bpo-39855: Fix test_subprocess if nobody user doesn't exist (GH-18781)Victor Stinner2020-03-052-2/+10
| | | | | test_subprocess.test_user() now skips the test on an user name if the user name doesn't exist. For example, skip the test if the user "nobody" doesn't exist on Linux.
* bpo-13487: Use sys.modules.copy() in inspect.getmodule() for thread safety. ↵Gregory P. Smith2020-03-052-1/+4
| | | | | | | | (GH-18786) `list(sys.modules.items())` was apparently not immune to "dictionary changed size during iteration" errors. Tested internally using an integration test that has run into this a couple of times in the past two years. With this patch applied, the test is no longer flaky.
* Add a missing space after a period in 'typing.TypedDict' documentation ↵Miss Islington (bot)2020-03-051-1/+1
| | | | (GH-18784)
* bpo-39808: Improve docs for pathlib.Path.stat() (GH-18719)Brett Cannon2020-03-041-1/+1
|