summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-40626: Support HDF5 in mimetypes (GH-20042)MARK SCHWAB2020-06-111-0/+1
| | | | | | | Add hdf5 with .h5 file extension See 'Recommendations' section for mime types from the HDF group: https://www.hdfgroup.org/2018/06/citations-for-hdf-data-and-software/ Patch by Mark Schwab.
* bpo-29620: iterate over a copy of sys.modules (GH-4800)kernc2020-06-112-1/+16
| | | | | | | unittest.TestCase.assertWarns no longer raises a RuntimeException when accessing a module's ``__warningregistry__`` causes importation of a new module, or when a new module is imported in another thread. Patch by Kernc.
* bpo-40939: Remove the old parser (GH-20768)Pablo Galindo2020-06-1112-1941/+56
| | | This commit removes the old parser, the deprecated parser module, the old parser compatibility flags and environment variables and all associated support code and documentation.
* bpo-40275: Move TransientResource to test_urllib2net (GH-20812)Victor Stinner2020-06-113-39/+37
| | | | | | Move TransientResource, time_out, socket_peer_reset and ioerror_peer_reset from test.support to test_urllib2net. Remove "import errno" from test.support.
* bpo-40939: Remove PEG parser easter egg (__new_parser__) (#20802)Lysandros Nikolaou2020-06-112-2/+0
| | | It no longer serves a purpose (there's only one parser) and having "new" in any name will eventually look odd. Also, it impinges on a potential sub-namespace, `__new_...__`.
* bpo-40275: Add warnings_helper submodule in test.support (GH-20797)Hai Shi2020-06-112-174/+186
|
* bpo-40275: test.supports imports lazily fnmatch, glob, struct (GH-20810)Victor Stinner2020-06-111-3/+4
|
* bpo-40947: getpath.c uses PyConfig.platlibdir (GH-20807)Victor Stinner2020-06-111-0/+1
| | | | | | | | | | | Followup of bpo-40854, there is one remaining usage of PLATLIBDIR which should be replaced by config->platlibdir. test_sys checks that sys.platlibdir attribute exists and is a string. Update Makefile: getpath.c and sysmodule.c no longer need PLATLIBDIR macro, PyConfig.platlibdir member is used instead. Co-authored-by: Sandro Mani <manisandro@gmail.com>
* bpo-34401: Fix test_gdb for HP GDB version string (GH-20804)Victor Stinner2020-06-111-1/+2
| | | | | | | | The GDB provided by HPE on HP-UX contains a modified version string. Therefore the tests fail. Adapt the regex to match that string. Patch by Michael Osipov. Co-Authored-by: Michael Osipov <michael.osipov@siemens.com>
* bpo-40939: Generate keyword.py using the new parser (GH-20800)Lysandros Nikolaou2020-06-112-4/+7
|
* Collections module reformatting and minor code refactoring (GH-20772)Raymond Hettinger2020-06-111-91/+271
|
* bpo-40847: Consider a line with only a LINECONT a blank line (GH-20769)Lysandros Nikolaou2020-06-102-0/+21
| | | | | | | | | | A line with only a line continuation character should be considered a blank line at tokenizer level so that only a single NEWLINE token gets emitted. The old parser was working around the issue, but the new parser threw a `SyntaxError` for valid input. For example, an empty line following a line continuation character was interpreted as a `SyntaxError`. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-40275: Add import_helper submodule in test.support (GH-20794)Hai Shi2020-06-102-227/+243
|
* bpo-40927: Fix test_binhex when run twice (GH-20764)Victor Stinner2020-06-101-1/+1
| | | | test_binhex now uses import_fresh_module() to ensure that it raises DeprecationWarning each time.
* bpo-40826: Fix test_repl.test_close_stdin() on Windows (GH-20779)Victor Stinner2020-06-104-48/+42
| | | | | | | | | | | | test_repl.test_close_stdin() now calls support.suppress_msvcrt_asserts() to fix the test on Windows. * Move suppress_msvcrt_asserts() from test.libregrtest.setup to test.support. Make its verbose parameter optional: verbose=False by default. * Add msvcrt.GetErrorMode(). * SuppressCrashReport now uses GetErrorMode() and SetErrorMode() of the msvcrt module, rather than using ctypes. * Remove also an unused variable (deadline) in wait_process().
* bpo-36543: Revert "bpo-36543: Remove the xml.etree.cElementTree module." ↵Serhiy Storchaka2020-06-102-0/+18
| | | | | | | (GH-20117) * Revert "bpo-36543: Remove the xml.etree.cElementTree module. (GH-19108)" This reverts commit b33e52511a59c6da7132c226b7f7489b092a33eb.
* Raise specialised syntax error for invalid lambda parameters (GH-20776)Pablo Galindo2020-06-101-18/+12
|
* bpo-40275: Add os_helper submodule in test.support (GH-20765)Hai Shi2020-06-102-586/+629
|
* bpo-40889: Optimize dict.items() ^ dict.items() (GH-20718)Dennis Sweeney2020-06-101-0/+10
|
* bpo-32604: Recommit "bpo-32604: PEP 554 for use in test suite (GH-19985)" ↵Joannah Nanjekye2020-06-102-0/+718
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-20611) * PEP 554 for use in test suite * 📜🤖 Added by blurb_it. * Fix space * Add doc to doc tree * Move to modules doc tree * Fix suspicious doc errors * Fix test__all * Docs docs docs * Support isolated and fix wait * Fix white space * Remove undefined from __all__ * Fix recv and add exceptions * Remove unused exceptions, fix pep 8 formatting errors and fix _NOT_SET in recv_nowait() * Update Lib/test/support/interpreters.py Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> * Remove documentation (module is for internal use) Co-authored-by: nanjekyejoannah <joannah.nanjekye@ibm.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* Minor improvement to the namedtuple implementation (GH-20741)Raymond Hettinger2020-06-081-1/+4
| | | | | * Cleaner way to build the arg list with a trailing comma when required * Fix appearance of __new__ in help()
* bpo-40910: Export Py_GetArgcArgv() function (GH-20721)Victor Stinner2020-06-081-3/+31
| | | | | | | | | | | | Export explicitly the Py_GetArgcArgv() function to the C API and document the function. Previously, it was exported implicitly which no longer works since Python is built with -fvisibility=hidden. * Add PyConfig._orig_argv member. * Py_InitializeFromConfig() no longer calls _PyConfig_Write() twice. * PyConfig_Read() no longer initializes Py_GetArgcArgv(): it is now _PyConfig_Write() responsibility. * _PyConfig_Write() result type becomes PyStatus instead of void. * Write an unit test on Py_GetArgcArgv().
* bpo-40854: Allow overriding sys.platlibdir via PYTHONPLATLIBDIR env-var ↵Sandro Mani2020-06-081-7/+15
| | | | (GH-20605)
* Deny eval() direct access to builtins (GH-20713)Raymond Hettinger2020-06-081-1/+2
|
* bpo-40903: Handle multiple '=' in invalid assignment rules in the PEG parser ↵Pablo Galindo2020-06-081-1/+20
| | | | | (GH-20697) Automerge-Triggered-By: @pablogsal
* bpo-39791 native hooks for importlib.resources.files (GH-20576)Jason R. Coombs2020-06-086-191/+112
| | | | | | | | | | | | | | | | | | | | | | | | | * Provide native .files support on SourceFileLoader. * Add native importlib.resources.files() support to zipimporter. Remove fallback support. * make regen-all * 📜🤖 Added by blurb_it. * Move 'files' into the ResourceReader so it can carry the relevant module name context. * Create 'importlib.readers' module and add FileReader to it. * Add zip reader and rely on it for a TraversableResources object on zipimporter. * Remove TraversableAdapter, no longer needed. * Update blurb. * Replace backslashes with forward slashes. * Incorporate changes from importlib_metadata 2.0, finalizing the interface for extension via get_resource_reader. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* bpo-40904: Fix segfault in the new parser with f-string containing yield ↵Pablo Galindo2020-06-081-0/+2
| | | | statements with no value (GH-20701)
* bpo-39791: Support file systems that cannot support non-ascii filenames ↵Jason R. Coombs2020-06-072-2/+18
| | | | (skipping tests in that case). (#20681)
* Update comments to reflect the current API (GH-20682)Raymond Hettinger2020-06-061-4/+6
|
* bpo-40724: Support setting buffer slots from type specs (GH-20648)scoder2020-06-061-0/+5
| | | This is not part of the limited API but makes the buffer slots available for type specs.
* bpo-40870: Invalidate usage of some constants with ast.Name (GH-20649)Batuhan Taskaya2020-06-061-0/+7
|
* bpo-40862: Raise TypeError when const is given to ↵Rémi Lapeyre2020-06-052-1/+8
| | | | argparse.BooleanOptionalAction (GH-20623)
* bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659)Jason R. Coombs2020-06-054-15/+72
| | | | | | | * Refresh importlib.metadata from importlib_metadata 1.6.1. * 📜🤖 Added by blurb_it. Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* Fix missing FloatOperation in EXTRA_FUNCTIONALITY path. (#20655)Stefan Krah2020-06-051-0/+2
|
* bpo-19468: delete unnecessary instance check in importlib.reload() (GH-19424)Furkan Önder2020-06-051-4/+4
| | | Automerge-Triggered-By: @brettcannon
* bpo-40807: Show warnings once from codeop._maybe_compile (#20486)Cheryl Sabella2020-06-042-9/+18
| | | | | | | | | * bpo-40807: Show warnings once from codeop._maybe_compile * Move catch_warnings * news Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-17258: Add requires_hashdigest to multiprocessing tests (GH-20412)Christian Heimes2020-06-042-0/+12
| | | | | Skip some :mod:`multiprocessing` tests when MD5 hash digest is blocked. Signed-off-by: Christian Heimes <christian@python.org>
* Update error message in _zoneinfo.py to use f-string (GH-20577)aboddie2020-06-031-1/+1
| | | Inline with the rest of the file, updated error message to use f-string.
* bpo-40767: Allow pure Wayland to get default XDG web browser (GH-20382)Jeremy Attali2020-06-031-1/+1
| | | | | | | Would be nice to backport to python 3.7+. I don't think it's worth the hassle to backport this all the way down to 3.10. But I'll let the maintainers decide. This is hard to test because the test setup already includes this [environment variable](https://github.com/python/cpython/blob/master/Lib/test/pythoninfo.py#L292) Let me know if something doesn't match the PR guidelines. This is my first PR in the python source code.
* bpo-40826: Add _PyOS_InterruptOccurred(tstate) function (GH-20599)Victor Stinner2020-06-031-6/+16
| | | | | | | | | | | | my_fgets() now calls _PyOS_InterruptOccurred(tstate) to check for pending signals, rather calling PyOS_InterruptOccurred(). my_fgets() is called with the GIL released, whereas PyOS_InterruptOccurred() must be called with the GIL held. test_repl: use text=True and avoid SuppressCrashReport in test_multiline_string_parsing(). Fix my_fgets() on Windows: fgets(fp) does crash if fileno(fp) is closed.
* bpo-35078: Allow customization of CSS class name of a month in calendar ↵Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)2020-06-022-17/+28
| | | | | | | | module (gh-10137) Refactor formatweekday(), formatmonthname() methods in LocaleHTMLCalendar and LocaleTextCalendar classes in calendar module to call the base class methods. This enables customizable CSS classes for LocaleHTMLCalendar and LocaleTextCalendar. Patch by Srinivas Reddy Thatiparthy
* bpo-26543: Fix IMAP4.noop when debug mode is enabled (GH-15206)Sanyam Khurana2020-06-022-7/+20
|
* bpo-39593: Add test on ctypes cfield.c s_set() (GH-18424)Hai Shi2020-06-011-0/+8
|
* bpo-40826: Add _Py_EnsureTstateNotNULL() macro (GH-20571)Victor Stinner2020-06-011-1/+4
| | | | Add _Py_EnsureTstateNotNULL(tstate) macro: call Py_FatalError() if tstate is NULL, the error message contains the current function name.
* Make sure that keyword arguments are merged into the arguments dictionary ↵Mark Shannon2020-06-011-0/+18
| | | | when dict unpacking and keyword arguments are interleaved. (GH-20553)
* bpo-17005: Move topological sort functionality to its own module (GH-20558)Pablo Galindo2020-05-314-515/+490
| | | | | | The topological sort functionality that was introduced initially in the functools module has been moved to a new graphlib module to better accommodate the new tools and keep the original scope of the functools module.
* bpo-40759: Deprecate the symbol module (GH-20364)Batuhan Taskaya2020-05-311-0/+9
| | | Automerge-Triggered-By: @pablogsal
* bpo-40755: Add rich comparisons to Counter (GH-20548)Raymond Hettinger2020-05-312-152/+62
|
* Fix asyncio.to_thread() documented return type (GH-20547)Kyle Stanley2020-05-311-1/+1
| | | | | When I wrote the documentation for `asyncio.to_thread()`, I mistakenly assumed that `return await loop.run_in_executor(...)` within an async def function would return a Future. In reality, it returns a coroutine. This likely won't affect typical usage of `asyncio.to_thread()`, but it's important for the documentation to be correct here. In general, we also tend to avoid returning futures from high-level APIs in asyncio.
* bpo-39885: Make IDLE context menu cut and copy work again (GH-18951)Terry Jan Reedy2020-05-293-16/+50
| | | | Leave selection when right click within. This exception to clearing selections when right-clicking was omitted from the previous commit, 4ca060d. I did not realize that this completely disabled the context menu entries, and I should have merged a minimal fix immediately. An automated test should follow.