GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-134664: Document cleanup_socket parameter in asyncio.start_unix_server() by ashm-dev · Pull Request #134750 · python/cpython

Conversation

@ashm-dev

@ashm-dev ashm-dev commented May 26, 2025 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • Issue: asyncio.start_unix_server() cleanup_socket defaulting to true in 3.13 is not documented #134664

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

efimov-mikhail reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@ashm-dev
pythongh-134664: Document cleanup_socket parameter in asyncio.start_u…
f8e541a
…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.
@ashm-dev
ashm-dev requested review from 1st1, asvetlov, kumaraditya303 and willingc as code owners May 26, 2025 20:34
@bedevere-app bedevere-app Bot added the awaiting review label May 26, 2025
@bedevere-app bedevere-app Bot mentioned this pull request May 26, 2025
asyncio.start_unix_server() cleanup_socket defaulting to true in 3.13 is not documented #134664
Closed
@bedevere-app bedevere-app Bot added docs Documentation in the Doc dir skip news labels May 26, 2025
@github-project-automation github-project-automation Bot added this to Docs PRs May 26, 2025
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs May 26, 2025
kumaraditya303
kumaraditya303 reviewed May 27, 2025
View reviewed changes
Comment thread Doc/library/asyncio-stream.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@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 only security fixes needs backport to 3.14 bugs and security fixes labels May 27, 2025
@ashm-dev
fix
587f2d7
@ashm-dev
ashm-dev force-pushed the asyncio-cleanu-socket branch from f853464 to 587f2d7 Compare May 27, 2025 08:14
kumaraditya303
kumaraditya303 approved these changes May 27, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels May 27, 2025
@ashm-dev
Merge branch 'main' into asyncio-cleanu-socket
df36a82
@kumaraditya303
kumaraditya303 enabled auto-merge (squash) May 27, 2025 08:17
@kumaraditya303
kumaraditya303 merged commit 92ea1eb into python:main May 27, 2025
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs May 27, 2025
@miss-islington-app

miss-islington-app Bot commented May 27, 2025

Copy link
Copy Markdown

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

ashm-dev reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label May 27, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2025
@ashm-dev @miss-islington
pythongh-134664: document cleanup_socket parameter in `asyncio.star…
096623a
…t_unix_server` (pythonGH-134750)

(cherry picked from commit 92ea1eb)

Co-authored-by: Shamil <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2025
@ashm-dev @miss-islington
pythongh-134664: document cleanup_socket parameter in `asyncio.star…
35b369b
…t_unix_server` (pythonGH-134750)

(cherry picked from commit 92ea1eb)

Co-authored-by: Shamil <[email protected]>
@bedevere-app

bedevere-app Bot commented May 27, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

bedevere-app Bot commented May 27, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only 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
@miss-islington @ashm-dev
[3.13] gh-134664: document cleanup_socket parameter in `asyncio.sta…
a5f281f
…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 <[email protected]>
kumaraditya303 pushed a commit that referenced this pull request May 27, 2025
@miss-islington @ashm-dev
[3.14] gh-134664: document cleanup_socket parameter in `asyncio.sta…
0f93b2f
…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 <[email protected]>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
@ashm-dev @Pranjal095
pythongh-134664: document cleanup_socket parameter in `asyncio.star…
0e08f59
…t_unix_server` (python#134750)
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
@ashm-dev @taegyunkim
pythongh-134664: document cleanup_socket parameter in `asyncio.star…
827dc25
…t_unix_server` (python#134750)
gostak-dd pushed a commit to gostak-dd/cpython that referenced this pull request Jun 2, 2026
@ashm-dev @gostak-dd
pythongh-134664: document cleanup_socket parameter in `asyncio.star…
8f4011e
…t_unix_server` (python#134750)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 kumaraditya303 approved these changes
@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner
@willingc willingc Awaiting requested review from willingc willingc is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip news topic-asyncio

Projects

Docs PRs
Status: Done

Milestone

No milestone

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

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@ashm-dev @kumaraditya303
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.