-
-
Notifications
You must be signed in to change notification settings - Fork 353
Simplify sockets #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify sockets #670
Changes from 46 commits
e404d40
3fcd475
711e7b4
8ea86ab
268cc33
b9ee0d7
7bbb52b
1b50f2a
fc666c2
9217753
1f01599
b764a97
7118f9b
6c93661
37afde1
1e438e3
305db2d
f7fe91b
fc30951
97bc5a8
ecdcdf2
638ab9a
94042ce
583570d
6ad0d73
c7d1391
7fa93e8
0c27ae2
f8ce585
762cd8d
bc53484
ef2309b
ca86946
8f066c1
0e690f8
66f5330
9ac6d34
bd9a952
7f142f9
39a84f7
2453587
f1d45a7
2ce378d
caead79
ad2e09f
c43ced7
70c9fd9
3b7cb99
9b8dc48
4cf0c77
59a899d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Reworked :mod:`trio.socket` namespace construction, making it more understandable by static analysis tools. This should improve tab completion in editors, reduce false positives from pylint, and is another step towards providing type hints. | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -858,8 +858,8 @@ def _return_value_looks_like_wrong_library(value): | |
"trio was expecting an async function, but instead it got " | ||
"{!r} – are you trying to use a library written for " | ||
"asyncio/twisted/tornado or similar? That won't work " | ||
"without some sort of compatibility shim." | ||
.format(async_fn) | ||
"without some sort of compatibility shim.". | ||
format(async_fn) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I upgraded yapf (#694), so I think you need to merge from master and then re-run yapf (using 0.24.0) before we can merge. Hopefully that will fix these weird formatting issues too... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guess what ;-) now yapf fails with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, you definitely need yapf 0.24.0 |
||
) from None | ||
|
||
raise | ||
|
@@ -874,8 +874,8 @@ def _return_value_looks_like_wrong_library(value): | |
raise TypeError( | ||
"start_soon got unexpected {!r} – are you trying to use a " | ||
"library written for asyncio/twisted/tornado or similar? " | ||
"That won't work without some sort of compatibility shim." | ||
.format(coro) | ||
"That won't work without some sort of compatibility shim.". | ||
format(coro) | ||
) | ||
|
||
if isasyncgen(coro): | ||
|
@@ -887,8 +887,9 @@ def _return_value_looks_like_wrong_library(value): | |
# Give good error for: nursery.start_soon(some_sync_fn) | ||
raise TypeError( | ||
"trio expected an async function, but {!r} appears to be " | ||
"synchronous" | ||
.format(getattr(async_fn, "__qualname__", async_fn)) | ||
"synchronous".format( | ||
getattr(async_fn, "__qualname__", async_fn) | ||
) | ||
) | ||
|
||
###### | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it, it's going to be kind of weird-looking in our final change log to have multiple almost-identical entries with just the module name changed.
Since #542 is already an umbrella bug for these changes, how about we drop this file, and instead modify the existing
542.feature.rst
to cover the new work as well? And while we're at it, we can add mention of the work in #656 to fixtrio.testing
... so it can say something like:"Reworked :mod:
trio
, :mod:trio.testing
, and :mod:trio.socket
namespace construction, making them more understandable..."Also BTW, newsfragments shouldn't start with a
*
. Towncrier will automatically add a*
when it assembles the release notes, and then things will look weird if we have two*
s :-)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, makes sense. I'll correct this later this day, currently commuting. I actually put this in in haste to have a change, before I learned that I could actually do an empty commit.