FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-130132: add an explicit close() call to urlopen examples without with by Mr-Sunglasses · Pull Request #130280 · python/cpython · GitHub

Repository navigation

gh-130132: add an explicit close() call to urlopen examples without with - #130280

Merged
picnixz merged 11 commits into
python:mainfrom
Mr-Sunglasses:fix/130132
Mar 18, 2025
Merged

picnixz merged 11 commits into
python:mainfrom
Mr-Sunglasses:fix/130132

Conversation

Mr-Sunglasses commented Feb 18, 2025 •
edited by github-actions Bot
Loading

Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor Author

@sobolevn @picnixz ptal.

opk12 commented Feb 18, 2025

Copy link
Copy Markdown

Thanks for correcting the missing close() bug in one example, there are 2 remaining.

Copy link
Copy Markdown
Contributor Author

Thanks for correcting the missing close() bug in one example, there are 2 remaining.

Thanks @opk12 for suggestions, added it in the remaining examples.

Comment thread Doc/library/urllib.request.rst Outdated

Copy link
Copy Markdown
Contributor Author

@sobolevn I have made the requested changes; please review again.

bedevere-app Bot commented Feb 20, 2025

Copy link
Copy Markdown

Thanks for making the requested changes!

: please review the changes made to this pull request.

Copy link
Copy Markdown
Contributor Author

@sobolevn I have made the requested changes; please review again.

bedevere-app Bot commented Feb 24, 2025

Copy link
Copy Markdown

Thanks for making the requested changes!

: please review the changes made to this pull request.

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

let's use 4 spaces

Comment thread Doc/library/urllib.request.rst Outdated
Comment thread Doc/library/urllib.request.rst Outdated
Mr-Sunglasses and others added 2 commits February 26, 2025 01:34
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: sobolevn <mail@sobolevn.me>

Mr-Sunglasses left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@sobolevn I have made the requested changes; please review again.

Copy link
Copy Markdown
Contributor Author

Requesting @sobolevn , @picnixz for review.

picnixz self-requested a review February 28, 2025 21:27

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There are some usages of opener.open (L1319, L1340) that could be in a "with". Please check the entire file with occurrences of open and urlopen. TiA.

Mr-Sunglasses left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@picnixz I've make the requested changes. please review again 😄 .

TiA. 🙏🏻

Mr-Sunglasses requested a review from picnixz March 9, 2025 18:20
picnixz self-assigned this Mar 12, 2025
Comment thread Doc/library/urllib.request.rst Outdated
Comment thread Doc/library/urllib.request.rst Outdated
Comment thread Doc/library/urllib.request.rst Outdated
Comment thread Doc/library/urllib.request.rst Outdated
Other examples use `f` as the response variable.
picnixz added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Mar 18, 2025
picnixz enabled auto-merge (squash) March 18, 2025 09:23
picnixz merged commit 77d2fd4 into python:main Mar 18, 2025
github-project-automation Bot moved this from Todo to Done in Docs PRs Mar 18, 2025

Copy link
Copy Markdown

Thanks @Mr-Sunglasses for the PR, and @picnixz for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 18, 2025
…pythonGH-130280)

(cherry picked from commit 77d2fd4)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

bedevere-app Bot commented Mar 18, 2025

Copy link
Copy Markdown

GH-131394 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Mar 18, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Mar 18, 2025
…pythonGH-130280)

(cherry picked from commit 77d2fd4)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>

bedevere-app Bot commented Mar 18, 2025

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.12 only security fixes label Mar 18, 2025
picnixz added a commit that referenced this pull request Mar 18, 2025
GH-130280) (#131394)

gh-130132: properly free resources in `urrlib.urlopen` examples (GH-130280)
(cherry picked from commit 77d2fd4)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Mar 18, 2025
GH-130280) (#131395)

gh-130132: properly free resources in `urrlib.urlopen` examples (GH-130280)
(cherry picked from commit 77d2fd4)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
colesbury pushed a commit to colesbury/cpython that referenced this pull request Mar 20, 2025
…python#130280)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Status: Done

Development

Successfully merging this pull request may close these issues.

docs: add an explicit close() call to urlopen examples without with

4 participants


Back | FazBrowse Home | New Git URL