summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* bpo-32622: Implement loop.sendfile() (#5271)Andrew Svetlov2018-01-272-4/+308
|
* bpo-32630: Use contextvars in decimal (GH-5278)Yury Selivanov2018-01-271-0/+29
|
* bpo-31368: Expose preadv and pwritev in the os module (#5239)Pablo Galindo2018-01-271-0/+50
|
* bpo-31399: Let OpenSSL verify hostname and IP address (#3462)Christian Heimes2018-01-276-7/+41
| | | | | | | | | | | | | | | bpo-31399: Let OpenSSL verify hostname and IP The ssl module now uses OpenSSL's X509_VERIFY_PARAM_set1_host() and X509_VERIFY_PARAM_set1_ip() API to verify hostname and IP addresses. * Remove match_hostname calls * Check for libssl with set1_host, libssl must provide X509_VERIFY_PARAM_set1_host() * Add documentation for OpenSSL 1.0.2 requirement * Don't support OpenSSL special mode with a leading dot, e.g. ".example.org" matches "www.example.org". It's not standard conform. * Add hostname_checks_common_name Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32454: socket closefd (#5048)Christian Heimes2018-01-271-0/+16
| | | | | Add close(fd) function to the socket module Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32433: Optimized HMAC digest (#5023)Christian Heimes2018-01-271-0/+38
| | | | | | | The hmac module now has hmac.digest(), which provides an optimized HMAC digest for short messages. hmac.digest() is up to three times faster than hmac.HMAC().digest(). Signed-off-by: Christian Heimes <christian@python.org>
* bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)INADA Naoki2018-01-273-1/+14
|
* bpo-32670: Enforce PEP 479. (#5327)Yury Selivanov2018-01-262-24/+9
|
* bpo-32591: fix abort in _PyErr_WarnUnawaitedCoroutine during shutdown (#5337)Nathaniel J. Smith2018-01-261-0/+22
| | | | | | | | | | | | | | | | | | When an unawaited coroutine is collected very late in shutdown -- like, during the final GC at the end of PyImport_Cleanup -- then it was triggering an interpreter abort, because we'd try to look up the "warnings" module and not only was it missing (we were prepared for that), but the entire module system was missing (which we were not prepared for). I've tried to fix this at the source, by making the utility function get_warnings_attr robust against this in general. Note that it already has the convention that it can return NULL without setting an error, which is how it signals that the attribute it was asked to fetch is missing, and that all callers already check for NULL returns. There's a similar check for being late in shutdown at the top of warn_explicit, which might be unnecessary after this fix, but I'm not sure so I'm going to leave it.
* String annotations [PEP 563] (#4390)Guido van Rossum2018-01-261-0/+163
| | | | | | | | * Document `from __future__ import annotations` * Provide plumbing and tests for `from __future__ import annotations` * Implement unparsing the AST back to string form This is required for PEP 563 and as such only implements a part of the unparsing process that covers expressions.
* bpo-18533: Avoid RecursionError from repr() of recursive dictview (#4823)bennorth2018-01-262-0/+29
| | | | | | | | | | | | | | | | | dictview_repr(): Use a Py_ReprEnter() / Py_ReprLeave() pair to check for recursion, and produce "..." if so. test_recursive_repr(): Check for the string rather than a RecursionError. (Test cannot be any tighter as contents are implementation-dependent.) test_deeply_nested_repr(): Add new test, replacing the original test_recursive_repr(). It checks that a RecursionError is raised in the case of a non-recursive but deeply nested structure. (Very similar to what test_repr_deep() in test/test_dict.py does for a normal dict.) OrderedDictTests: Add new test case, to test behavior on OrderedDict instances containing their own values() or items().
* bpo-32662: Try making test_asyncio.test_server more reliable (#5338)Yury Selivanov2018-01-261-1/+12
|
* bpo-29237: Create enum for pstats sorting options (GH-5103)mwidjaja2018-01-261-0/+42
|
* bpo-32574: Fix leaks in asyncio.Queue.put() and .get() (#5208)José Melero Fernández2018-01-251-0/+50
|
* bpo-32662: Implement Server.start_serving() and Server.serve_forever() (#5312)Yury Selivanov2018-01-251-0/+117
| | | | | | | | | | | | | * bpo-32662: Implement Server.start_serving() and Server.serve_forever() New methods: * Server.start_serving(), * Server.serve_forever(), and * Server.is_serving(). Add 'start_serving' keyword parameter to loop.create_server() and loop.create_unix_server().
* bpo-29302: Implement contextlib.AsyncExitStack. (#4790)Ilya Kulakov2018-01-252-35/+204
|
* bpo-32667: Fix tests when $PATH contains a file (#5322)Victor Stinner2018-01-252-9/+8
| | | | | Some tests failed when the PATH environment variable contained a path to an existing file. Fix tests to ignore also NotADirectoryError, not only FileNotFoundError and PermissionError.
* bpo-32652: Defer pymain_set_global_config() call (#5303)Victor Stinner2018-01-251-0/+15
| | | | | | In Py_Main(), don't call pymain_set_global_config() early: only call it when the whole configuration has been read. Add an unit test to prevent future regression.
* bpo-32391: Implement StreamWriter.wait_closed() (#5281)Andrew Svetlov2018-01-241-1/+30
|
* bpo-10381: Add timezone to datetime C API (#5032)Paul Ganssle2018-01-241-0/+181
| | | | | | | | | | | | | | | | | | * Add timezone to datetime C API * Add documentation for timezone C API macros * Add dedicated tests for datetime type check macros * Remove superfluous C API test * Drop support for TimeZoneType in datetime C API * Expose UTC singleton to the datetime C API * Update datetime C-API documentation to include links * Add reference count information for timezone constructors
* bpo-29708: Setting SOURCE_DATE_EPOCH forces hash-based .pyc files (GH-5200)Bernhard M. Wiedemann2018-01-241-0/+12
| | | To support reproducible builds, the setting of of SOURCE_DATE_EPOCH triggers the py_compile module -- and by extension, compileall -- to forcibly compile with hash-based .pyc files. This eliminates the possibility of timestamp-based .pyc files which vary between builds.
* bpo-32636: Fix two bugs in test_asyncio (#5302)Victor Stinner2018-01-242-1/+2
|
* bpo-32636: Fix @asyncio.coroutine debug mode bug exposed by gh-5250 (#5291)Nathaniel J. Smith2018-01-241-0/+17
|
* bpo-32410: Improve sock_sendfile tests (#5294)Andrew Svetlov2018-01-241-16/+19
| | | | | * Rename sock_sendfile test methods * Make sock_sendfile tests more stable