summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-25711: Rewrite zipimport in pure Python. (GH-6809)Serhiy Storchaka2018-09-184-20/+25
|
* bpo-34582: Adds JUnit XML output for regression tests (GH-9210)Steve Dower2018-09-188-30/+298
|
* bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant ↵Serhiy Storchaka2018-09-184-16/+75
| | | | | | | | | | to invalid paths. (#7695) Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(), os.path.isfile(), os.path.islink(), and os.path.ismount() now return False instead of raising ValueError or its subclasses UnicodeEncodeError and UnicodeDecodeError for paths that contain characters or bytes unrepresentative at the OS level.
* bpo-32455: Add jump parameter to dis.stack_effect(). (GH-6610)Serhiy Storchaka2018-09-181-14/+47
| | | | Add C API function PyCompile_OpcodeStackEffectWithJump().
* bpo-34589: Add -X coerce_c_locale command line option (GH-9378)Victor Stinner2018-09-184-16/+57
| | | | Add a new -X coerce_c_locale command line option to control C locale coercion (PEP 538).
* bpo-34589: C locale coercion off by default (GH-9073)Victor Stinner2018-09-171-4/+0
| | | | | | | | | Py_Initialize() and Py_Main() cannot enable the C locale coercion (PEP 538) anymore: it is always disabled. It can now only be enabled by the Python program ("python3). test_embed: get_filesystem_encoding() doesn't have to set PYTHONUTF8 nor PYTHONCOERCECLOCALE, these variables are already set in the parent.
* bpo-34589: Make _PyCoreConfig.coerce_c_locale private (GH-9371)Victor Stinner2018-09-171-2/+2
| | | | | | | | _PyCoreConfig: * Rename coerce_c_locale to _coerce_c_locale * Rename coerce_c_locale_warn to _coerce_c_locale_warn These fields are now private (name prefixed by "_").
* bpo-34587, test_socket: remove RDSTest.testCongestion() (GH-9277)Victor Stinner2018-09-171-27/+0
| | | | | | | | | The test tries to fill the receiver's socket buffer and expects an error. But the RDS protocol doesn't require that. Moreover, the Linux implementation of RDS expects that the producer of the messages reduces its rate, it's not the role of the receiver to trigger an error. The test fails on Fedora 28 by design, so remove it.
* bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683)Serhiy Storchaka2018-09-171-0/+14
|
* bpo-12458: Fix line numbers for multiline expressions. (GH-8774)Serhiy Storchaka2018-09-175-7/+11
|
* bpo-34610: Fixed iterator of multiprocessing.managers.DictProxy. (GH-9113)Serhiy Storchaka2018-09-171-0/+23
|
* bpo-34579: Fix test_embed DEFAULT_CON AIX (GH-9063)Michael Felt2018-09-151-3/+7
| | | | | | | | | | | | | | | | * Modify DEFAULT_CONFIG for AIX * bedevere/news did not like old name * Modify NEWS entry * Modified per peer review * Define and use NULL_STR constant to account for AIX libc behavior * Modify per peer review * Modify NEWS
* bpo-34685: Skip posix_spawn scheduler tests on BSD (GH-9316)Pablo Galindo2018-09-141-6/+10
| | | * Skip posix_spawn scheduler tests on BSD. We were already skyping similar tests as the behaviour can depend on the implementation in some cases.
* bpo-34651: Only allow the main interpreter to fork. (gh-9279)Eric Snow2018-09-141-14/+3
| | | | | When os.fork() is called (on platforms that support it) all threads but the current one are destroyed in the child process. Consequently we must ensure that all but the associated interpreter are likewise destroyed. The main interpreter is critical for runtime operation, so we must ensure that fork only happens in the main interpreter. https://bugs.python.org/issue34651
* bpo-34363: dataclasses.asdict() and .astuple() now handle fields which are ↵Eric V. Smith2018-09-141-0/+79
| | | | namedtuples. (GH-9151)
* bpo-33073: Adding as_integer_ratio to ints. (GH-8750)Lisa Roach2018-09-142-1/+34
|
* bpo-6721: Hold logging locks across fork() (GH-4071)Gregory P. Smith2018-09-141-0/+67
| | | | | | | | | bpo-6721: When os.fork() was called while another thread holds a logging lock, the child process may deadlock when it tries to log. This fixes that by acquiring all logging locks before fork and releasing them afterwards. A regression test that fails before this change is included. Within the new unittest itself: There is a small _potential_ due to mixing of fork and a thread in the child process if the parent's thread happened to hold a non-reentrant library call lock (malloc?) when the os.fork() happens. buildbots and time will tell if this actually manifests itself in this test or not. :/ A functionality test that avoids that would be a challenge. An alternate test that isn't trying to produce the deadlock itself but just checking that the release and acquire calls are made would be the next best alternative if so.
* bpo-34666: Implement stream.awrite() and stream.aclose() (GH-9274)Andrew Svetlov2018-09-131-0/+22
|
* Fix test_asyncio for AIX - do not call transport.get_extra_info('sockname') ↵Michael Felt2018-09-131-4/+6
| | | | (#8907)
* bpo-31132: Remove prlimit permission test. (GH-9280)Benjamin Peterson2018-09-131-3/+0
| | | | | | | | | This test is doesn't work when the test process is privledged, which is hard to detect. https://bugs.python.org/issue34668
* closes bpo-34664: Only check file permission bits of newly created ↵Benjamin Peterson2018-09-131-2/+2
| | | | directories. (GH-9273)
* bpo-34661: Fix test skipping call. (GH-9266)Benjamin Peterson2018-09-131-1/+1
|
* closes bpo-34661: Fix test_shutil if unzip doesn't support -t. (GH-9262)Benjamin Peterson2018-09-131-0/+2
|
* bpo-34200: Fix non-determinism of test_pkg (GH-9248)Gregory P. Smith2018-09-131-8/+9
| | | | | | This causes the tearDown code to only unimport the test modules specifically created as part of each test via the self.mkhier method rather than abusing test.support.modules_setup() and the scary test.support.modules_cleanup() code. https://bugs.python.org/issue34200
* closes bpo-34641: Further restrict the LHS of keyword argument function call ↵Benjamin Peterson2018-09-131-0/+3
| | | | syntax. (GH-9212)
* closes bpo-34654: Tolerate + at the beginning of large years. (GH-9238)Benjamin Peterson2018-09-121-3/+3
|
* closes bpo-34650: Check if sched_getscheduler returns ENOSYS before ↵Benjamin Peterson2018-09-121-3/+15
| | | | | declaring it supported. (GH-9228) musl doesn't support the scheduler API, but declares stubs that alway return ENOSYS.
* closes bpo-34004: Skip lock interruption tests on musl. (GH-9224)Benjamin Peterson2018-09-121-0/+8
| | | | | | | | | | | Returning EINTR from pthread semaphore or lock acquisition is an optional POSIX feature. musl does not provide this feature, so some threadsignal tests fail when Python is built against it. There's no good way to test for musl, so we skip if we're on Linux and not using glibc pthreads. Also, hedge in the threading documentation about when we can provide interrupts from lock acquisition.
* bpo-31577: Fix a crash in os.utime() in case of a bad ns argument. (GH-3752)Oren Milman2018-09-121-0/+16
|
* bpo-34536: raise error for invalid _missing_ results (GH-9147)Ethan Furman2018-09-121-0/+33
| | | * raise exception if _missing_ returns None or invalid type
* bpo-34638: Store a weak reference to stream reader to break strong ↵Andrew Svetlov2018-09-121-0/+71
| | | | | | | | references loop (GH-9201) Store a weak reference to stream readerfor breaking strong references It breaks the strong reference loop between reader and protocol and allows to detect and close the socket if the stream is deleted (garbage collected)
* bpo-34637: Make the *start* argument for *sum()* visible as a keyword ↵Raymond Hettinger2018-09-121-0/+3
| | | | argument. (GH-9208)
* bpo-34282: Fix Enum._convert shadowing members named _convert (GH-8568)orlnub1232018-09-121-2/+38
| | | | | * Fix enum members getting shadowed by parent attributes * Move Enum._convert to EnumMeta._convert_ * Deprecate _convert
* closes bpo-34640: Remove the TANH_PRESERVES_ZERO_SIGN configure check. (GH-9206)Benjamin Peterson2018-09-122-4/+0
|
* Revert "bpo-34595: Add %T format to PyUnicode_FromFormatV() (GH-9080)" (GH-9187)Victor Stinner2018-09-111-4/+0
| | | This reverts commit 886483e2b9bbabf60ab769683269b873381dd5ee.
* closes bpo-31902: Fix the col_offset attribute for ast.Async* nodes to point ↵guoci2018-09-111-4/+4
| | | | | | to the "async" keyword. (GH-4175) Previously, col_offset points to the keyword after "async".
* closes bpo-31608: Fix a crash in methods of a subclass of _collections.deque ↵Oren Milman2018-09-111-0/+15
| | | | with a bad __new__(). (GH-3788)
* bpo-34622: Extract asyncio exceptions into a separate module (GH-9141)Andrew Svetlov2018-09-114-12/+12
|
* closes bpo-32490: Fix filename duplication in subprocess exception message. ↵Zackery Spytz2018-09-111-1/+3
| | | | | (GH-9163) 8621bb5d93239316f97281826461b85072ff6db7 sets the filename in directly in the FileNotFoundError, so we may revert the earlier fix 5f780400572508a8179de6a6c13b58b7be417ef5.
* Lib/test/support: fix typo in docstring (GH-8506)Daniel Hahler2018-09-111-2/+2
|
* bpo-32270: Don't close stdin/out/err in pass_fds (GH-6242)Gregory P. Smith2018-09-111-0/+30
| | | | | | | | | | | | | | When subprocess.Popen() stdin= stdout= or stderr= handles are specified and appear in pass_fds=, don't close the original fds after dup'ing them. This implementation and unittest primarily came from @izbyshev (see the PR) See also https://github.com/izbyshev/cpython/commit/b89b52f28490b69142d5c061604b3a3989cec66c This also removes the old manual p2cread, c2pwrite, and errwrite closing logic as inheritable flags and _close_open_fds takes care of that properly today without special treatment. This code is within child_exec() where it is the only thread so there is no race condition between the dup and _Py_set_inheritable_async_safe call.
* bpo-33217: Raise TypeError for non-Enum lookups in Enums (GH-6651)Rahul Jha2018-09-101-3/+52
| | | * bpo-33217: Raise TypeError for non-Enum lookups in Enums
* bpo-33604: Remove deprecated HMAC default value marked for removal in 3.8 ↵Matthias Bussonnier2018-09-101-21/+7
| | | | | (GH-7063) HMAC's digestmod was deprecated marked for removal, this removes it as planned.
* bpo-26502: Implement FrameSummary.__len__() (GH-8632)Berker Peksag2018-09-101-0/+5
|
* bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)Benjamin Peterson2018-09-101-2/+59
| | | | | | | | The recursive frame pruning code always undercounted the number of elided frames by one. That is, in the "[Previous line repeated N more times]" message, N would always be one too few. Near the recursive pruning cutoff, one frame could be silently dropped. That situation is demonstrated in the OP of the bug report. The fix is to start the identical frame counter at 1.
* bpo-30977: rework code changes according to post-merge code review (GH-9106)Tal Einat2018-09-101-51/+129
| | | | also mention the change and its consequences in What's New
* Test dict values iterator pickling with pickle.HIGHEST_PROTOCOL. (GH-9052)Sergey Fedoseev2018-09-101-1/+1
|
* bpo-20104: Change the file_actions parameter of os.posix_spawn(). (GH-6725)Serhiy Storchaka2018-09-081-29/+28
| | | | | * Make its default value an empty tuple instead of None. * Make it a keyword-only parameter.
* bpo-34246: Make sure test_smtplib always cleans resources when finished ↵Pablo Galindo2018-09-071-7/+47
| | | | | | | | (GH-9108) * Make sure that when some of the tests in test_smtplib fail, the allocated threads and sockets are not leaked. * Use support.join_thread() instead of thread.join() to avoid infinite blocks.
* bpo-34246: Use no mutable default args in smtplib (GH-8554)Pablo Aguiar2018-09-071-0/+28
| | | | | Some methods of the SMTP class use mutable default arguments. Specially `send_message` is affected as it mutates one of the args by appending items to it, which has side effects on further calls.