Skip to content
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-100228: Document the os.fork threads DeprecationWarning. #109767

Merged
merged 9 commits into from
Sep 23, 2023

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented Sep 23, 2023

@gpshead gpshead added docs Documentation in the Doc dir skip news needs backport to 3.12 bug and 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
Doc/whatsnew/3.12.rst Outdated Show resolved Hide resolved
Doc/library/concurrent.futures.rst Outdated Show resolved Hide resolved
Doc/library/concurrent.futures.rst Outdated Show resolved Hide resolved
Doc/library/multiprocessing.rst Outdated Show resolved Hide resolved
Doc/library/os.rst Outdated Show resolved Hide resolved
Doc/library/os.rst Outdated Show resolved Hide 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>
Copy link
Member

@hugovk hugovk left a comment

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.

Doc/library/concurrent.futures.rst Outdated Show resolved Hide resolved
Doc/library/os.rst Outdated Show resolved Hide resolved
gpshead 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>
Copy link
Member

@AA-Turner AA-Turner left a comment

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
21 checks passed
@miss-islington
Copy link
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
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 23, 2023
…thonGH-109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳

(cherry picked from commit 5e7ea95)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Sep 23, 2023

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 bug and security fixes label Sep 23, 2023
Copy link
Member

@malemburg malemburg left a comment

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.

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.

Copy link
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.

Copy link
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.

gpshead added a commit to miss-islington/cpython that referenced this pull request Sep 23, 2023
Include the link to the discussion in the what's new text per @malemberg's comment on. python#109767

(i'll follow up with a PR to main to include this edit there as well)
Yhg1s pushed a commit that referenced this pull request Sep 24, 2023
…H-109767) (#109773)

* gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳

(cherry picked from commit 5e7ea95)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* link to the discussion thread from whatsnew

Include the link to the discussion in the what's new text per @malemberg's comment on. #109767

(i'll follow up with a PR to main to include this edit there as well)

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
gpshead added a commit that referenced this pull request Sep 24, 2023
A post main merge edit to the text was added in the 3.12 backport PR.
  e38d710

This includes that in main.  It's a minor edit over #109767 to resolve the comment there.
github-actions bot pushed a commit to m-aciek/python-docs-weblate that referenced this pull request Sep 24, 2023
…H-109767) (#109773)

* gh-100228: Document the os.fork threads DeprecationWarning. (GH-109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳

(cherry picked from commit 5e7ea95d9d5c3b80a67ffbeebd76ce4fc327dd8e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

* link to the discussion thread from whatsnew

Include the link to the discussion in the what's new text per @malemberg's comment on. python/cpython#109767

(i'll follow up with a PR to main to include this edit there as well)

---------

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

CPython-sync-commit: 62df559448362f9a4291661d64aee30474dec025
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
…thon#109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳 

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
…09807)

A post main merge edit to the text was added in the 3.12 backport PR.
  python@e38d710

This includes that in main.  It's a minor edit over python#109767 to resolve the comment there.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…thon#109767)

Document the `os.fork` posix threads detected `DeprecationWarning` in 3.12 What's New, os, multiprocessing, and concurrent.futures docs.

Many reviews and doc cleanup edits by Adam & Hugo. 🥳 

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
…09807)

A post main merge edit to the text was added in the 3.12 backport PR.
  python@e38d710

This includes that in main.  It's a minor edit over python#109767 to resolve the comment there.
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