Commit Graph

42985 Commits

Author SHA1 Message Date
Miss Islington (bot) 4b828467a3
bpo-32458: Further tune start_tls tests (GH-7166)
(cherry picked from commit 8267ea2e84)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-05-28 13:44:12 -07:00
Miss Islington (bot) bc3a002e7d
bpo-33654: Support BufferedProtocol in set_protocol() and start_tls() (GH-7130)
In this commit:

* Support BufferedProtocol in set_protocol() and start_tls()
* Fix proactor to cancel readers reliably
* Update tests to be compatible with OpenSSL 1.1.1
* Clarify BufferedProtocol docs
* Bump TLS tests timeouts to 60 seconds; eliminate possible race from start_serving
* Rewrite test_start_tls_server_1
(cherry picked from commit dbf102271f)

Co-authored-by: Yury Selivanov <yury@magic.io>
2018-05-28 11:50:45 -07:00
Miss Islington (bot) f8fdb368e3 bpo-33505: Optimize asyncio.ensure_future by reordering if conditions (GH-6836) (#7162)
(cherry picked from commit e549c4be5f)

Co-authored-by: jimmylai <albert_chs@yahoo.com.tw>
2018-05-28 14:42:50 -04:00
Miss Islington (bot) 1f21ae710d bpo-31647: Fix write_eof() after close() for SelectorSocketTransport (GH-7149) (GH-7153)
Fixed bug where calling write_eof() on a _SelectorSocketTransport after
it's already closed raises AttributeError.
(cherry picked from commit 23f587e395)

Co-authored-by: twisteroid ambassador <twisteroidambassador@users.noreply.github.com>
2018-05-28 12:04:09 -04:00
Miss Islington (bot) 983c1ba94a bpo-32374: Ignore Python-level exceptions in test_bad_traverse (GH-7145) (GH-7150)
(cherry picked from commit 08c5aca9d1)

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
2018-05-28 14:52:03 +02:00
Miss Islington (bot) eb8516becc bpo-33400: Clarified documentation to indicate no strict adherence to ISO 8601. (GH-6702) (GH-6704)
(cherry picked from commit c4994dc00d)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
2018-05-28 13:29:13 +01:00
Miss Islington (bot) 98b089e2a1
bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)
(cherry picked from commit 97b523db7c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-28 04:21:44 -07:00
Miss Islington (bot) 96fb828da3
bpo-33655: Also ignore test_posix_fallocate failures on BSD platforms (GH-7134)
The failure may be due to the use oF ZFS, a case we already ignore
for Solaris-based systems where ZFS is frequently used.
(cherry picked from commit 09c4a7dee2)

Co-authored-by: Ned Deily <nad@python.org>
2018-05-26 14:57:01 -07:00
Miss Islington (bot) e60f6e1864
bpo-21983: Fix a crash in ctypes.cast() when passed a ctypes structured data type (GH-3859)
(cherry picked from commit d518d8bc8d)

Co-authored-by: Oren Milman <orenmn@gmail.com>
2018-05-26 11:39:52 -07:00
Miss Islington (bot) d49862582e
bpo-33652: Improve pickle support in the typing module. (GH-7123)
Pickles of type variables and subscripted generics are now future-proof
and compatible with older Python versions.
(cherry picked from commit 09f3221fbb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-26 11:38:00 -07:00
Miss Islington (bot) af1d007bdb
test.regrtest: flush stdout when display progress (GH-7105)
runtest_mp.py: call print() with flush=True.
(cherry picked from commit 4f0bc7f7ab)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-05-25 09:46:33 -07:00
Miss Islington (bot) d9eb22c67c
bpo-33629: Prevent coredump in test_importlib (GH-7090)
bpo-32374, bpo-33629: Use support.SuppressCrashReport() in
test_bad_traverse() of MultiPhaseExtensionModuleTests to prevent
leaking a core dump file.
(cherry picked from commit 483000e164)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-05-24 13:44:56 -07:00
Miss Islington (bot) b2ab5dc72b
bpo-33628: IDLE: Minor code cleanup of codecontext.py and its tests (GH-7085)
(cherry picked from commit 8506016f90)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-05-23 20:26:54 -07:00
Miss Islington (bot) dd7a255911 bpo-33109: argparse subparsers are once again not required by default (GH-6919) (GH-7089)
bpo-26510 in 3.7.0a2 changed the behavior of argparse to make
subparsers required by default, returning to the behavior of 2.7
and 3.2. The behavior was changed in 3.3 to be no longer required.
While it might make more sense to have the default to required,
compatibility with 3.3 through 3.6 is probably less disruptive
than trying to reintroduce compatibility with 2.7 at this point.
This change restores the 3.6 behavior.
(cherry picked from commit 8ebf5ceb0f)

Co-authored-by: Ned Deily <nad@python.org>
2018-05-23 22:22:46 -04:00
Miss Islington (bot) fa286edbde
bpo-33540: Add block_on_close attr to socketserver (GH-6911)
Add a new block_on_close class attribute to ForkingMixIn and
ThreadingMixIn classes of socketserver to opt-in for pre-3.7 behaviour.
(cherry picked from commit 453bd0bc65)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-05-23 18:34:43 -07:00
Victor Stinner fa24c1c5af
[3.7] bpo-33353: Fix test_asyncio on FreeBSD (GH-7087)
* bpo-33353: test_asyncio uses smaller sendfile data (#7083)

bpo-32622, bpo-33353: sendfile() tests of test_asyncio use socket
buffers of 1 kB "to test on relative small data sets". Send only
160 KiB rather 10 MB to make the test much faster.

Shrink also SendfileBase.DATA from 1600 KiB to 160 KiB.

On Linux, 3 test_sock_sendfile_mix_with_regular_send() runs now take
less than 1 second, instead of 18 seconds.

On FreeBSD, the 3 tests didn't hang, but took 3 minutes. Now
the 3 tests pass in less than 1 seconds.

(cherry picked from commit 2932755cc1)

* bpo-33353: test_asyncio set SO_SNDBUF after connect (GH-7086)

bpo-32622, bpo-33353: On macOS, sock.connect() changes the
SO_SNDBUF value. Only set SO_SNDBUF and SO_RCVBUF buffer sizes
once a socket is connected or binded, not before.

(cherry picked from commit b97de3dd86)
2018-05-24 03:21:14 +02:00
Miss Islington (bot) 72ef4fc32b [3.7] bpo-33618: Enable TLS 1.3 in tests (GH-7079) (GH-7082)
TLS 1.3 behaves slightly different than TLS 1.2. Session tickets and TLS
client cert auth are now handled after the initialy handshake. Tests now
either send/recv data to trigger session and client certs. Or tests
ignore ConnectionResetError / BrokenPipeError on the server side to
handle clients that force-close the socket fd.

To test TLS 1.3, OpenSSL 1.1.1-pre7-dev (git master + OpenSSL PR
https://github.com/openssl/openssl/pull/6340) is required.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 529525fb5a)
2018-05-23 22:49:04 +02:00
Miss Islington (bot) 0f9b68a728
Reverse the meaning of is_argument when used for type check (GH-7039)
(cherry picked from commit 0e61dffdba)

Co-authored-by: Nina Zakharenko <nzakharenko@gmail.com>
2018-05-22 20:51:15 -07:00
Miss Islington (bot) 2751dccca4
bpo-33604: Remove Pending from hmac Deprecation warning. (GH-7062)
bpo-33604: Bump removal notice from 3.6 to 3.8 and change PendingDeprecationWarning to DeprecationWarning as we had intended to do earlier...
(cherry picked from commit 8bb0b5b03c)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2018-05-22 16:40:44 -07:00
Miss Islington (bot) cd57b48ef9
bpo-33570: TLS 1.3 ciphers for OpenSSL 1.1.1 (GH-6976)
Change TLS 1.3 cipher suite settings for compatibility with OpenSSL
1.1.1-pre6 and newer. OpenSSL 1.1.1 will have TLS 1.3 cipers enabled by
default.

Also update multissltests and Travis config to test with latest OpenSSL.

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit e8eb6cb792)

Co-authored-by: Christian Heimes <christian@python.org>
2018-05-22 14:40:46 -07:00
Miss Islington (bot) ca6d7aee91
Improve comments in test_idle.py. (GH-7057)
(cherry picked from commit 2a6d5da1d3)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-22 10:43:55 -07:00
Miss Islington (bot) 25fd6cc5b0
bpo-30877: Fix clearing a cache in the the JSON decoder. (GH-7048)
(cherry picked from commit ae00fb1d4f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-22 06:03:10 -07:00
Miss Islington (bot) 316f86911a
Use IPv4 only to avoid IP address collision (GH-7030)
(cherry picked from commit b7555babe9)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-05-21 05:30:06 -07:00
Miss Islington (bot) 4d39ade62a Fix asyncio flaky tests (GH-7023) (#7024)
(cherry picked from commit e253752191)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2018-05-21 14:47:29 +03:00
Miss Islington (bot) b8b800090f bpo-33263: Fix FD leak in _SelectorSocketTransport (GH-6450) (#7022)
* bpo-33263 Fix FD leak in _SelectorSocketTransport. (GH-6450)

Under particular circumstances _SelectorSocketTransport can try to add a reader
even the transport is already being closed. This can lead to FD leak and
invalid stated of the following connections. Fixed the SelectorSocketTransport
to add the reader only if the trasport is still active.
(cherry picked from commit a84d0b361a)

Co-authored-by: Vlad Starostin <drtyrsa@yandex.ru>
2018-05-21 11:35:25 +03:00
Miss Islington (bot) b85115ed4c [3.7] bpo-32262: Fix typo in f-string (GH-7016)
Fix typo from commit 6370f345e1

(cherry picked from commit d361e99868)
Co-authored-by: Christian Heimes <christian@python.org>
2018-05-20 20:22:50 +02:00
Miss Islington (bot) 073eca39a5
bpo-33542: Ignore DUID in uuid.get_node on Windows. (GH-6922)
uuid._ipconfig_getnode did not validate the maximum length of the value,
so long as the value had the same type of formatting as a MAC address.
This let it select DUIDs as MAC addresses. It now requires an exact
length match.
(cherry picked from commit c66c342cb4)

Co-authored-by: CtrlZvi <viz+github@flippedperspective.com>
2018-05-20 08:40:10 -07:00
Serhiy Storchaka b32f8897ea
[3.7] bpo-33475: Fix and improve converting annotations to strings. (GH-6774). (GH-6927)
(cherry picked from commit 64fddc423f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-20 18:06:08 +03:00
Miss Islington (bot) 52d1741c95 bpo-33584: Fix several minor bugs in asyncio. (GH-7003) (GH-7005)
Fix the following bugs in the C implementation:

* get_future_loop() silenced all exceptions raised when look up the get_loop
  attribute, not just an AttributeError.
* enter_task() silenced all exceptions raised when look up the current task,
  not just a KeyError.
* repr() was called for a borrowed link in enter_task() and task_step_impl().
* str() was used instead of repr() in formatting one error message (in
  Python implementation too).
* There where few reference leaks in error cases.
(cherry picked from commit 6655354afc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-05-20 17:34:28 +03:00
Miss Islington (bot) 28ea38b97b
bpo-26819: Prevent proactor double read on resume (GH-6921)
The proactor event loop has a race condition when reading with
pausing/resuming. `resume_reading()` unconditionally schedules the read
function to read from the current future. If `resume_reading()` was
called before the previously scheduled done callback fires, this results
in two attempts to get the data from the most recent read and an
assertion failure. This commit tracks whether or not `resume_reading`
needs to reschedule the callback to restart the loop, preventing a
second attempt to read the data.
(cherry picked from commit 4151061855)

Co-authored-by: CtrlZvi <viz+github@flippedperspective.com>
2018-05-20 03:57:32 -07:00
Miss Islington (bot) 222ae1eccc bpo-30928: Update idlelib/NEWS.txt. (GH-6995) (#6996)
(cherry picked from commit 6b0d09b8f0)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-19 22:01:26 -04:00
Miss Islington (bot) 0efa1353b7
bpo-32831: IDLE: Add docstrings and tests for codecontext (GH-5638)
(cherry picked from commit 654038d896)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-05-19 13:28:03 -07:00
Miss Islington (bot) 09ca5906b7 bpo-28556: Don't simplify unions at runtime (GH-6841) (GH-6979)
(cherry picked from commit f65e31fee3)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
2018-05-18 16:27:14 -07:00
Miss Islington (bot) abde17e663 bpo-33556: Remove reference to thread module from docstring (GH-6963)
(cherry picked from commit 5634331a76)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2018-05-18 14:46:43 -05:00
Miss Islington (bot) b2a02b9d88 bpo-33564: Add async to IDLE's code context block openers. (GH-6960) (#6961)
(cherry picked from commit d89ca94847)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-17 22:04:23 -04:00
Miss Islington (bot) 56882db4f7 Provide a little better debug output (GH-6940) (#6942)
(cherry picked from commit 273f51f5ca)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-05-17 12:53:24 -04:00
Miss Islington (bot) 6417d33633 bpo-33537: Add an __all__ to importlib.resources (GH-6920) (#6941)
(cherry picked from commit 0ed66df524)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-05-17 12:27:49 -04:00
Miss Islington (bot) 8965d75c90 bpo-33522: Enable CI builds on Visual Studio Team Services (GH-6865) (GH-6926)
(cherry picked from commit e5f41d2f1e)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
2018-05-17 08:49:01 -04:00
Miss Islington (bot) 216a27766f bpo-33549: Remove shim and deprecation warning to access DocumentLS.async. (GH-6924) (GH-6929)
`obj.async` is now a syntax error, so the warning/shim is
quasi-unnecessary.
(cherry picked from commit f90f5d5c1d)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2018-05-17 12:01:02 +03:00
Miss Islington (bot) 9c17cd3214 Fix ClassVar as string fails when getting type hints (GH-6824) (#6912)
(cherry picked from commit 2d2d3b170b)

Co-authored-by: Nina Zakharenko <nzakharenko@gmail.com>
2018-05-16 18:04:39 -04:00
Miss Islington (bot) 6409e759df
bpo-33536: Validate make_dataclass() field names. (GH-6906)
(cherry picked from commit 4e81296b18)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-05-16 09:28:22 -07:00
Miss Islington (bot) 8e20fc388f
bpo-33534: Remove unneeded test. (GH-6897)
This condition as already tested before this code is called.
(cherry picked from commit 9285835a05)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-05-16 04:46:32 -07:00
Miss Islington (bot) 8d486fb93a
Reflow dataclasses comments (GH-6893)
To be more consistent with other code (and so people stop hassling me!), reflow the dataclasses comments to not use a single space indentation when continuing a paragraph of text.
(cherry picked from commit f8e7549490)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-05-16 02:49:29 -07:00
Miss Islington (bot) 4af6110f77 bpo-32384: Skip test when _testcapi isn't available (GH-4940)
(cherry picked from commit 4cc3eb48e1)

Co-authored-by: Isaiah Peng <isaiah@users.noreply.github.com>
2018-05-16 11:35:06 +03:00
Miss Islington (bot) c73268aad7
bpo-33453: Handle string type annotations in dataclasses. (GH-6768)
(cherry picked from commit 2a7bacbd91)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2018-05-15 21:22:13 -07:00
Miss Islington (bot) 3d484435d2
bpo-30928: Update idlelib/NEWS.txt to 2018-05-14. (GH-6873)
(cherry picked from commit 038b21f2ca)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-15 17:48:17 -07:00
Miss Islington (bot) 2cdb70ac5d bpo-33465: Use an unlikely to be built-in C extension in a test (GH-6797) (#6869)
(cherry picked from commit 8709b236fc)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-05-15 17:24:26 -04:00
Miss Islington (bot) 820219f786
bpo-33509: Fix _warnings for module_globals=None (GH-6833)
Don't crash on warnings.warn_explicit() if module_globals is not a dict.
(cherry picked from commit b056562860)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
2018-05-15 13:56:28 -07:00
Miss Islington (bot) 8717cfeb6b
bpo-29706: Test that IDLE colors async/await as keywords. (GH-6846)
Added to the eye-verified htest, not to the unittests.
Also remove some stray leftover comments.
(cherry picked from commit 389a48ede9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2018-05-15 12:57:13 -07:00
Miss Islington (bot) f4fdb619dd bpo-28167: bump platform.linux_distribution removal to 3.8 (GH-6669) (GH-6862)
Also bump PendingDeprecationWarning to DeprecationWarning.
(cherry picked from commit 9eb40bc38d)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
2018-05-15 13:30:06 -04:00