Skip to content

socket.create_connection source_address is optional. - #4133

Merged
srittau merged 4 commits into
python:masterfrom
bwelling:patch-1
May 28, 2020
Merged

socket.create_connection source_address is optional.#4133
srittau merged 4 commits into
python:masterfrom
bwelling:patch-1

Conversation

@bwelling

Copy link
Copy Markdown
Contributor

Fixes#4116.

Comment threadstdlib/2and3/socket.pyi Outdated
def create_connection(address: Tuple[Optional[str], int],
timeout: Optional[float] = ...,
source_address: Tuple[Union[bytearray, bytes, Text], int] = ...) -> socket: ...
source_address: Optional[Tuple[Union[bytearray, bytes, Text], int\] = ...) -> socket: ...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

These seems to be an extraneous backslash here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah sorry, the backslash was probably supposed to be a closing bracket. So this is missing now. :)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Sorry about that. Should be better now.

@srittau

Copy link
Copy Markdown
Collaborator

@bwelling Nearly there. Stubtest fails, because socket.create_connection was on its whitelist: tests/stubtest_whitelists/py3_common.txt. Since your PR fixes this problem, it needs to removed from there.

@srittau

Copy link
Copy Markdown
Collaborator

Travis-CI seems to hiccup, but it passed now: https://travis-ci.org/github/python/typeshed/builds/692261015

@srittau
srittau merged commit 0bed1d3 into python:masterMay 28, 2020
vishalkuo pushed a commit to vishalkuo/typeshed that referenced this pull request Jun 26, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

socket.create_connection source_address should be optional

3 participants

@bwelling@srittau@JelleZijlstra