-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Python 3.14.0a2 should have raised exception when a socket is already in used, shouldn't it? #127319
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
Comments
I confirm this in the main. It seems, for two processes, the last started process - serves requests. If it's terminated - works the first. At least, seems as a documentation issue for me (nothing in news). |
I believe it's caused by this commit: See also comment: #120485 (comment) |
Based on #120485 (comment) (thanks for the finding, @oskar-skog ), "the kernel may dispatch the request to different server process randomly", which is concerning.
+1 |
I can still reproduce this (and AzureAD/microsoft-authentication-library-for-python#768) on Python 3.14.0b2. Is there any plan to change this behavior before the 3.14.0 final release? |
…servers Prior to issue python#120485 these servers did not allow port reuse, which makes sense as the behavior of port reuse is surprising if you're not expecting it. It's unclear to me why these services were switched to allow port reuse, but I believe the desired behavior (unless subclasses opt in) is to not allow port reuse. See also: https://bugzilla.redhat.com/show_bug.cgi?id=2323170
GH-135405) Prior to issue #120485 these servers did not allow port reuse, which makes sense as the behavior of port reuse is surprising if you're not expecting it. It's unclear to me why these services were switched to allow port reuse, but I believe the desired behavior (unless subclasses opt in) is to not allow port reuse. See also: https://bugzilla.redhat.com/show_bug.cgi?id=2323170
…servers (pythonGH-135405) Prior to issue pythonGH-120485 these servers did not allow port reuse, which makes sense as the behavior of port reuse is surprising if you're not expecting it. It's unclear to me why these services were switched to allow port reuse, but I believe the desired behavior (unless subclasses opt in) is to not allow port reuse. See also: https://bugzilla.redhat.com/show_bug.cgi?id=2323170 (cherry picked from commit 2bd3895) Co-authored-by: Jeremy Cline <jeremycline@linux.microsoft.com>
…servers (pythonGH-135405) Prior to issue python#120485 these servers did not allow port reuse, which makes sense as the behavior of port reuse is surprising if you're not expecting it. It's unclear to me why these services were switched to allow port reuse, but I believe the desired behavior (unless subclasses opt in) is to not allow port reuse. See also: https://bugzilla.redhat.com/show_bug.cgi?id=2323170
Uh oh!
There was an error while loading. Please reload this page.
Bug report
Bug description:
In earlier versions of Python all the way to 3.13, it would not allow a server to listen on a port that has already been used, and rightfully so.
But in Python 3.14.0a2, the second command would also start a server without exception. Is that expected?
CPython versions tested on:
3.14
Operating systems tested on:
Linux
Linked PRs
The text was updated successfully, but these errors were encountered: