summaryrefslogtreecommitdiff
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* 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-071-1/+2
|
* bpo-40903: Handle multiple '=' in invalid assignment rules in the PEG parser ↵Pablo Galindo2020-06-071-1/+20
| | | | | (GH-20697) Automerge-Triggered-By: @pablogsal
* bpo-39791 native hooks for importlib.resources.files (GH-20576)Jason R. Coombs2020-06-076-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-06-014-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.
* bpo-29882: Add an efficient popcount method for integers (#771)Niklas Fiekas2020-05-292-1/+13
| | | | | | | | | | | | | | | | | | | | | | | * bpo-29882: Add an efficient popcount method for integers * Update 'sign bit' and versionadded in docs * Add entry to whatsnew document * Doc: use positive example, mention population count * Minor cleanups of the core code * Move popcount_digit closer to where it's used * Use z instead of self after conversion * Add 'absolute value' and 'population count' to docstring * Fix clinic error about missing summary line * Ensure popcount_digit is portable with 64-bit ints Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
* Further de-linting of zoneinfo module (#20499)Paul Ganssle2020-05-294-12/+5
| | | | | | | * Remove unused imports in zoneinfo * Remove unused variables in zoneinfo * Remove else after raise
* bpo-40780: Fix failure of _Py_dg_dtoa to remove trailing zeros (GH-20435)Mark Dickinson2020-05-291-0/+11
| | | | | | | | | | | * Fix failure of _Py_dg_dtoa to remove trailing zeros * Add regression test and news entry * Add explanation about why it's safe to strip trailing zeros * Make code safer, clean up comments, add change note at top of file * Nitpick: avoid implicit int-to-float conversion in tests
* bpo-39040: Fix parsing of email mime headers with whitespace between ↵Abhilash Raj2020-05-282-0/+28
| | | | | | | | | | | | | | | encoded-words. (gh-17620) * bpo-39040: Fix parsing of email headers with encoded-words inside a quoted string. It is fairly common to find malformed mime headers (especially content-disposition headers) where the parameter values, instead of being encoded to RFC standards, are "encoded" by doing RFC 2047 "encoded word" encoding, and then enclosing the whole thing in quotes. The processing of these malformed headers was incorrectly leaving the spaces between encoded words in the decoded text (whitespace between adjacent encoded words is supposed to be stripped on decoding). This changeset fixes the encoded word processing inside quoted strings (bare-quoted-string) to do correct RFC 2047 decoding by stripping that whitespace.
* bpo-40784: Fix sqlite3 deterministic test (GH-20448)Erlend Egeberg Aasland2020-05-291-9/+27
|
* bpo-30064: Properly skip unstable loop.sock_connect() racing test (GH-20494)Fantix King2020-05-281-20/+26
|
* bpo-40755: Add missing multiset operations to Counter() (GH-20339)Raymond Hettinger2020-05-282-6/+163
|
* bpo-40275: Fix test.support.threading_helper (GH-20488)Victor Stinner2020-05-281-6/+7
| | | | | | | * Add missing sys import * Get verbose and gc_collect() from test.support * Remove unused starttime variable. Issues spotted by pyflakes.
* bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482)Hai Shi2020-05-283-9/+10
| | | Replace test.support.TESTFN_ENCODING with sys.getfilesystemencoding().
* bpo-30064: Fix unstable asyncio "racing" socket tests (GH-20485)Victor Stinner2020-05-281-0/+4
| | | | | Skip new "racing" socket tests which fail randomly until someone fix them, to ease analysis of buildbot failures (skip tests which are known to be broken/unstable).
* Revert "Upgrade bundled versions of pip & setuptools (#16782)" (GH-20484)Victor Stinner2020-05-284-6/+6
| | | This reverts commit feb0846c3a28b05b4cfbc6ab34c764957f3eff55.
* bpo-40792: Make the result of PyNumber_Index() always having exact type int. ↵Serhiy Storchaka2020-05-284-15/+11
| | | | | | | | | | | | (GH-20443) Previously, the result could have been an instance of a subclass of int. Also revert bpo-26202 and make attributes start, stop and step of the range object having exact type int. Add private function _PyNumber_Index() which preserves the old behavior of PyNumber_Index() for performance to use it in the conversion functions like PyLong_AsLong().
* bpo-40275: test.support imports subprocess lazily (GH-20471)Victor Stinner2020-05-281-3/+11
| | | | | | | | | | | test.support module now imports the platform and subprocess modules lazily to reduce the number of modules imported by "import test.support". With this change, the threading module is no longer imported indirectly by "import test.support". Use sys.version rather than platform.machine() to detect the Windows ARM32 buildbot.
* bpo-40275: test.support.check_impl_detail() uses sys.implementation (GH-20468)Victor Stinner2020-05-281-1/+1
| | | | | check_impl_detail() of test.support now uses sys.implementation.name, instead of platform.python_implementation().lower(). This change prepares test.support to import the platform module lazily.
* bpo-40795: ctypes calls unraisablehook with an exception (GH-20452)Victor Stinner2020-05-283-27/+44
| | | | | | If ctypes fails to convert the result of a callback or if a ctypes callback function raises an exception, sys.unraisablehook is now called with an exception set. Previously, the error was logged into stderr by PyErr_Print().
* bpo-40275: Adding threading_helper submodule in test.support (GH-20263)Hai Shi2020-05-2845-361/+405
|
* Revert "bpo-32604: PEP 554 for use in test suite (GH-19985)" (#20465)Pablo Galindo2020-05-273-863/+0
| | | This reverts commit 9d17cbf33df7cfb67ca0f37f6463ba5c18676641.
* bpo-40614: Respect feature version for f-string debug expressions (GH-20196)Shantanu2020-05-271-0/+5
| | | | Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* bpo-40791: Use CRYPTO_memcmp() for compare_digest (#20456)Christian Heimes2020-05-272-36/+55
| | | | | | | | hashlib.compare_digest uses OpenSSL's CRYPTO_memcmp() function when OpenSSL is available. Note: The _operator module is a builtin module. I don't want to add libcrypto dependency to libpython. Therefore I duplicated the wrapper function and added a copy to _hashopenssl.c.
* bpo-30064: Fix asyncio loop.sock_* race condition issue (#20369)Fantix King2020-05-272-16/+156
|