Skip to content

bpo-39452: rewrite and expand __main__.rst #26883

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 51 commits into from
Aug 24, 2021

Conversation

jdevries3133
Copy link
Contributor

@jdevries3133 jdevries3133 commented Jun 23, 2021

I am picking up the torch on 39452, continuing where @maggyero left off, and
also implementing
my discourse proposal,
which seemed to be well-liked.

  • __main__docs: intro and first secton
  • bpo-44494: rewrite of Doc/library/__main__.rst (first draft)
  • bpo-44494: add blurb
  • Update __main__.rst
  • Update __main__.rst
  • Take Steven d’Aprano’s review into account
  • Rewrap lines
  • Remove trailing whitespaces

https://bugs.python.org/issue39452

@graingert
Copy link
Contributor

graingert commented Jun 29, 2021

is it worth mentioning runpy?

@jdevries3133
Copy link
Contributor Author

is it work mentioning runpy?

I think so! It's been mentioned; see 4c60f2c

@ambv
Copy link
Contributor

ambv commented Aug 24, 2021

OK, at this point I made all the edits I wanted. Look like @merwok did a pass on that already. If I don't hear back by end of day today, I'll be merging that. Huge improvement over the status quo, thanks for your hard work @jdevries3133.

@merwok
Copy link
Member

merwok commented Aug 24, 2021

I have noted various small things, but don’t have the time to do an overarching review of all changes.

So I’m glad you picked up my request for review and did an editing pass so that this contribution can be merged! Thanks for your and Jack’s efforts on this!

@ambv ambv added the needs backport to 3.10 only security fixes label Aug 24, 2021
@ambv ambv merged commit 7cba231 into python:main Aug 24, 2021
@miss-islington
Copy link
Contributor

Thanks @jdevries3133 for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

@ambv: Please replace # with GH- in the commit message next time. Thanks!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 24, 2021
Broadened scope of the document to explicitly discuss and differentiate between ``__main__.py`` in packages versus the ``__name__ == '__main__'`` expression (and the idioms that surround it), as well as ``import __main__``.

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7cba231)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
@bedevere-bot
Copy link

GH-27932 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Aug 24, 2021
@holdenweb
Copy link
Member

holdenweb commented Aug 24, 2021 via email

miss-islington added a commit that referenced this pull request Aug 24, 2021
Broadened scope of the document to explicitly discuss and differentiate between ``__main__.py`` in packages versus the ``__name__ == '__main__'`` expression (and the idioms that surround it), as well as ``import __main__``.

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Éric Araujo <merwok@netwok.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7cba231)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.