-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into cancelstatus
- Loading branch information
Showing
44 changed files
with
532 additions
and
288 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ matrix: | |
- python: 3.8-dev | ||
|
||
script: | ||
- ci/ci.sh | ||
- ./ci.sh | ||
|
||
branches: | ||
except: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
An exception encapsulated within a :class:`MultiError` doesn't need to be | ||
hashable anymore. | ||
|
||
.. note:: | ||
|
||
This is only supported if you are running python >= 3.6.4. You can | ||
refer to `this github PR <https://github.com/python/cpython/pull/4014>`_ | ||
for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
To help any user reading through Trio's function implementations, start using public names (not _core) whenever possible. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The :class:`trio.Path` methods :meth:`~trio.Path.glob` and | ||
:meth:`~trio.Path.rglob` now return iterables of :class:`trio.Path` | ||
(not :class:`pathlib.Path`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
The :class:`trio.Path` classmethods, :meth:`~trio.Path.home` and | ||
:meth:`~trio.Path.cwd`, are now async functions. Previously, a bug | ||
in the forwarding logic meant :meth:`~trio.Path.cwd` was synchronous | ||
and :meth:`~trio.Path.home` didn't work at all. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# There are some tables here: | ||
# https://web.archive.org/web/20120206195747/https://msdn.microsoft.com/en-us/library/windows/desktop/ms740621(v=vs.85).aspx | ||
# They appear to be wrong. | ||
# | ||
# See https://github.com/python-trio/trio/issues/928 for details and context | ||
|
||
import socket | ||
import errno | ||
|
||
modes = ["default", "SO_REUSEADDR", "SO_EXCLUSIVEADDRUSE"] | ||
bind_types = ["wildcard", "specific"] | ||
|
||
def sock(mode): | ||
s = socket.socket(family=socket.AF_INET) | ||
if mode == "SO_REUSEADDR": | ||
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | ||
elif mode == "SO_EXCLUSIVEADDRUSE": | ||
s.setsockopt(socket.SOL_SOCKET, socket.SO_EXCLUSIVEADDRUSE, 1) | ||
return s | ||
|
||
def bind(sock, bind_type): | ||
if bind_type == "wildcard": | ||
sock.bind(("0.0.0.0", 12345)) | ||
elif bind_type == "specific": | ||
sock.bind(("127.0.0.1", 12345)) | ||
else: | ||
assert False | ||
|
||
def table_entry(mode1, bind_type1, mode2, bind_type2): | ||
with sock(mode1) as sock1: | ||
bind(sock1, bind_type1) | ||
try: | ||
with sock(mode2) as sock2: | ||
bind(sock2, bind_type2) | ||
except OSError as exc: | ||
if exc.winerror == errno.WSAEADDRINUSE: | ||
return "INUSE" | ||
elif exc.winerror == errno.WSAEACCES: | ||
return "ACCESS" | ||
raise | ||
else: | ||
return "Success" | ||
|
||
print(""" | ||
second bind | ||
| default | SO_REUSEADDR | SO_EXCLUSIVEADDRUSE | ||
| specific| wildcard| specific| wildcard| specific| wildcard | ||
first bind ------------------------------------------------------------""" | ||
# default | wildcard | INUSE | Success | ACCESS | Success | INUSE | Success | ||
) | ||
|
||
for i, mode1 in enumerate(modes): | ||
for j, bind_type1 in enumerate(bind_types): | ||
row = [] | ||
for k, mode2 in enumerate(modes): | ||
for l, bind_type2 in enumerate(bind_types): | ||
entry = table_entry(mode1, bind_type1, mode2, bind_type2) | ||
row.append(entry) | ||
#print(mode1, bind_type1, mode2, bind_type2, entry) | ||
print("%19s | %8s | " % (mode1, bind_type1) | ||
+ " | ".join(["%7s" % entry for entry in row])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[tool:pytest] | ||
xfail_strict = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.