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

Appearance settings

gh-134664: Document cleanup_socket parameter in asyncio.start_unix_server() #134750

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

Merged
merged 3 commits into from
May 27, 2025

Conversation

ashm-dev
Copy link
Contributor

@ashm-dev ashm-dev commented May 26, 2025

Summary

This PR adds documentation for the cleanup_socket parameter in asyncio.start_unix_server() function, which was added in Python 3.13 with a default value of True. This parameter controls whether the Unix socket is automatically removed from the filesystem when the server is closed.

Details

In Python 3.13, a feature was added where Unix sockets are automatically cleaned up by default when using asyncio.start_unix_server(). This was considered a breaking change, but it wasn't properly documented at the time of implementation.

This PR:

  • Adds the cleanup_socket parameter to the function signature in the documentation
  • Adds a description of what the parameter does
  • Adds a version note indicating this was added in Python 3.13

Related Issues

Closes #134664
Related to #133354


📚 Documentation preview 📚: https://cpython-previews--134750.org.readthedocs.build/

…nix_server()

Document that in Python 3.13, the cleanup_socket parameter was added to
asyncio.start_unix_server() with a default value of True. This parameter
controls whether the Unix socket is automatically removed from the
filesystem when the server is closed.
Doc/library/asyncio-stream.rst Outdated Show resolved Hide resolved
@ashm-dev ashm-dev force-pushed the asyncio-cleanu-socket branch from b092cb5 to f853464 Compare May 27, 2025 07:55
@ashm-dev ashm-dev requested a review from kumaraditya303 May 27, 2025 07:56
@kumaraditya303 kumaraditya303 added topic-asyncio needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 27, 2025
@ashm-dev ashm-dev force-pushed the asyncio-cleanu-socket branch from f853464 to 587f2d7 Compare May 27, 2025 08:14
@kumaraditya303 kumaraditya303 enabled auto-merge (squash) May 27, 2025 08:17
@kumaraditya303 kumaraditya303 merged commit 92ea1eb into python:main May 27, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs May 27, 2025
@miss-islington-app
Copy link

Thanks @ashm-dev for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2025
…t_unix_server` (pythonGH-134750)

(cherry picked from commit 92ea1eb)

Co-authored-by: Shamil <ashm.tech@proton.me>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2025
…t_unix_server` (pythonGH-134750)

(cherry picked from commit 92ea1eb)

Co-authored-by: Shamil <ashm.tech@proton.me>
@bedevere-app
Copy link

bedevere-app bot commented May 27, 2025

GH-134779 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 27, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 27, 2025

GH-134780 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 27, 2025
@ashm-dev ashm-dev deleted the asyncio-cleanu-socket branch May 27, 2025 08:24
kumaraditya303 pushed a commit that referenced this pull request May 27, 2025
…rt_unix_server` (GH-134750) (#134780)

gh-134664: document `cleanup_socket` parameter in `asyncio.start_unix_server` (GH-134750)
(cherry picked from commit 92ea1eb)

Co-authored-by: Shamil <ashm.tech@proton.me>
kumaraditya303 pushed a commit that referenced this pull request May 27, 2025
…rt_unix_server` (GH-134750) (#134779)

gh-134664: document `cleanup_socket` parameter in `asyncio.start_unix_server` (GH-134750)
(cherry picked from commit 92ea1eb)

Co-authored-by: Shamil <ashm.tech@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news topic-asyncio
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

asyncio.start_unix_server() cleanup_socket defaulting to true in 3.13 is not documented
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.