Skip to content

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

Merged
ambv merged 6 commits into
python:mainfrom
E-Paine:pydoc-mktemp
Aug 29, 2021
Merged

bpo-42278: Use tempfile.TemporaryDirectory rather than tempfile.mktemp in pydoc#23200
ambv merged 6 commits into
python:mainfrom
E-Paine:pydoc-mktemp

Conversation

@E-Paine
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

E-Paine commented Nov 8, 2020

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

Comment thread Lib/pydoc.py Outdated
Comment thread Lib/pydoc.py Outdated
@E-Paine
Copy link
Copy Markdown
Contributor Author

E-Paine commented Nov 13, 2020

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

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

Comment thread Lib/pydoc.py Outdated
@bedevere-bot
Copy link
Copy Markdown

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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
Comment thread Lib/pydoc.py Outdated
@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 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
Copy Markdown
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
Copy Markdown

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

@bedevere-bot
Copy link
Copy Markdown

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
Copy Markdown

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

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.

9 participants