summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-38863: Improve is_cgi() in http.server (GH-17312)Siwon Kang2019-11-221-0/+24
| | | | | | | | | | | | | | | | | | | is_cgi() function of http.server library does not currently handle a cgi script if one of the cgi_directories is located at the sub-directory of given path. Since is_cgi() in CGIHTTPRequestHandler class separates given path into (dir, rest) based on the first seen '/', multi-level directories like /sub/dir/cgi-bin/hello.py is divided into head=/sub, rest=dir/cgi-bin/hello.py then check whether '/sub' exists in cgi_directories = [..., '/sub/dir/cgi-bin']. This patch makes the is_cgi() keep expanding dir part to the next '/' then checking if that expanded path exists in the cgi_directories. Signed-off-by: Siwon Kang <kkangshawn@gmail.com> https://bugs.python.org/issue38863
* bpo-37838: get_type_hints for wrapped functions with forward reference ↵benedwards142019-11-212-0/+22
| | | | | | (GH-17126) https://bugs.python.org/issue37838
* bpo-38692: Skip test_posix.test_pidfd_open() on EPERM (GH-17290)Victor Stinner2019-11-211-0/+2
| | | | | | Skip the test_posix.test_pidfd_open() test if os.pidfd_open() fails with a PermissionError. This situation can happen in a Linux sandbox using a syscall whitelist which doesn't allow the pidfd_open() syscall yet (like systemd-nspawn).
* bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)Victor Stinner2019-11-211-0/+2
| | | test_capi: trashcan tests now require the test "cpu" resource.
* Produce cleaner bytecode for 'with' and 'async with' by generating separate ↵Mark Shannon2019-11-212-34/+55
| | | | | | code for normal and exceptional paths. (#6641) Remove BEGIN_FINALLY, END_FINALLY, CALL_FINALLY and POP_FINALLY bytecodes. Implement finally blocks by code duplication. Reimplement frame.lineno setter using line numbers rather than bytecode offsets.
* bpo-38841: Skip asyncio test_create_datagram_endpoint_existing_sock_unix ↵xdegaye2019-11-201-1/+1
| | | | | | | | | | | | | (GH-17294) on platforms lacking a functional bind() for named unix domain sockets https://bugs.python.org/issue38841 Automerge-Triggered-By: @asvetlov
* closes bpo-38712: Add signal.pidfd_send_signal. (GH-17070)Benjamin Peterson2019-11-201-0/+19
| | | | | | | | This exposes a Linux-specific syscall for sending a signal to a process identified by a file descriptor rather than a pid. For simplicity, we don't support the siginfo_t parameter to the syscall. This parameter allows implementing a pidfd version of rt_sigqueueinfo(2), which Python also doesn't support.
* bpo-37957: Allow regrtest to receive a file with test (and subtests) to ↵Pablo Galindo2019-11-196-24/+166
| | | | | | | ignore (GH-16989) When building Python in some uncommon platforms there are some known tests that will fail. Right now, the test suite has the ability to ignore entire tests using the -x option and to receive a filter file using the --matchfile filter. The problem with the --matchfile option is that it receives a file with patterns to accept and when you want to ignore a couple of tests and subtests, is too cumbersome to lists ALL tests that are not the ones that you want to accept and he problem with -x is that is not easy to ignore just a subtests that fail and the whole test needs to be ignored. For these reasons, add a new option to allow to ignore a list of test and subtests for these situations.
* Remove binding of captured exceptions when not used to reduce the chances of ↵Pablo Galindo2019-11-1911-18/+18
| | | | | | | creating cycles (GH-17246) Capturing exceptions into names can lead to reference cycles though the __traceback__ attribute of the exceptions in some obscure cases that have been reported previously and fixed individually. As these variables are not used anyway, we can remove the binding to reduce the chances of creating reference cycles. See for example GH-13135
* bpo-38707: Fix for multiprocessing.Process MainThread.native_id (GH-17088)Jake Tesler2019-11-191-0/+22
| | | | | | | | | | | | | | | | | | | This PR implements a fix for `multiprocessing.Process` objects; the error occurs when Processes are created using either `fork` or `forkserver` as the `start_method`. In these instances, the `MainThread` of the newly created `Process` object retains all attributes from its parent's `MainThread` object, including the `native_id` attribute. The resulting behavior is such that the new process' `MainThread` captures an incorrect/outdated `native_id` (the parent's instead of its own). This change forces the Process object to update its `native_id` attribute during the bootstrap process. cc @vstinner https://bugs.python.org/issue38707 Automerge-Triggered-By: @pitrou
* bpo-38839: Fix some unused functions in tests (GH-17189)Adam Johnson2019-11-195-10/+10
|
* bpo-35409: Ignore GeneratorExit in async_gen_athrow_throw (GH-14755)Vincent Michel2019-11-191-0/+27
| | | | | | | | | Ignore `GeneratorExit` exceptions when throwing an exception into the `aclose` coroutine of an asynchronous generator. https://bugs.python.org/issue35409
* bpo-22367: Update test_fcntl.py for spawn process mode (#17154)Dong-hee Na2019-11-191-9/+19
|
* Revert "bpo-38811: Check for presence of os.link method in pathlib. ↵Victor Stinner2019-11-181-19/+0
| | | | | (GH-17170)" (#17219) This reverts commit 111772fc27cfe388bc060f019d68a3e33481ec65.
* bpo-38811: Check for presence of os.link method in pathlib. (GH-17170)Toke Høiland-Jørgensen2019-11-171-0/+19
| | | | | Fix also the Path.symplink() method implementation for the case when symlinks are not supported.
* bpo-38724: Implement subprocess.Popen.__repr__ (GH-17151)Andrey Doroschenko2019-11-171-0/+24
|
* bpo-28286: Deprecate opening GzipFile for writing implicitly. (GH-16417)Serhiy Storchaka2019-11-161-1/+3
| | | | Always specify the mode argument for writing.
* bpo-38639: Optimize floor(), ceil() and trunc() for floats. (GH-16991)Serhiy Storchaka2019-11-161-21/+40
|
* bpo-38453: Ensure correct short path is obtained for test (GH-17184)Steve Dower2019-11-161-3/+21
|
* bpo-38453: Ensure ntpath.realpath correctly resolves relative paths (GH-16967)Steve Dower2019-11-152-37/+64
| | | | | Ensure isabs() is always True for \\?\ prefixed paths Avoid unnecessary usage of readlink() to avoid resolving broken links incorrectly Ensure shutil tests run in test directory
* closes bpo-38692: Add a pidfd child process watcher to asyncio. (GH-17069)Benjamin Peterson2019-11-141-0/+18
|
* bpo-38785: Prevent asyncio from crashing (GH-17144)Andrew Svetlov2019-11-131-0/+39
| | | | | | | if parent `__init__` is not called from a constructor of object derived from `asyncio.Future` https://bugs.python.org/issue38785
* bpo-38786: Add parsing of https links to pydoc (GH-17143)Kirill2019-11-131-0/+11
|
* closes bpo-27805: Ignore ESPIPE in initializing seek of append-mode files. ↵Benjamin Peterson2019-11-121-0/+11
| | | | | (GH-17112) This change, which follows the behavior of C stdio's fdopen and Python 2's file object, allows pipes to be opened in append mode.
* bpo-38565: add new cache_parameters method for lru_cache (GH-16916)Manjusaka2019-11-121-0/+11
|
* bpo-38438: Simplify argparse "star nargs" usage. (GH-17106)Brandt Bucher2019-11-111-7/+7
|
* bpo-38761: Register WeakSet as a MutableSet (GH-17104)Raymond Hettinger2019-11-111-0/+5
|
* bpo-22367: Add tests for fcntl.lockf(). (GH-17010)Dong-hee Na2019-11-071-1/+28
|
* update a deprecated assert in logging tests (GH-17079)l0rb2019-11-071-1/+1
|
* bpo-38716: stop rotating handlers from setting inherited namer and rotator ↵l0rb2019-11-061-0/+19
| | | | to None (GH-17072)
* bpo-38692: Add os.pidfd_open. (GH-17063)Benjamin Peterson2019-11-061-0/+9
|
* bpo-37645: add new function _PyObject_FunctionStr() (GH-14890)Jeroen Demeyer2019-11-054-30/+30
| | | | | | | | | | | | Additional note: the `method_check_args` function in `Objects/descrobject.c` is written in such a way that it applies to all kinds of descriptors. In particular, a future re-implementation of `wrapper_descriptor` could use that code. CC @vstinner @encukou https://bugs.python.org/issue37645 Automerge-Triggered-By: @encukou
* bpo-35381 Remove all static state from posixmodule (GH-15892)Eddie Elizondo2019-11-051-0/+30
| | | | | | | | | | | | | | After #9665, this moves the remaining types in posixmodule to be heap-allocated to make it compatible with PEP384 as well as modifying all the type accessors to fully make the type opaque. The original PR that got messed up a rebase: https://github.com/python/cpython/pull/10854. All the issues in that commit have now been addressed since https://github.com/python/cpython/pull/11661 got committed. This change also removes any state from the data segment and onto the module state itself. https://bugs.python.org/issue35381 Automerge-Triggered-By: @encukou
* Slightly improve plistlib test coverage. (GH-17025)Jon Janzen2019-11-011-5/+21
| | | | | | | | | | | | * Add missing test class (mistake in GH-4455) * Increase coverage with 4 more test cases * Rename neg_uid to huge_uid in test_modified_uid_huge * Replace test_main() with unittest.main() * Update plistlib docs
* bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. ↵Anthony Sottile2019-10-311-0/+4
| | | | (GH-16938)
* bpo-38586: setting logging.Handler .name property in fileConfig (GH-16918)Lucas Cimon2019-10-311-0/+24
|
* bpo-38614: Increase asyncio test_communicate() timeout (GH-16995)Victor Stinner2019-10-301-1/+1
| | | | Fix test_communicate() of test_asyncio.test_subprocess: use support.LONG_TIMEOUT (5 minutes), instead of 1 minute.
* bpo-38640: Allow break and continue in always false while loops (GH-16992)Pablo Galindo2019-10-301-0/+18
|
* bpo-38614: Add timeout constants to test.support (GH-16964)Victor Stinner2019-10-304-26/+80
| | | | | | | | Add timeout constants to test.support: * LOOPBACK_TIMEOUT * INTERNET_TIMEOUT * SHORT_TIMEOUT * LONG_TIMEOUT
* bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981)Serhiy Storchaka2019-10-301-0/+1
|
* bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. ↵Daniel Hillier2019-10-291-0/+222
| | | | (GH-14656)
* Remove code commented for more than 10 years (GH-16965)Victor Stinner2019-10-281-79/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test_urllib commented since 2007: commit d9880d07fc032884e8bd5cf3ac636d3a3778d5f7 Author: Facundo Batista <facundobatista@gmail.com> Date: Fri May 25 04:20:22 2007 +0000 Commenting out the tests until find out who can test them in one of the problematic enviroments. pynche code commented since 1998 and 2001: commit ef30092207e684bd3e74fe3d6172b97327a0a089 Author: Barry Warsaw <barry@python.org> Date: Tue Dec 15 01:04:38 1998 +0000 Added most of the mechanism to change the strips from color variations to color constants (i.e. red constant, green constant, blue constant). But I haven't hooked this up yet because the UI gets more crowded and the arrows don't reflect the correct values. Added "Go to Black" and "Go to White" buttons. commit 741eae0b3129c123ed4319d8d9e5b877b09aefa8 Author: Barry Warsaw <barry@python.org> Date: Wed Apr 18 03:51:55 2001 +0000 StripWidget.__init__(), update_yourself(): Removed some unused local variables reported by PyChecker. __togglegentype(): PyChecker accurately reported that the variable __gentypevar was unused -- actually this whole method is currently unused so comment it out.
* bpo-37330: open() no longer accept 'U' in file mode (GH-16959)Victor Stinner2019-10-283-30/+27
| | | | | open(), io.open(), codecs.open() and fileinput.FileInput no longer accept "U" ("universal newline") in the file mode. This flag was deprecated since Python 3.3.
* bpo-38334: Fix seeking backward on an encrypted zipfile.ZipExtFile. (GH-16937)Serhiy Storchaka2019-10-271-0/+38
| | | Test by Daniel Hillier.
* bpo-38535: Fix positions for AST nodes for calls without arguments in ↵Serhiy Storchaka2019-10-261-6/+6
| | | | decorators. (GH-16861)
* bpo-30618: add readlink to pathlib.Path (GH-8285)Girts2019-10-231-0/+10
| | | | | | | | | | | This adds a "readlink" method to pathlib.Path objects that calls through to os.readlink. https://bugs.python.org/issue30618 Automerge-Triggered-By: @gpshead
* bpo-34679: ProactorEventLoop only uses set_wakeup_fd() in main thread (GH-16901)Victor Stinner2019-10-231-0/+2
| | | | bpo-34679, bpo-38563: asyncio.ProactorEventLoop.close() now only calls signal.set_wakeup_fd() in the main thread.
* bpo-31202: Preserve case of literal parts in Path.glob() on Windows. (GH-16860)Serhiy Storchaka2019-10-211-0/+4
|
* bpo-38493: Add os.CLD_KILLED and os.CLD_STOPPED. (GH-16821)Dong-hee Na2019-10-211-0/+10
|
* bpo-27961: Replace PY_LONG_LONG with long long. (GH-15386)Sergey Fedoseev2019-10-211-2/+2
|