Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

bpo-43292: Fix file leak inET.iterparse() when not exhausted#31696

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

jacobtylerwalls
Copy link
Contributor

@jacobtylerwallsjacobtylerwalls commentedMar 5, 2022
edited by bedevere-bot
Loading

bpo-43292: This fixes the file leak inxml.etree.ElementTree.iterparse when the iterator is garbage collected before being exhausted.

Regression test fails on main.


Related, but not done in this PR:bpo-25707 is a request for an explicitclose() method foriterparse(). I am not certain if that feature would still be desired after this change.

https://bugs.python.org/issue43292

Copy link
Member

@serhiy-storchakaserhiy-storchaka left a comment

Choose a reason for hiding this comment

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

What if pass a path of non-existing file toiterparse(),

@serhiy-storchakaserhiy-storchaka merged commit496c428 intopython:mainMar 7, 2022
@serhiy-storchakaserhiy-storchaka added needs backport to 3.9only security fixes needs backport to 3.10only security fixes type-bugAn unexpected behavior, bug, or error labelsMar 7, 2022
@miss-islington
Copy link
Contributor

Thanks@jacobtylerwalls for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 7, 2022
…onGH-31696)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>(cherry picked from commit496c428)Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
@bedevere-bot
Copy link

GH-31720 is a backport of this pull request to the3.9 branch.

@bedevere-botbedevere-bot removed needs backport to 3.9only security fixes needs backport to 3.10only security fixes labelsMar 7, 2022
@bedevere-bot
Copy link

GH-31721 is a backport of this pull request to the3.10 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMar 7, 2022
…onGH-31696)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>(cherry picked from commit496c428)Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
miss-islington added a commit that referenced this pull requestMar 7, 2022
…1696)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>(cherry picked from commit496c428)Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
serhiy-storchaka pushed a commit that referenced this pull requestMar 7, 2022
…GH-31696) (GH-31720)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>(cherry picked from commit496c428)Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
@jacobtylerwallsjacobtylerwalls deleted the iterparse-file-cleanup branchMarch 7, 2022 13:02
hello-adam pushed a commit to hello-adam/cpython that referenced this pull requestJun 2, 2022
…pythonGH-31696) (pythonGH-31720)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>(cherry picked from commit496c428)Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@serhiy-storchakaserhiy-storchakaserhiy-storchaka approved these changes

Assignees
No one assigned
Labels
type-bugAn unexpected behavior, bug, or error
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@jacobtylerwalls@miss-islington@bedevere-bot@serhiy-storchaka@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp