cpython: 0d663f758adb (original) (raw)

Mercurial > cpython

changeset 105135:0d663f758adb 3.6

Merge 3.5 (issue #28704) [#28704]

Yury Selivanov yury@magic.io
date Tue, 15 Nov 2016 15:27:23 -0500
parents 4d78290b1d8e(current diff)f8207c98eb5e(diff)
children c7d2ec49a80b 9c32309e4dec
files Lib/asyncio/unix_events.py Misc/NEWS
diffstat 3 files changed, 21 insertions(+), 0 deletions(-)[+] [-] Lib/asyncio/unix_events.py 8 Lib/test/test_asyncio/test_unix_events.py 10 Misc/NEWS 3

line wrap: on

line diff

--- a/Lib/asyncio/unix_events.py +++ b/Lib/asyncio/unix_events.py @@ -39,6 +39,13 @@ def _sighandler_noop(signum, frame): pass +try:

+except AttributeError:

+ + class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): """Unix event loop. @@ -256,6 +263,7 @@ class _UnixSelectorEventLoop(selector_ev raise ValueError( 'path and sock can not be specified at the same time')

# Check for abstract socket. str and bytes paths are supported.

--- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -4,6 +4,7 @@ import collections import errno import io import os +import pathlib import signal import socket import stat @@ -251,6 +252,15 @@ class SelectorEventLoopUnixSocketTests(t srv.close() self.loop.run_until_complete(srv.wait_closed())

+ def test_create_unix_server_existing_path_nonsock(self): with tempfile.NamedTemporaryFile() as file: coro = self.loop.create_unix_server(lambda: None, file.name)

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -60,6 +60,9 @@ Library