Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-37228: Fix loop.create_datagram_endpoint()'s usage of SO_REUSEADDR #17311
Conversation
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Nov 21, 2019
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
This comment has been minimized.
This comment has been minimized.
I prefer Antoine's solution as well as far as elegance and API design goes, my only concern is that it would be fairly disruptive with regards to backwards compatibility (from raising an error upon passing Edit: If the consensus is to use Antoine's proposal instead, I can modify this PR accordingly. As long as it's within the next couple of days, I should have the time to do so. If I don't have enough time, I'll close this PR and let someone else implement it. |
aae05e6
to
e3c895c
e3c895c
to
397c9be
This comment has been minimized.
This comment has been minimized.
Due to Windows compatibility concerns, I no longer think that changing |
397c9be
to
d748ca1
@@ -527,6 +529,10 @@ Opening network connections | |||
The *family*, *proto*, *flags*, *reuse_address*, *reuse_port, | |||
*allow_broadcast*, and *sock* parameters were added. | |||
|
|||
.. versionchanged:: 3.5.10 |
This comment has been minimized.
This comment has been minimized.
aeros
Nov 21, 2019
Author
Member
I'm assuming that version 3.5.10 would be the next released 3.5.x, and the earliest version that this change will apply to. Is this correct?
This comment has been minimized.
This comment has been minimized.
ned-deily
Dec 7, 2019
Member
Since this is being added to multiple releases mid-stream, I think the right approach is for each branch to have its own versionchanged value, except perhaps master which would also have the 3.8 version (since 3.9 isn't released yet). So perhaps change this to the right 3.8.x version and then either manually cherry-pick for 3.7 and earlier (which might need to be done anyway if there are merge conflicts) or submit separate post-merge PRs for them to change the versionadded value.
This comment has been minimized.
This comment has been minimized.
aeros
Dec 7, 2019
Author
Member
So perhaps change this to the right 3.8.x version and then either manually cherry-pick for 3.7 and earlier (which might need to be done anyway if there are merge conflicts) or submit separate post-merge PRs for them to change the versionadded value.
Sounds good, I can do that. I'll set master and the 3.8 branch to 3.8.1; 3.7 to 3.7.6; 3.6 to 3.6.10; and 3.5 to 3.5.10. The easiest way to handle this would probably be through using cherry-pick to open the backport PRs manually. As a result, I'll remove the ``needs backport to x` labels, so that @miss-islington doesn't automatically open the backport PRs.
Should we check with @larryhastings regarding the 3.5 backport? I believe it would be appropriate since this is a significant security vulnerability.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Nov 21, 2019
Thanks for making the requested changes! @1st1: please review the changes made to this pull request. |
This comment has been minimized.
This comment has been minimized.
I'll add a Misc/NEWS entry. |
This comment has been minimized.
This comment has been minimized.
The latest round of test failures is being caused by explicitly passing a default value for the reuse_address parameter ( ValueError: socket modifier keyword arguments can not be used when sock is specified. (reuse_address=<object object at 0x7f9335b97be0>) This occurs from: if sock is not None:
...
if (local_addr or remote_addr or
family or proto or flags or
reuse_address or reuse_port or allow_broadcast):
...
raise ValueError(
f'socket modifier keyword arguments can not be used '
f'when sock is specified. ({problems})') My suggested solution is to remove Edit: Fixed. |
This comment has been minimized.
This comment has been minimized.
Based on @ned-deily's suggestion to manually set the If this PR is accepted and merged, I'll use Regarding the "What's New" entries, I would prefer to do those separately to simplify the merge conflicts. I'll have definitely time to take care of this on Monday, but for today and tomorrow I'll likely be busy with finishing up my final exams (last week of the Fall semester). I should have time to make very small changes or reply to feedback, but I will likely not have time to do anything substantial until Monday (Dec 9th), unless I'm able to finish my work early on Sunday. Edit: If any larger changes are needed before Monday, feel free to open a PR to my branch at https://github.com/aeros/cpython/tree/bpo37228-create_datagram_endpoint-reuse_address and I should be able to merge it. I've also ticked |
LGTM |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Dec 9, 2019
@ambv: Please replace |
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
Dec 9, 2019
pythonGH-17311) (cherry picked from commit ab513a3) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Dec 9, 2019
GH-17529 is a backport of this pull request to the 3.8 branch. |
This comment has been minimized.
This comment has been minimized.
Note: merged for 3.8 and 3.9. @aeros removed backport labels to 3.6 and 3.7 here. The issue on BPO still lists those versions as affected. Please fix either way. |
This comment has been minimized.
This comment has been minimized.
This is because they need to be manually backported, due to a difference in the |
pythonGH-17311) (pythonGH-17529) (cherry picked from commit ab513a3) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
python#17311) (cherry picked from commit ab513a3)
…USEADDR (pythonGH-17311). (cherry picked from commit ab513a3) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
aeros commentedNov 21, 2019
•
edited
Edit: This PR has been revised based on @pitrou's proposal, due to Windows compatibility concerns.
https://bugs.python.org/issue37228