summaryrefslogtreecommitdiff
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* 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-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)
* 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-051-0/+8
| | | | argparse.BooleanOptionalAction (GH-20623)
* bpo-39791: Refresh importlib.metadata from importlib_metadata 1.6.1. (GH-20659)Jason R. Coombs2020-06-053-10/+47
| | | | | | | * 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-40807: Show warnings once from codeop._maybe_compile (#20486)Cheryl Sabella2020-06-041-0/+5
| | | | | | | | | * 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>
* 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-021-0/+24
| | | | | | | | 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-021-0/+14
|
* 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-012-270/+245
| | | | | | 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-40755: Add rich comparisons to Counter (GH-20548)Raymond Hettinger2020-05-311-66/+26
|
* 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-291-9/+2
| | | | | | | * 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-281-0/+19
| | | | | | | | | | | | | | | 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-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-281-0/+59
|
* 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).
* bpo-40792: Make the result of PyNumber_Index() always having exact type int. ↵Serhiy Storchaka2020-05-283-15/+10
| | | | | | | | | | | | (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-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-271-35/+53
| | | | | | | | 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-271-0/+131
|
* Fix lookahead of soft keywords in the PEG parser (GH-20436)Pablo Galindo2020-05-261-0/+12
| | | Automerge-Triggered-By: @gvanrossum
* Add soft keywords (GH-20370)Guido van Rossum2020-05-261-0/+30
| | | | | | | These are like keywords but they only work in context; they are not reserved except when there is an exact match. This would enable things like match statements without reserving `match` (which would be bad for the `re.match()` function and probably lots of other places). Automerge-Triggered-By: @gvanrossum
* bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)Serhiy Storchaka2020-05-267-167/+49
| | | | Only __index__ should be used to make integer conversions lossless.
* bpo-39244: multiprocessing return default start method first on macOS (GH-18625)idomic2020-05-261-1/+3
|
* bpo-40637: Fix test_pbkdf2_hmac_py for missing sha1 (#20422)Christian Heimes2020-05-261-9/+23
|
* Remove duplicated words words (GH-20413)Serhiy Storchaka2020-05-261-1/+1
|
* bpo-38964: Print correct filename on a SyntaxError in an fstring (GH-20399)Lysandros Nikolaou2020-05-261-0/+13
| | | | | | | | When a `SyntaxError` in the expression part of a fstring is found, the filename attribute of the `SyntaxError` is always `<fstring>`. With this commit, it gets changed to always have the name of the file the fstring resides in. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-35714: Reject null characters in struct format strings (GH-16928)Zackery Spytz2020-05-251-0/+8
| | | | struct.error is now raised if there is a null character in a struct format string.
* bpo-36290: Fix keytword collision handling in AST node constructors (GH-12382)Rémi Lapeyre2020-05-241-0/+9
|
* bpo-40679: Use the function's qualname in certain TypeErrors (GH-20236)Dennis Sweeney2020-05-222-1/+50
| | | | Patch by Dennis Sweeney.
* bpo-40696: Fix a hang that can arise after gen.throw() (GH-20287)Chris Jerdonek2020-05-222-3/+62
| | | | | | | | This updates _PyErr_ChainStackItem() to use _PyErr_SetObject() instead of _PyErr_ChainExceptions(). This prevents a hang in certain circumstances because _PyErr_SetObject() performs checks to prevent cycles in the exception context chain while _PyErr_ChainExceptions() doesn't.
* bpo-9216: hashlib usedforsecurity fixes (GH-20258)Christian Heimes2020-05-224-33/+86
| | | | | | | | | func:`hashlib.new` passed ``usedforsecurity`` to OpenSSL EVP constructor ``_hashlib.new()``. test_hashlib and test_smtplib handle strict security policy better. Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran
* bpo-40630: Add tracemalloc.reset_peak (GH-20102)Huon Wilson2020-05-221-0/+24
| | | | | | | The reset_peak function sets the peak memory size to the current size, representing a resetting of that metric. This allows for recording the peak of specific sections of code, ignoring other code that may have had a higher peak (since the most recent `tracemalloc.start()` or tracemalloc.clear_traces()` call).
* bpo-40334: Produce better error messages for non-parenthesized genexps ↵Lysandros Nikolaou2020-05-221-5/+3
| | | | | | (GH-20153) The error message, generated for a non-parenthesized generator expression in function calls, was still the generic `invalid syntax`, when the generator expression wasn't appearing as the first argument in the call. With this patch, even on input like `f(a, b, c for c in d, e)`, the correct error message gets produced.