Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Conversation

jimfulton
Copy link

@1st1
Copy link
Member

1st1 commented Jul 9, 2016

I don't like the name -- how about wrap_socket()?

@jimfulton
Copy link
Author

wrap_socket implies that it's for wrapping client or server sockets, but it's not. It's only for handling server sockets. Also, I prefer a name that reflects goal, not mechanism.

I think the name should be discussed over here: https://bugs.python.org/issue27392.

@gvanrossum
Copy link
Member

What's wrong with the Python 3.4 tests on Windows (AppVeyor)?

Can we share more code between this and _create_connection_transport()?

I'll deliberate the name in the Python tracker issue.

@jimfulton
Copy link
Author

I have no idea WRT Python 3.4 on windows. It seems to be hanging. I don't have a windows development environment. Do you by any chance know where I can find a good howto for setting one up?

@jimfulton
Copy link
Author

Just a note WRT the name: Really it's about more than the name. @1st1 argues that there should be a new API for wrapping already-connected sockets, for both clients and servers, and that create_connection shouldn't accept connected sockets. I think this is a pretty good argument.

@jimfulton
Copy link
Author

WRT sharing code, I guess I could make _create_connection_transport handle both the client and server case. I'll do that.

@jimfulton
Copy link
Author

OK, more sharing. Maybe I'll be lucky and the windows tests will pass. :)

@gvanrossum
Copy link
Member

gvanrossum commented Jul 10, 2016 via email

@@ -980,6 +981,25 @@ def create_server(self, protocol_factory, host=None, port=None,
return server

@coroutine
def connect_accepted_socket(self, protocol_factory, sock, ssl=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make ssl a keyword-only argument (as it is in create_connection and create_server).

@1st1
Copy link
Member

1st1 commented Jul 11, 2016

Aside from a couple of nits it looks good.

@jimfulton
Copy link
Author

The tests hanging for the ProactorEventLoop with SSL. I'll skip that case.

BTW, running tests verbosely is helpful for cases like this. Is there any harm in always running the appveyor tests verbosely?

@1st1
Copy link
Member

1st1 commented Jul 11, 2016

The tests hanging for the ProactorEventLoop with SSL. I'll skip that case.

Strange, sounds like we need to open an issue for this (but it shouldn't block this PR).

BTW, running tests verbosely is helpful for cases like this. Is there any harm in always running the appveyor tests verbosely?

Yes, it makes sense. Can you make a separate PR to run tests in verbose mode both for Travis and AppVeyor?

@jimfulton
Copy link
Author

The tests hanging for the ProactorEventLoop with SSL. I'll skip that case.

Strange, sounds like we need to open an issue for this (but it shouldn't
block this PR).

No, It's documented:
https://docs.python.org/3/library/asyncio-eventloops.html#windows

BTW, running tests verbosely is helpful for cases like this. Is there any
harm in always running the appveyor tests verbosely?

Yes, it makes sense. Can you make a separate PR to run tests in verbose
mode both for Travis and AppVeyor?

Sure.

Jim

Jim Fulton
http://jimfulton.info

@jimfulton
Copy link
Author

OK, all tests passing. Assuming this is merged, I'll update the docs. Where do I do that?

@1st1
Copy link
Member

1st1 commented Jul 11, 2016

LGTM. Will merge it in a few hours.

OK, all tests passing. Assuming this is merged, I'll update the docs. Where do I do that?

@gvanrossum Should we copy asyncio docs from CPython to this repo and update the update_stdlib.sh script to handle that?

@gvanrossum
Copy link
Member

gvanrossum commented Jul 11, 2016 via email

@jimfulton
Copy link
Author

Can this be merged? If it is, will it be in 3.6? I'm happy to update the docs wherever.

@1st1 1st1 merged commit f3fd759 into python:master Jul 12, 2016
@1st1
Copy link
Member

1st1 commented Jul 12, 2016

Can this be merged? If it is, will it be in 3.6? I'm happy to update the docs wherever.

Merged. Yes, it will be in 3.6 (and I'll add it to uvloop in a couple of days).

For the docs please upload a patch to https://bugs.python.org/issue27392.

@gvanrossum

I think it may be time actually to give up on this github repo and focus
all development in the CPython repo. Especially since I also think that
asyncio should drop the "provisional" status in Python 3.6.

Please let's wait until CPython migrates to GitHub. I like code review workflow here much better.

ronf pushed a commit to ronf/asyncio that referenced this pull request Aug 31, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants