FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-111246: Remove listening Unix socket on close by CendioOssman · Pull Request #111483 · python/cpython · GitHub

Repository navigation

gh-111246: Remove listening Unix socket on close - #111483

Merged
gvanrossum merged 6 commits into
python:mainfrom
CendioOssman:unix_cleanup
Nov 8, 2023
Merged

gvanrossum merged 6 commits into
python:mainfrom
CendioOssman:unix_cleanup

Conversation

CendioOssman commented Oct 30, 2023 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

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/

ghost commented Oct 30, 2023 •
edited by ghost
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

bedevere-app Bot commented Oct 30, 2023

Copy link
Copy Markdown

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 skip news label instead.

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.

Copy link
Copy Markdown
Member

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).

Copy link
Copy Markdown
Contributor Author

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.

gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LG, two nits. Thanks for helping out!


class UnixServerCleanupTests(unittest.IsolatedAsyncioTestCase):
@socket_helper.skip_unless_bind_unix_socket
async def test_unix_server_addr_cleanup(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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. :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Sure. A commit with comments have been pushed.

Comment thread Doc/whatsnew/3.13.rst

gvanrossum left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks!

Copy link
Copy Markdown
Member

@CendioOssman Could you sign the CLA please so we can merge?

Copy link
Copy Markdown
Contributor Author

It was signed last Tuesday, so it should hopefully be in someone's queue. I got a confirmation from Adobe at least.

Copy link
Copy Markdown
Member

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.

ambv commented Nov 7, 2023

Copy link
Copy Markdown
Contributor

@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.

Copy link
Copy Markdown
Contributor Author

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.

gvanrossum merged commit 74b868f into python:main Nov 8, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Try to clean up the socket file we create so we don't add unused noise to the file system.
CendioOssman deleted the unix_cleanup branch February 28, 2024 10:51
fantix added a commit to MagicStack/uvloop that referenced this pull request Aug 28, 2024
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.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Try to clean up the socket file we create so we don't add unused noise to the file system.
fantix added a commit to MagicStack/uvloop that referenced this pull request Sep 2, 2024
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Listening asyncio UNIX socket isn't removed on close

4 participants


Back | FazBrowse Home | New Git URL