-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
gh-111246: Remove listening Unix socket on close #111483
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Try to clean up the socket file we create so we don't add unused noise to the file system.
We only want to clean up *our* socket, so try to determine if we still own this address or if something else has replaced it.
Allow the implicit cleanup to be disabled in case there are some odd corner cases where this causes issues.
14a46a9
to
93571fe
Compare
Once review has started (now) please don't force-push -- just add additional commits, otherwise review will be more work. We'll squash merge the final approved PR anyway. Also, merging main is usually not needed (GitHub is a bit pushy around that). |
Ah, sorry. I'm used to the Linux kernel model where you churn the patch set until you have a history everyone is happy with. :) I guess that means my careful splitting into distinct features wasn't necessary either. :) FYI, the CLA is in progress via the slower organization route. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG, two nits. Thanks for helping out!
@@ -147,6 +149,74 @@ async def serve(*args): | |||
await task2 | |||
|
|||
|
|||
class UnixServerCleanupTests(unittest.IsolatedAsyncioTestCase): | |||
@socket_helper.skip_unless_bind_unix_socket | |||
async def test_unix_server_addr_cleanup(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding one-line comments to the new tests explaining what each test checks? They look so similar I first thought you had accidentally copied the test a few times. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. A commit with comments have been pushed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@CendioOssman Could you sign the CLA please so we can merge? |
It was signed last Tuesday, so it should hopefully be in someone's queue. I got a confirmation from Adobe at least. |
Okay, I'll wait a bit for our side to update the database then. |
@CendioOssman, in the case of corporate CLAs we still need you to click through the personal CLA signing route to mark your email as green. We don't use blanket email domain approvals. |
Ah. The link said I should use the manual form "instead", so I never proceeded with the GitHub form. I've clicked through the personal approval as well now. |
Try to clean up the socket file we create so we don't add unused noise to the file system.
This is derived from python/cpython#111483 but available on all Python versions with uvloop, only that it's only enabled by default for Python 3.13 and above to be consistent with CPython behavior.
This is derived from python/cpython#111483 but available on all Python versions with uvloop, only that it's only enabled by default for Python 3.13 and above to be consistent with CPython behavior.
Try to clean up the socket file we create so we don't add unused noise to the file system.
This is derived from python/cpython#111483 but available on all Python versions with uvloop, only that it's only enabled by default for Python 3.13 and above to be consistent with CPython behavior. * Also add Python 3.13 to CI (#610) * Enable CI in debug mode * Fix CI to include [dev] --------- Co-authored-by: Fantix King <fantix.king@gmail.com>
Relieve developers from the burden of manually cleaning up their Unix sockets by having asyncio take care of that internally.
Fixes #111246.
📚 Documentation preview 📚: https://cpython-previews--111483.org.readthedocs.build/