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

bpo-42278: Use tempfile.TemporaryDirectory rather than tempfile.mktemp in pydoc #23200

Merged
merged 6 commits into from
Aug 29, 2021

Conversation

E-Paine
Copy link
Contributor

@E-Paine E-Paine commented Nov 8, 2020

Also replaces a call to os.system with one to subprocess.run

I consider this a fairly trivial change so do not intend to write a blurb for it.

https://bugs.python.org/issue42278

@E-Paine E-Paine changed the title Pydoc use tempfile.NamedTemporaryFile rather than tempfile.mktemp bpo-42278: Pydoc use tempfile.NamedTemporaryFile rather than tempfile.mktemp Nov 8, 2020
@E-Paine
Copy link
Contributor Author

E-Paine commented Nov 8, 2020

Pipelines failed due to an asyncio test and the Ubuntu failure is tkinter related

Lib/pydoc.py Outdated Show resolved Hide resolved
Lib/pydoc.py Outdated Show resolved Hide resolved
@E-Paine
Copy link
Contributor Author

E-Paine commented Nov 13, 2020

@jstasiak thanks for the review! (all your points have been implemented)

Copy link
Contributor

@jstasiak jstasiak left a comment

Choose a reason for hiding this comment

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

Cheers, LGTM.

zooba
zooba previously requested changes Nov 16, 2020
Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

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

Need to wait on an improved NamedTemporaryFile that can close without deleting, so that we don't expect the shell to work on an shared file.

Lib/pydoc.py Outdated Show resolved Hide resolved
@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Dec 17, 2020
@E-Paine
Copy link
Contributor Author

E-Paine commented Mar 14, 2021

Using @serhiy-storchaka's proposal of using TemporaryDirectory, I believe the blocking review is no longer applicable.

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@zooba: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from zooba March 14, 2021 20:01
Lib/pydoc.py Outdated Show resolved Hide resolved
@ambv ambv removed the skip news label Aug 29, 2021
@ambv ambv changed the title bpo-42278: Pydoc use tempfile.NamedTemporaryFile rather than tempfile.mktemp bpo-42278: Use tempfile.TemporaryDirectory rather than tempfile.mktemp in pydoc Aug 29, 2021
@ambv ambv dismissed zooba’s stale review August 29, 2021 10:41

Changes made by the author.

@ambv ambv added needs backport to 3.8 only security fixes needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes and removed stale Stale PR or inactive for long period of time. labels Aug 29, 2021
@ambv ambv merged commit c9227df into python:main Aug 29, 2021
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 29, 2021
…p in pydoc (pythonGH-23200)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Aug 29, 2021
@bedevere-bot
Copy link

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

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Aug 29, 2021
@bedevere-bot
Copy link

GH-28025 is a backport of this pull request to the 3.9 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Aug 29, 2021
…p in pydoc (pythonGH-23200)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
@bedevere-bot
Copy link

GH-28026 is a backport of this pull request to the 3.8 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.8 only security fixes label Aug 29, 2021
ambv pushed a commit that referenced this pull request Aug 29, 2021
…p in pydoc (GH-23200) (GH-28025)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
ambv pushed a commit that referenced this pull request Aug 29, 2021
…p in pydoc (GH-23200) (GH-28026)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
miss-islington added a commit that referenced this pull request Aug 29, 2021
…p in pydoc (GH-23200)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
@E-Paine E-Paine deleted the pydoc-mktemp branch August 29, 2021 16:54
gentoo-bot pushed a commit to gentoo/cpython that referenced this pull request Aug 31, 2021
…p in pydoc (pythonGH-23200) (pythonGH-28026)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit c9227df)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>

(updated for Python 2.7 by Michał Górny)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants