summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-40257: Tweak docstrings for special generic aliases. (GH-20022)Serhiy Storchaka2020-05-101-1/+4
| | | | * Add the terminating period. * Omit module name for builtin types.
* bpo-40397: Fix subscription of nested generic alias without parameters. ↵Serhiy Storchaka2020-05-102-3/+16
| | | | (GH-20021)
* bpo-37986: Improve perfomance of PyLong_FromDouble() (GH-15611)Sergey Fedoseev2020-05-103-23/+19
| | | | | | | | | * bpo-37986: Improve perfomance of PyLong_FromDouble() * Use strict bound check for safety and symmetry * Remove possibly outdated performance claims Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* bpo-40549: Convert posixmodule.c to multiphase init (GH-19982)Victor Stinner2020-05-103-129/+147
| | | | | | | | | | | | | | | Convert posixmodule.c ("posix" or "nt" module) to the multiphase initialization (PEP 489). * Create the module using PyModuleDef_Init(). * Create ScandirIteratorType and DirEntryType with the new PyType_FromModuleAndSpec() (PEP 573) * Get the module state from ScandirIteratorType and DirEntryType with the new PyType_GetModule() (PEP 573) * Pass module to functions which access the module state. * convert_sched_param() gets a new module parameter. It is now called directly since Argument Clinic doesn't support passing the module to an argument converter callback. * Remove _posixstate_global macro.
* bpo-40397: Remove __args__ and __parameters__ from _SpecialGenericAlias ↵Serhiy Storchaka2020-05-102-80/+89
| | | | (GH-19984)
* Add link to Enum class (GH-19884)Andre Delfino2020-05-101-1/+1
|
* bpo-40334: Avoid collisions between parser variables and grammar variables ↵Pablo Galindo2020-05-095-5716/+5758
| | | | | | | | | | | | | | | (GH-19987) This is for the C generator: - Disallow rule and variable names starting with `_` - Rename most local variable names generated by the parser to start with `_` Exceptions: - Renaming `p` to `_p` will be a separate PR - There are still some names that might clash, e.g. - anything starting with `Py` - C reserved words (`if` etc.) - Macros like `EXTRA` and `CHECK`
* bpo-40570: Improve compatibility of uname_result with late-bound .platform ↵Jason R. Coombs2020-05-092-3/+19
| | | | | | | (#20015) * bpo-40570: Improve compatibility of uname_result with late-bound .platform. * Add test capturing ability to cast uname to a tuple.
* bpo-40566: Apply PEP 573 to abc module (GH-20005)Dong-hee Na2020-05-092-15/+20
|
* bpo-39791: Add files() to importlib.resources (GH-19722)Jason R. Coombs2020-05-087-102/+295
| | | | | | | | | * bpo-39791: Update importlib.resources to support files() API (importlib_resources 1.5). * 📜🤖 Added by blurb_it. * Add some documentation about the new objects added. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40502: Initialize n->n_col_offset (GH-19988)Joannah Nanjekye2020-05-082-0/+3
| | | | | | | | | | * initialize n->n_col_offset * 📜🤖 Added by blurb_it. * Move initialization Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40541: Add optional *counts* parameter to random.sample() (GH-19970)Raymond Hettinger2020-05-084-13/+116
|
* Make the first dataclass example more useful (GH-19994)Ned Batchelder2020-05-081-0/+2
|
* bpo-40559: Add Py_DECREF to _asynciomodule.c:task_step_impl() (GH-19990)Chris Jerdonek2020-05-082-0/+5
| | | | This fixes a possible memory leak in the C implementation of asyncio.Task.
* bpo-40273: Reversible mappingproxy (FH-19513)Zackery Spytz2020-05-074-0/+25
|
* bpo-40555: Check for p->error_indicator in loop rules after the main loop is ↵Pablo Galindo2020-05-083-28/+37
| | | | done (GH-19986)
* bpo-40517: Implement syntax highlighting support for ASDL (GH-19967)Batuhan Taskaya2020-05-073-2/+54
|
* bpo-40548: Always run GitHub action, even on doc PRs (GH-19981)Victor Stinner2020-05-071-10/+3
| | | | | Always run GitHub action jobs, even on documentation-only pull requests. So it will be possible to make a GitHub action job, like the Windows (64-bit) job, mandatory.
* bpo-38787: Update structures.rst docs (PEP 573) (GH-19980)Hai Shi2020-05-072-12/+8
|
* bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)Eric Snow2020-05-072-123/+1317
| | | | | | | | | (Note: PEP 554 is not accepted and the implementation in the code base is a private one for use in the test suite.) If code running in a subinterpreter raises an uncaught exception then the "run" call in the calling interpreter fails. A RunFailedError is raised there that summarizes the original exception as a string. The actual exception type, __cause__, __context__, state, etc. are all discarded. This turned out to be functionally insufficient in practice. There is a more helpful solution (and PEP 554 has been updated appropriately). This change adds the exception propagation behavior described in PEP 554 to the _xxsubinterpreters module. With this change a copy of the original exception is set to __cause__ on the RunFailedError. For now we are using "pickle", which preserves the exception's state. We also preserve the original __cause__, __context__, and __traceback__ (since "pickle" does not preserve those). https://bugs.python.org/issue32604
* bpo-40545: Export _PyErr_GetTopmostException() function (GH-19978)Victor Stinner2020-05-072-1/+4
| | | | | | | Declare _PyErr_GetTopmostException() with PyAPI_FUNC() to properly export the function in the C API. The function remains private ("_Py") prefix. Co-Authored-By: Julien Danjou <julien@danjou.info>
* bpo-38787: C API for module state access from extension methods (PEP 573) ↵Petr Viktorin2020-05-0719-51/+797
| | | | | | | | | (GH-19936) Module C state is now accessible from C-defined heap type methods (PEP 573). Patch by Marcel Plch and Petr Viktorin. Co-authored-by: Marcel Plch <mplch@redhat.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-40334: Error message for invalid default args in function call (GH-19973)Lysandros Nikolaou2020-05-074-159/+222
| | | | | When parsing something like `f(g()=2)`, where the name of a default arg is not a NAME, but an arbitrary expression, a specialised error message is emitted.
* bpo-40334: Fix error location upon parsing an invalid string literal (GH-19962)Lysandros Nikolaou2020-05-076-28/+34
| | | | | | | When parsing a string with an invalid escape, the old parser used to point to the beginning of the invalid string. This commit changes the new parser to match that behaviour, since it's currently pointing to the end of the string (or to be more precise, to the beginning of the next token).
* bpo-1635741: Port errno module to multiphase initialization (GH-19923)Dong-hee Na2020-05-072-310/+336
|
* bpo-40397: Refactor typing._GenericAlias (GH-19719)Serhiy Storchaka2020-05-071-191/+198
| | | | | | Make the design more object-oriented. Split _GenericAlias on two almost independent classes: for special generic aliases like List and for parametrized generic aliases like List[int]. Add specialized subclasses for Callable, Callable[...], Tuple and Union[...].
* bpo-40334: Generate comments in the parser code to improve debugging (GH-19966)Pablo Galindo2020-05-062-1074/+1088
|
* bpo-40334: Allow trailing comma in parenthesised context managers (GH-19964)Pablo Galindo2020-05-063-7/+79
|
* Fix typo in sqlite3 documentation (GH-19965)Naglis2020-05-061-1/+1
| | | *first* is repeated twice.
* bpo-40334: Add type to the assignment rule in the grammar file (GH-19963)Lysandros Nikolaou2020-05-062-5/+5
|
* bpo-40521: Disable list free list in subinterpreters (GH-19959)Victor Stinner2020-05-061-1/+8
| | | | | | When Python is built with experimental isolated interpreters, disable the list free list. Temporary workaround until this cache is made per-interpreter.
* bpo-40533: Disable GC in subinterpreters (GH-19961)Victor Stinner2020-05-061-0/+8
| | | | | | | When Python is built with experimental isolated interpreters, a garbage collection now does nothing in an isolated interpreter. Temporary workaround until subinterpreters stop sharing Python objects.
* bpo-40521: Disable method cache in subinterpreters (GH-19960)Victor Stinner2020-05-061-3/+19
| | | | | | When Python is built with experimental isolated interpreters, disable the type method cache. Temporary workaround until the cache is made per-interpreter.
* bpo-40528: Improve and clear several aspects of the ASDL definition code for ↵Batuhan Taskaya2020-05-066-101/+75
| | | | the AST (GH-19952)
* bpo-40527: Fix command line argument parsing (GH-19955)Victor Stinner2020-05-063-7/+29
|
* Revert "bpo-40517: Implement syntax highlighting support for ASDL (#19928)" ↵Raymond Hettinger2020-05-053-54/+2
| | | | | (#19950) This reverts commit d60040ba226bd2e3b6f58d074015aa2499dc1cb8.
* bpo-40517: Implement syntax highlighting support for ASDL (#19928)Batuhan Taskaya2020-05-053-2/+54
|
* bpo-40480 "fnmatch" exponential execution time (GH-19908)Tim Peters2020-05-053-7/+71
| | | | | bpo-40480: create different regexps in the presence of multiple `*` patterns to prevent fnmatch() from taking exponential time.
* bpo-40523: Add pass-throughs for hash() and reversed() to weakref.proxy ↵Pablo Galindo2020-05-053-1/+40
| | | | objects (GH-19946)
* bpo-40504: Allow weakrefs to lru_cache objects (GH-19938)Dennis Sweeney2020-05-053-1/+38
|
* bpo-40355: Improve error messages in ast.literal_eval with malformed Dict ↵Curtis Bucher2020-05-053-4/+15
| | | | | nodes (GH-19868) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40513: _xxsubinterpreters.run_string() releases the GIL (GH-19944)Victor Stinner2020-05-051-0/+15
| | | | In the experimental isolated subinterpreters build mode, _xxsubinterpreters.run_string() now releases the GIL.
* bpo-40513: Per-interpreter GIL (GH-19943)Victor Stinner2020-05-056-5/+82
| | | | | | | | In the experimental isolated subinterpreters build mode, the GIL is now per-interpreter. Move gil from _PyRuntimeState.ceval to PyInterpreterState.ceval. new_interpreter() always get the config from the main interpreter.
* bpo-40513: new_interpreter() init GIL earlier (GH-19942)Victor Stinner2020-05-051-4/+4
| | | Fix also code to handle init_interp_main() failure.
* bpo-40522: _PyThreadState_Swap() sets autoTSSkey (GH-19939)Victor Stinner2020-05-053-2/+48
| | | | | | | | | | | | | | | | | | In the experimental isolated subinterpreters build mode, _PyThreadState_GET() gets the autoTSSkey variable and _PyThreadState_Swap() sets the autoTSSkey variable. * Add _PyThreadState_GetTSS() * _PyRuntimeState_GetThreadState() and _PyThreadState_GET() return _PyThreadState_GetTSS() * PyEval_SaveThread() sets the autoTSSkey variable to current Python thread state rather than NULL. * eval_frame_handle_pending() doesn't check that _PyThreadState_Swap() result is NULL. * _PyThreadState_Swap() gets the current Python thread state with _PyThreadState_GetTSS() rather than _PyRuntimeGILState_GetThreadState(). * PyGILState_Ensure() no longer checks _PyEval_ThreadsInitialized() since it cannot access the current interpreter.
* bpo-40521: Disable free lists in subinterpreters (GH-19937)Victor Stinner2020-05-053-80/+162
| | | | | | | | | When Python is built with experimental isolated interpreters, disable tuple, dict and free free lists. Temporary workaround until these caches are made per-interpreter. Add frame_alloc() and frame_get_builtins() subfunctions to simplify _PyFrame_New_NoTrack().
* bpo-40458: Increase reserved stack space to prevent overflow crash on ↵Steve Dower2020-05-053-0/+3
| | | | Windows (GH-19845)
* bpo-40521: Disable Unicode caches in isolated subinterpreters (GH-19933)Victor Stinner2020-05-052-15/+79
| | | | | | | When Python is built in the experimental isolated subinterpreters mode, disable Unicode singletons and Unicode interned strings since they are shared by all interpreters. Temporary workaround until these caches are made per-interpreter.
* Revert "bpo-40513: Per-interpreter signals pending (GH-19924)" (GH-19932)Victor Stinner2020-05-054-32/+42
| | | This reverts commit 4e01946cafca0cf49f796c3118e0d65237bcad69.
* bpo-40520: Remove redundant comment in pydebug.h (GH-19931)Hai Shi2020-05-051-2/+0
| | | Automerge-Triggered-By: @corona10