summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37593: Swap the positions of posonlyargs and args in the constructor of ↵Pablo Galindo2019-07-142-16/+18
| | | | | ast.parameters nodes (GH-14778) https://bugs.python.org/issue37593
* bpo-37473: Don't import importlib ASAP in tests (GH-14661)Victor Stinner2019-07-143-15/+7
| | | | | | | | | bpo-15386, bpo-37473: test_import, regrtest and libregrtest no longer import importlib as soon as possible, as the first import, "to test bpo-15386". It is tested by test_import.test_there_can_be_only_one(). Sort test_import imports.
* Clarify that plistlib's load and dump functions take a binary file object ↵Collin Styles2019-07-141-3/+3
| | | | | | | | | | | (GH-9825) The documentation says that the fp parameter to plistlib.load "should be a readable and binary file object" but the docstring only mentions that it should be readable. Similarly, plistlib.dump's docstring only mentions "writable". This commit clarifies that fp should also be binary. https://docs.python.org/3/library/plistlib.html#plistlib.load https://docs.python.org/3/library/plistlib.html#plistlib.dump
* bpo-37553: SendfileUsingSendTest tests timeout too short for Windows ARM32 ↵Paul Monson2019-07-141-1/+2
| | | | (GH-14716)
* bpo-26967: fix flag grouping with allow_abbrev=False (GH-14316)Zac Hatfield-Dodds2019-07-142-1/+20
| | | | | | | | | | | The `allow_abbrev` option for ArgumentParser is documented and intended to disable support for unique prefixes of --options, which may sometimes be ambiguous due to deferred parsing. However, the initial implementation also broke parsing of grouped short flags, such as `-ab` meaning `-a -b` (or `-a=b`). Checking the argument for a leading `--` before rejecting it fixes this. This was prompted by pytest-dev/pytest#5469, so a backport to at least 3.8 would be great :smile: And this is my first PR to CPython, so please let me know if I've missed anything! https://bugs.python.org/issue26967
* bpo-37579: Improve equality behavior for pure Python datetime and time ↵Xtreak2019-07-132-2/+22
| | | | | | | | | | (GH-14726) Returns NotImplemented for timedelta and time in __eq__ for different types in Python implementation, which matches the C implementation. This also adds tests to enforce that these objects will fall back to the right hand side's __eq__ and/or __ne__ implementation. bpo-37579
* closes bpo-37347: Fix refcount problem in sqlite3. (GH-14268)gescheit2019-07-131-58/+13
|
* bpo-19696: Move threaded_import_hangers (GH-14655)Kyle Stanley2019-07-122-3/+3
| | | | | | | | | Move `threaded_import_hangers`, a dependency of `test_threaded_import`, to the directory `test_importlib/`. Also update the import references for `threaded_import_hangers` in `test_threaded_import`. https://bugs.python.org/issue19696
* closes bpo-37566: Remove _realsocket from socket.py. (GH-14711)Hai Shi2019-07-121-2/+0
|
* bpo-37558: Shared memory tests are failing due to double slashes (GH-14703)Jakub Kulík2019-07-111-1/+1
| | | | | | With the addition of shared memory into Python 3.8, we now have three tests failing on Solaris, namely `test_multiprocessing_fork`, `test_multiprocessing_forkserver` and `test_multiprocessing_spawn`. The reason seems to be incorrect name handling which results in two slashes being prepended. https://bugs.python.org/issue37558
* bpo-36390: simplify classifyws(), rename it and add unit tests (GH-14500)Tal Einat2019-07-112-23/+77
|
* bpo-26806: IDLE should run without docstrings (#14657)Terry Jan Reedy2019-07-092-8/+19
| | | After fcf1d00, IDLE startup failed with python compiled without docstrings.
* bpo-37322: ssl test_pha_required_nocert() ignores expected SSLError (GH-14670)Victor Stinner2019-07-091-15/+18
| | | | | | test_ssl.test_pha_required_nocert() now uses support.catch_threading_exception() to ignore the expected SSLError in ConnectionHandler of ThreadedEchoServer (it is only raised sometimes on Windows).
* bpo-18374: fix tests to check the correct thing about line numbers (GH-14659)Carl Friedrich Bolz-Tereick2019-07-091-4/+4
|
* Revert "bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning ↵Victor Stinner2019-07-091-1/+0
| | | | | (GH-14662)" (GH-14669) This reverts commit cf9c41c422de3774862db964fe3153086bad3f61.
* bpo-37526: Add support.catch_threading_exception() (GH-14664)Victor Stinner2019-07-091-0/+57
| | | | Context manager catching threading.Thread exception using threading.excepthook.
* bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (GH-14662)Victor Stinner2019-07-091-0/+1
| | | | Close the TLS connection in test_pha_required_nocert() of test_ssl to fix a ResourceWarning.
* bpo-18374: fix wrong col_offset of some ast.BinOp instances (GH-14607)Carl Friedrich Bolz-Tereick2019-07-081-0/+30
| | | | | Nested BinOp instances (e.g. a+b+c) had a wrong col_offset for the second BinOp (e.g. 2 instead of 0 in the example). Fix it by using the correct st node to copy the line and col_offset from in ast.c.
* bpo-37421: test_concurrent_futures stops ForkServer (GH-14643)Victor Stinner2019-07-081-0/+3
| | | | test_concurrent_futures now explicitly stops the ForkServer instance if it's running.
* bpo-37520: Correct behavior for zipfile.Path.parent (GH-14638)Jason R. Coombs2019-07-072-1/+12
| | | | | | * bpo-37520: Correct behavior for zipfile.Path.parent * 📜🤖 Added by blurb_it.
* bpo-26806: add 30 to the recursion limit in IDLE's shell (GH-13944)Tal Einat2019-07-064-135/+173
| | | | | | | | This is done to compensate for the extra stack frames added by IDLE itself, which cause problems when setting the recursion limit to low values. This wraps sys.setrecursionlimit() and sys.getrecursionlimit() as invisibly as possible.
* Move test_threaded_import.py to test_importlib/ (GH-14582)Kyle Stanley2019-07-051-0/+0
|
* bpo-37421: multiprocessing tests now stop ForkServer (GH-14601)Victor Stinner2019-07-052-0/+25
| | | | | multiprocessing tests now stop the ForkServer instance if it's running: close the "alive" file descriptor to ask the server to stop and then remove its UNIX address.
* bpo-36974: separate vectorcall functions for each calling convention (GH-13781)Jeroen Demeyer2019-07-052-4/+6
|
* bpo-37481: Deprecate distutils bdist_wininst command (GH-14553)Victor Stinner2019-07-052-3/+12
| | | | The distutils bdist_wininst command is now deprecated, use bdist_wheel (wheel packages) instead.
* bpo-37479: on Enum subclasses with mixins, __format__ uses overridden ↵thatneat2019-07-042-3/+55
| | | | | __str__ (GH-14545) * bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__
* bpo-37421: Fix multiprocessing get_temp_dir() finalizer (GH-14572)Victor Stinner2019-07-041-1/+13
| | | | | | Fix multiprocessing.util.get_temp_dir() finalizer: clear also the 'tempdir' configuration of the current process, so next call to get_temp_dir() will create a new temporary directory, rather than reusing the removed temporary directory.
* bpo-19696: Replace deprecated method in "test_import_pkg.py" (GH-14466)Kyle Stanley2019-07-031-2/+2
| | | | | | | | | Replacing the deprecated method "random.choose" to "random.choice" was technically not part of the original issue. However, it was discussed in the talk page and involved one of the files being moved. I assumed this was too minor to justify the creation of a separate issue. Also, I added my name to the contributors list in Misc/ACKS. This will be my third PR to cpython, forgot to do it in the previous ones. https://bugs.python.org/issue19696
* bpo-37421: Fix test_distutils.test_build_ext() (GH-14564)Victor Stinner2019-07-032-23/+33
| | | | | test_distutils.test_build_ext() is now able to remove the temporary directory on Windows: don't import the newly built C extension ("xx") in the current process, but test it in a separated process.
* bpo-37421: test_concurrent_futures cleans up multiprocessing (GH-14563)Victor Stinner2019-07-031-7/+22
| | | | | | | test_concurrent_futures now cleans up multiprocessing to remove immediately temporary directories created by multiprocessing.util.get_temp_dir(). The test now uses setUpModule() and tearDownModule().
* bpo-37421: test_winconsoleio doesn't leak temp file anymore (GH-14562)Victor Stinner2019-07-031-4/+2
| | | | test_winconsoleio doesn't leak a temporary file anymore: use tempfile.TemporaryFile() to remove it when the test completes.
* bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)Christian Heimes2019-07-022-10/+28
| | | | | | | | | | | | | | | | ssl.match_hostname() no longer accepts IPv4 addresses with additional text after the address and only quad-dotted notation without trailing whitespaces. Some inet_aton() implementations ignore whitespace and all data after whitespace, e.g. '127.0.0.1 whatever'. Short notations like '127.1' for '127.0.0.1' were already filtered out. The bug was initially found by Dominik Czarnota and reported by Paul Kehrer. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37463
* bpo-37421: urllib.request tests call urlcleanup() (GH-14529)Victor Stinner2019-07-028-0/+58
| | | | | | | | urllib.request tests now call urlcleanup() to remove temporary files created by urlretrieve() tests and to clear the _opener global variable set by urlopen() and functions calling indirectly urlopen(). regrtest now checks if urllib.request._url_tempfiles and urllib.request._opener are changed by tests.
* bpo-37421: multiprocessing tests call _run_finalizers() (GH-14527)Victor Stinner2019-07-021-0/+3
| | | | | multiprocessing tests now call explicitly _run_finalizers() to remove immediately temporary directories created by multiprocessing.util.get_temp_dir().
* bpo-37335, test_c_locale_coercion: Remove unnecessary code (GH-14447)Jakub Kulík2019-07-021-19/+5
| | | | | | Python initialization now ensures that sys stream encoding names are always normalized by codecs.lookup(encoding).name. Simplify test_c_locale_coercion: it doesn't have to normalize encoding names anymore.
* bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)Ned Deily2019-07-021-16/+0
| | | | | | | | | | | | | | | | | Under some conditions the earlier fix for bpo-18075, "Infinite recursion tests triggering a segfault on Mac OS X", now causes failures on macOS when attempting to change stack limit with resource.setrlimit resource.RLIMIT_STACK, like regrtest does when running the test suite. The reverted change had specified a non-default stack size when linking the python executable on macOS. As of macOS 10.14.4, the previous code causes a hard failure when running tests, although similar failures had been seen under some conditions under some earlier systems. Reverting the change to the interpreter stack size at link time helped for release builds but caused some tests to fail when built --with-pydebug. Try the opposite approach: continue to build the interpreter with an increased stack size on macOS and remove the failing setrlimit call in regrtest initialization. This will definitely avoid the resource.RLIMIT_STACK error and should have no, or fewer, side effects.
* bpo-37363: Add audit events on startup for the run commands (GH-14524)Steve Dower2019-07-011-4/+36
|
* bpo-36763: Use PyConfig_Clear() (GH-14445)Victor Stinner2019-07-011-3/+12
| | | | | Stop using "static PyConfig", PyConfig must now always use dynamically allocated strings: use PyConfig_SetString(), PyConfig_SetArgv() and PyConfig_Clear().
* bpo-37472: Remove Lib/test/outstanding_bugs.py (GH-14516)Victor Stinner2019-07-011-18/+0
|
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-0153-84/+31
|
* bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504)Victor Stinner2019-07-011-47/+76
| | | | | | | | | | | | | | Fix sys.excepthook() and PyErr_Display() if a filename is a bytes string. For example, for a SyntaxError exception where the filename attribute is a bytes string. Cleanup also test_sys: * Sort imports. * Rename numruns global var to INTERN_NUMRUNS. * Add DisplayHookTest and ExceptHookTest test case classes. * Don't save/restore sys.stdout and sys.displayhook using setUp()/tearDown(): do it in each test method. * Test error case (call hook with no argument) after the success case.
* bpo-10945: Drop support for bdist_wininst on non-Windows systems (GH-14506)Miro Hrončok2019-07-011-0/+3
| | | | | | | | | | | bdist_wininst depends on MBCS codec, unavailable on non-Windows, and bdist_wininst have not worked since at least Python 3.2, possibly never on Python 3. Here we document that bdist_wininst is only supported on Windows, and we mark it unsupported otherwise to skip tests. Distributors of Python 3 can now safely drop the bdist_wininst .exe files without the need to skip bdist_wininst related tests.
* bpo-37440: Enable TLS 1.3 post-handshake auth in http.client (GH-14448)Christian Heimes2019-07-012-0/+25
| | | | | | Post-handshake authentication is required for conditional client cert authentication with TLS 1.3. https://bugs.python.org/issue37440
* bpo-37428: Don't set PHA verify flag on client side (GH-14421)Christian Heimes2019-07-011-0/+31
| | | | | | | | | | | | SSLContext.post_handshake_auth = True no longer sets SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the option is documented as ignored for clients, OpenSSL implicitly enables cert chain validation when the flag is set. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37428
* bpo-37199: Fix test failures when IPv6 is unavailable or disabled (#14480)Zackery Spytz2019-06-304-4/+20
|
* bpo-35621: Support running subprocesses in asyncio when loop is executed in ↵Andrew Svetlov2019-06-304-55/+305
| | | | non-main thread (GH-14344)
* bpo-29505: Add more fuzzing for re.compile, re.load and csv.reader (GH-14255)Ammar Askar2019-06-301-0/+2
| | | Add more fuzz testing for re.compile, re.load and csv.reader
* bpo-30754: Document textwrap.dedent blank line behavior. (GH-14469)tmblweed2019-06-301-3/+3
| | | | * Added documentation for textwrap.dedent behavior. * Remove an obsolete note about pre-2.5 behavior from the docstring.
* bpo-37369: Fix initialization of sys members when launched via an app ↵Steve Dower2019-06-299-133/+183
| | | | | | | container (GH-14428) sys._base_executable is now always defined on all platforms, and can be overridden through configuration. Also adds test.support.PythonSymlink to encapsulate platform-specific logic for symlinking sys.executable
* bpo-19696: Moved "test_pkgimport.py" to dir "test_importlib" (GH-14303)Kyle Stanley2019-06-281-0/+0
| | | | | | | | | Also renamed the file to "test_pkg_import.py" to better follow the naming convention. Component of issue 19696. https://bugs.python.org/issue19696