Skip to content

gh-100228: Document the os.fork threads DeprecationWarning. - #109767

Merged
gpshead merged 9 commits into
python:mainfrom
gpshead:docs/fork_threads_warning
Sep 23, 2023
Merged

gpshead merged 9 commits into
python:mainfrom
gpshead:docs/fork_threads_warning

Conversation

@gpshead

@gpshead gpshead commented Sep 23, 2023 •

Copy link
Copy Markdown
Member

@gpshead gpshead added docs Documentation in the Doc dir skip news needs backport to 3.12 only security fixes labels Sep 23, 2023
@gpshead gpshead changed the title Document the os.fork threads DeprecationWarning. gh-100228: Document the os.fork threads DeprecationWarning. Sep 23, 2023
@gpshead
gpshead marked this pull request as ready for review September 23, 2023 00:20
@gpshead
gpshead requested a review from hugovk September 23, 2023 00:20
Comment thread Doc/whatsnew/3.12.rst Resolved
Comment thread Doc/library/concurrent.futures.rst Resolved
Comment thread Doc/library/concurrent.futures.rst Resolved
Comment thread Doc/library/multiprocessing.rst Resolved
Comment thread Doc/library/os.rst Resolved
Comment thread Doc/library/os.rst Resolved
gpshead and others added 6 commits September 22, 2023 21:09
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

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

Looks good, couple of suggestions.

Comment thread Doc/library/concurrent.futures.rst Resolved
Comment thread Doc/library/os.rst Resolved
Gregory P. Smith and others added 2 commits September 22, 2023 21:53
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

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

Thanks!

A

@gpshead
gpshead enabled auto-merge (squash) September 23, 2023 05:03
@gpshead
gpshead merged commit 5e7ea95 into python:main Sep 23, 2023
@miss-islington

ghost commented Sep 23, 2023

Copy link
Copy Markdown
Contributor

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@gpshead
gpshead deleted the docs/fork_threads_warning branch September 23, 2023 05:04
@bedevere-app

ghost commented Sep 23, 2023

Copy link
Copy Markdown

GH-109773 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Sep 23, 2023

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

Thanks for adding these clarifications and warnings.

Apart from the change in the "What's new" I think this is good to go.

Comment thread Doc/whatsnew/3.12.rst
We added the warning to to raise awareness as issues encounted by code doing
this are becoming more frequent. See the :func:`os.fork` documentation for
more details.

ghost Sep 23, 2023

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.

I would copy the paragraph from the os.fork() docs here as well, to make it easier for people to find the reasoning behind this:

See `this discussion on fork being incompatible with threads
<https://discuss.python.org/t/33555>`_
for technical details of why we're surfacing this longstanding
platform compatibility problem to developers.

ghost Sep 23, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, I included that (edited) over in the 3.12 backport #109773. I'll make the same edit in main after that is merged.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants