Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-88968: Reject socket that is already used as a transport#98010

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gvanrossum merged 4 commits intopython:mainfromgvanrossum:reject-sock-reuse
Oct 7, 2022

Conversation

gvanrossum
Copy link
Member

@gvanrossumgvanrossum commentedOct 7, 2022
edited by bedevere-bot
Loading

Add a check to_make_socket_transport() that a socket passed in isn't already in use by a transport.
If it was, this would indicate that someone had closed the socket but not the transport (or the writer built on top of it).

@kumaraditya303
Copy link
Contributor

I think SSL socket and datagram have the same issue though I haven't verified this. Perhaps also add this check to_make_datagram_transport and_make_ssl_transport?

@gvanrossum
Copy link
MemberAuthor

Done.

I worried a bit about how thoughly to test this, but then realized that this code is tested every time a transport is created using one of these functions -- even if the user didn't passsock=..., since it is called if the socket was created by the higher-level code (e.g.create_connection) too.

Copy link
Contributor

@kumaraditya303kumaraditya303 left a comment

Choose a reason for hiding this comment

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

LGTM, I think news can be skipped as the change is very small, leaving up to you to decide.

@gvanrossumgvanrossum merged commitc062764 intopython:mainOct 7, 2022
@gvanrossumgvanrossum deleted the reject-sock-reuse branchOctober 7, 2022 19:57
carljm added a commit to carljm/cpython that referenced this pull requestOct 8, 2022
* main: (38 commits)pythongh-92886: make test_ast pass with -O (assertions off) (pythonGH-98058)pythongh-92886: make test_coroutines pass with -O (assertions off) (pythonGH-98060)pythongh-57179: Add note on symlinks for os.walk (python#94799)pythongh-94808: Fix regex on exotic platforms (python#98036)pythongh-90085: Remove vestigial -t and -c timeit options (python#94941)pythonGH-83901: Improve Signature.bind error message for missing keyword-only params (python#95347)pythongh-61105: Add default param, note on using cookiejar subclass (python#95427)pythongh-96288: Add a sentence to `os.mkdir`'s docstring. (python#96271)pythongh-96073: fix backticks in NEWS entry (pythonGH-98056)pythongh-92886: [clinic.py] raise exception on invalid input instead of assertion (pythonGH-98051)pythongh-97997: Add col_offset field to tokenizer and use that for AST nodes (python#98000)pythonGH-88968: Reject socket that is already used as a transport (python#98010)pythongh-96346: Use double caching for re._compile() (python#96347)pythongh-91708: Revert params note in urllib.parse.urlparse table (python#96699)pythongh-96265: Fix some formatting in faq/design.rst (python#96924)pythongh-73196: Add namespace/scope clarification for inheritance section (python#92840)pythongh-97646: Change `.js` and `.mjs` files mimetype to conform to RFC 9239 (python#97934)pythongh-97923: Always run Ubuntu SSL tests with others in CI (python#97940)pythongh-97956: Mention `generate_global_objects.py` in `AC How-To` (python#97957)pythongh-96959: Update HTTP links which are redirected to HTTPS (python#98039)  ...
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@gvanrossum@kumaraditya303@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp