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

gh-102120: Added an iter function that doesn't cache#102128

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
ethanfurman merged 11 commits intopython:mainfromPurityLake:gh-102120-fix-tar-cache
May 23, 2023

Conversation

@PurityLake
Copy link
Contributor

@PurityLakePurityLake commentedFeb 21, 2023
edited
Loading

Refers to#102120

This is a proposed solution to the linked issue which is to provide a way to iterate over a tar object so that it doesn't cache.

My suggestion is to reuse the code fromTarfile._next() to yield a tarinfo each time instead of caching it. This way it doesn't take up a tonne of memory.

I am looking for feedback on this so I will mark this as a draft.

Edit:

As from suggestions a parameter called stream can be passed to the object which will make sure nothing is cached. I will add a code example later today.

@ethanfurman
Copy link
Member

I would rather add a new keyword to theTarFile signature -- perhapsstream -- and update the relevent locations in the code to not updatemembers.

spenczar reacted with thumbs up emoji

@PurityLake
Copy link
ContributorAuthor

That would probably be better

@arhadthedevarhadthedev added the stdlibStandard Library Python modules in the Lib/ directory labelFeb 25, 2023
@PurityLake
Copy link
ContributorAuthor

I'll be adding some tests later today

@PurityLakePurityLake marked this pull request as ready for reviewMarch 8, 2023 20:08
@PurityLake
Copy link
ContributorAuthor

I believe this is working as intended now. I'm open to criticism in the implementation

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Copy link
Member

@ethanfurmanethanfurman left a comment

Choose a reason for hiding this comment

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

Overall, looks good. I missed feature-freeze, though, so this will have to go in 3.13. Update the3.12s to3.13s and I'll get it merged.

@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 phraseI 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.

@PurityLake
Copy link
ContributorAuthor

@ethanfurman I went ahead and did that, thanks for reviewing it. It's too bad it didn't make it in before feature freeze but oh well.

@PurityLake
Copy link
ContributorAuthor

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

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

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ethanfurmanethanfurmanethanfurman approved these changes

Assignees

No one assigned

Labels

stdlibStandard Library Python modules in the Lib/ directory

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@PurityLake@ethanfurman@bedevere-bot@arhadthedev

[8]ページ先頭

©2009-2025 Movatter.jp