summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466)Bar Harel2018-02-021-0/+50
|
* bpo-32303 - Consistency fixes for namespace loaders (#5481)Barry Warsaw2018-02-022-2/+20
| | | | | | | * Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages. * Make sure ``__spec__.origin` matches ``__file__`` for namespace packages. https://bugs.python.org/issue32303 https://bugs.python.org/issue32305
* Revert "bpo-31356: Add context manager to temporarily disable GC GH-5495Yury Selivanov2018-02-021-70/+1
| | | | | | | This reverts commit 72a0d218dcc94a3cc409a9ef32dfcd5a7bbcb43c. The reverted commit had a few issues so it was unanimously decided to undo it. See the bpo issue for details.
* bpo-32733: Make test_coroutines robust against -Werror (GH-5487)Nathaniel J. Smith2018-02-021-7/+2
|
* Implement TimerHandle.when() (#5473)Andrew Svetlov2018-02-011-0/+6
|
* bpo-32583: Fix possible crashing in builtin Unicode decoders (#5325)Xiang Zhang2018-01-311-0/+52
| | | | | When using customized decode error handlers, it is possible for builtin decoders to write out-of-bounds and then crash.
* bpo-30693: zip+tarfile: sort directory listing (#2263)Bernhard M. Wiedemann2018-01-311-0/+24
| | | | | | tarfile and zipfile now sort directory listing to generate tar and zip archives in a more reproducible way. See also https://reproducible-builds.org/docs/stable-inputs/ on that topic.
* bpo-32727: smtplib's SMTP.send_message behaves differently with from_addr ↵Stéphane Wirtel2018-01-311-1/+18
| | | | | and to_addrs (#5451) Do not pass the name field in the 'from' address in the SMTP envelope.
* bpo-28440: Don't add /Library/Python/3.x/site-packages to sys.path (#5445)Ned Deily2018-01-301-14/+2
| | | | | | | | No longer add /Library/Python/3.x/site-packages, the Apple-supplied system Python site-packages directory, to sys.path for macOS framework builds in case Apple ships a version of Python 3. A similar change was made earlier to Python 2.7 where it was found that the coupling between the system Python and a user-installed framework Python often caused confusion or pip install failures.
* bpo-22908: Add seek and tell functionality to ZipExtFile (GH-4966)John Jolly2018-01-301-0/+34
| | | | | This allows for nested zip files, tar files within zip files, zip files within tar files, etc. Contributed by: John Jolly
* bpo-28134: Ignore proto in unknown socket test (GH-5435)Christian Heimes2018-01-301-2/+3
| | | | | Band-aid for macOS: Some platforms seem to ignore unknown protocols. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31961: subprocess now accepts path-like args (GH-4329)Anders Lorentsen2018-01-301-0/+31
| | | Allow os.PathLike args in subprocess APIs.
* bpo-32102 Add "capture_output=True" to subprocess.run (GH-5149)Bo Bayles2018-01-301-0/+32
| | | | Add "capture_output=True" option to subprocess.run, this is equivalent to setting stdout=PIPE, stderr=PIPE but is much more readable.
* closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441)Benjamin Peterson2018-01-301-1/+1
|
* bpo-21417: Add compresslevel= to the zipfile module (GH-5385)Bo Bayles2018-01-301-4/+36
| | | | | | This allows the compression level to be specified when writing zipfiles (for the entire file *and* overridden on a per-file basis). Contributed by Bo Bayles
* bpo-25942: make subprocess more graceful on ^C (GH-5026)Gregory P. Smith2018-01-301-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not allow receiving a SIGINT to cause the subprocess module to trigger an immediate SIGKILL of the child process. SIGINT is normally sent to all child processes by the OS at the same time already as was the established normal behavior in 2.7 and 3.2. This behavior change was introduced during the fix to https://bugs.python.org/issue12494 and is generally surprising to command line tool users who expect other tools launched in child processes to get their own SIGINT and do their own cleanup. In Python 3.3-3.6 subprocess.call and subprocess.run would immediately SIGKILL the child process upon receiving a SIGINT (which raises a KeyboardInterrupt). We now give the child a small amount of time to exit gracefully before resorting to a SIGKILL. This is also the case for subprocess.Popen.__exit__ which would previously block indefinitely waiting for the child to die. This was hidden from many users by virtue of subprocess.call and subprocess.run sending the signal immediately. Behavior change: subprocess.Popen.__exit__ will not block indefinitely when the exiting exception is a KeyboardInterrupt. This is done for user friendliness as people expect their ^C to actually happen. This could cause occasional orphaned Popen objects when not using `call` or `run` with a child process that hasn't exited. Refactoring involved: The Popen.wait method deals with the KeyboardInterrupt second chance, existing platform specific internals have been renamed to _wait(). Also fixes comment typos.
* replace dynamic import with 'exec' with importlib.import_module (#5433)Benjamin Peterson2018-01-301-3/+4
|
* bpo-32604: Expose the subinterpreters C-API in a "private" stdlib module. ↵Eric Snow2018-01-301-0/+1118
| | | | | (gh-1748) The module is primarily intended for internal use in the test suite. Building the module under Windows will come in a follow-up PR.
* bpo-32550. Remove the STORE_ANNOTATION bytecode. (GH-5181)Mark Shannon2018-01-301-17/+21
|
* bpo-28134: Auto-detect socket values from file descriptor (#1349)Christian Heimes2018-01-292-2/+45
| | | | | | | | | | | | | | | Fix socket(fileno=fd) by auto-detecting the socket's family, type, and proto from the file descriptor. The auto-detection can be overruled by passing in family, type, and proto explicitly. Without the fix, all socket except for TCP/IP over IPv4 are basically broken: >>> s = socket.create_connection(('www.python.org', 443)) >>> s <socket.socket fd=3, family=AddressFamily.AF_INET6, type=SocketKind.SOCK_STREAM, proto=6, laddr=('2003:58:bc4a:3b00:56ee:75ff:fe47:ca7b', 59730, 0, 0), raddr=('2a04:4e42:1b::223', 443, 0, 0)> >>> socket.socket(fileno=s.fileno()) <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('2003:58:bc4a:3b00::%2550471192', 59730, 0, 2550471192), raddr=('2a04:4e42:1b:0:700c:e70b:ff7f:0%2550471192', 443, 0, 2550471192)> Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31356: Add context manager to temporarily disable GC (GH-4224)Pablo Galindo2018-01-291-1/+70
|
* bpo-32703: Fix coroutine resource warning in case where there's an error ↵Yury Selivanov2018-01-291-33/+63
| | | | | (GH-5410) The commit removes one unnecessary "if" clause in genobject.c. That "if" clause was masking un-awaited coroutines warnings just to make writing unittests more convenient.
* bpo-27931: Fix email address header parsing error (#5329)jayyyin2018-01-291-0/+17
| | | | Correctly handle addresses whose username is an empty quoted string.
* Add a test for pdb until command in coroutine (#5427)Andrew Svetlov2018-01-291-0/+46
|
* bpo-28414: ssl module idna test (#5395)Christian Heimes2018-01-291-1/+65
| | | | | | | Add test cases for IDNA 2003 and 2008 host names. IDNA 2003 internationalized host names are working since bpo-31399 has landed. IDNA 2008 deviations are still broken and will be fixed in another patch. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-31429: Define TLS cipher suite on build time (#3532)Christian Heimes2018-01-291-1/+15
| | | | | | | | | | | | | Until now Python used a hard coded white list of default TLS cipher suites. The old approach has multiple downsides. OpenSSL's default selection was completely overruled. Python did neither benefit from new cipher suites (ChaCha20, TLS 1.3 suites) nor blacklisted cipher suites. For example we used to re-enable 3DES. Python now defaults to OpenSSL DEFAULT cipher suite selection and black lists all unwanted ciphers. Downstream vendors can override the default cipher list with --with-ssl-default-suites. Signed-off-by: Christian Heimes <christian@python.org>
* bpo-20891: Reenable test_embed.test_bpo20891() (GH-5420)Victor Stinner2018-01-291-3/+0
|
* bpo-32706: Skip test_ftplib.test_check_hostname() (#5422)Victor Stinner2018-01-291-0/+1
| | | | | | This test is unstable and currently prevents to make any new change since the test always fails on Travis CI. Skip the test to get more time to fix it.
* bpo-32591: silence deprecation warnings in test_coroutine (GH-5412)Nathaniel J. Smith2018-01-291-10/+20
|
* bpo-23749: Make start-tls tests more stable on win7 buildbot (GH-5409)Yury Selivanov2018-01-291-2/+10
| | | | | | | To mitigate the situation when the buildbot is under load and is unable to send/receive data fast enough: * reduce the size of the payload * set a generous timeout for socket ops
* bpo-32650: Add an asyncgen pdb test (#5406)Yury Selivanov2018-01-291-0/+60
|
* bpo-28685: Optimize sorted() list.sort() with type-specialized comparisons ↵embg2018-01-291-0/+114
| | | | (#582)
* bpo-20104: Expose `posix_spawn` in the os module (GH-5109)Pablo Galindo2018-01-291-0/+17
| | | | | Add os.posix_spawn to wrap the low level POSIX API of the same name. Contributed by Pablo Galindo.
* bpo-32650 Add support for async generators and more test for coroutines in ↵Pablo Galindo2018-01-291-1/+42
| | | | pdb (#5403)
* bpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400)Pablo Galindo2018-01-291-0/+55
|
* Fix trivial typo in test_dataclasses.py. (GH-5398)Eric V. Smith2018-01-291-1/+1
|
* bpo-32373: Add socket.getblocking() method. (#4926)Yury Selivanov2018-01-281-3/+60
|
* bpo-32251: Implement asyncio.BufferedProtocol. (#4755)Yury Selivanov2018-01-283-3/+450
|
* Revert "bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)" ↵Yury Selivanov2018-01-281-44/+0
| | | | | (#5394) This reverts commit 47c0b1f7d4115e6f15e6776c1f91d28e7d96fe0c.
* bpo-32697: Definition order of kwonly params is now guaranteed preserved. ↵larryhastings2018-01-281-0/+47
| | | | | | (#5391) Definition order of kwonly params is now guaranteed preserved.
* bpo-32327: Revert loop.run_in_executor behaviour: return a Future. (#5392)Yury Selivanov2018-01-281-3/+2
| | | | I've run some tests on 3.7 asyncio and it appears that too many things assume that run_in_executor returns a Future.
* bpo-32228: Reset raw_pos after unwinding the raw stream (#4858)Nitish Chandra2018-01-281-0/+17
| | | Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size.
* bpo-32685: Improve suggestion for print statement (GH-5375)Nitish Chandra2018-01-281-0/+17
| | | | | | | Better account for single-line compound statements and semi-colon separated statements when suggesting Py3 replacements for Py2 print statements. Initial patch by Nitish Chandra.
* bpo-32206: Update pdb usage to include new module option (GH-5111)Mario Corchero2018-01-281-1/+4
|
* bpo-30306: release arguments of contextmanager (GH-1500)Martin Teichmann2018-01-281-0/+47
| | | | | | | | | | | | | | | | The arguments to a generator function which is declared as a contextmanager are stored inside the context manager, and thus are kept alive, even when it is used as a regular context manager, and not as a function decorator (where it needs the original arguments to recreate the generator on each call). This is a possible unnecessary memory leak, so this changes contextmanager.__enter__ to release the saved arguments, as that method being called means that particular CM instance isn't going to need to recreate the underlying generator. Patch by Martin Teichmann.
* bpo-32677: Optimize str.isascii() (GH-5356)INADA Naoki2018-01-281-0/+7
|
* bpo-32513: Make it easier to override dunders in dataclasses. (GH-5366)Eric V. Smith2018-01-281-212/+452
| | | Class authors no longer need to specify repr=False if they want to provide a custom __repr__ for dataclasses. The same thing applies for the other dunder methods that the dataclass decorator adds. If dataclass finds that a dunder methods is defined in the class, it will not overwrite it.
* bpo-32221: makeipaddr(): remove interface part + speedup (GH-4724)Коренберг Марк2018-01-271-0/+44
|
* Fix tests if Python compiled without SSL (#5367)Andrew Svetlov2018-01-271-0/+2
|
* bpo-32622: Enforce sendfile fallback policy for FALLBACK transports (#5364)Yury Selivanov2018-01-271-0/+9
|