Skip to content
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

Add 'address' keyword control binded address #2969 #2974

Merged
merged 5 commits into from
Feb 4, 2021

Conversation

youguanxinqing
Copy link
Contributor

Specify custom address by "address" keyword when use tornado.testing.bind_unused_port function.

"""Binds a server socket to an available port on localhost.

Returns a tuple (socket, port).

.. versionchanged:: 4.4
Always binds to ``127.0.0.1`` without resolving the name
Default binds to ``127.0.0.1`` without resolving the name
Copy link
Contributor

Choose a reason for hiding this comment

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

instead of changing this "versionchanged" block, we probably want a separate "versionchanged block, something like:

    .. versionchanged:: 6.2
       Added optional ``address`` argument to
       override the default "127.0.0.1".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for your review, I got it.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the point was to both keep the original versionchanged and add a new one for the change in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the point was to both keep the original versionchanged and add a new one for the change in this PR.

Sorry for my understanding. I think the code is changed and versionchanged should be removed, and I did so in other projects. But I have just read the tornado.concurrent.py, I find it leaves all previous versionchanged. This is the tornado style, I am pleased to obey it.

@bdarnell
Copy link
Member

bdarnell commented Feb 4, 2021

Thanks!

@bdarnell bdarnell merged commit 78b55a9 into tornadoweb:master Feb 4, 2021
Sign up for free to 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.

4 participants