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

Add _file in class SpooledTemporaryFile in tempfile.pyi #10327

Merged
merged 11 commits into from Jun 24, 2023
Merged

Conversation

heysujal
Copy link
Contributor

@heysujal heysujal commented Jun 18, 2023

@Dr-Irv This is a draft PR that attempts to close #10286
I have _file attribute in class SpooledTemporaryFile using hints given by @Akuli in #10286
So, please provide feedback and let me know if there are any changes to make.
On further looking into documentation I found that there can also be a true file object that needs to be returned depending on whether rollover() has been called
I can add it later once I get feedback or might make another PR if required.

P.S. I ran the tests before making a PR and it was all good. But they are failing here for some reason.

@github-actions

This comment has been minimized.

@heysujal heysujal marked this pull request as ready for review June 20, 2023 08:56
Copy link
Collaborator

@Akuli Akuli left a comment

Choose a reason for hiding this comment

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

This was trickier than I thought, but I figured it out :)

stdlib/tempfile.pyi Outdated Show resolved Hide resolved
stdlib/tempfile.pyi Outdated Show resolved Hide resolved
heysujal and others added 2 commits June 22, 2023 14:19
Co-authored-by: Akuli <akuviljanen17@gmail.com>
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Copy link
Collaborator

@Akuli Akuli left a comment

Choose a reason for hiding this comment

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

Thanks!

stdlib/tempfile.pyi Outdated Show resolved Hide resolved
@heysujal heysujal requested review from Akuli and Dr-Irv June 23, 2023 15:05
@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@Akuli Akuli merged commit 575dd0c into python:main Jun 24, 2023
65 checks passed
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.

tempfile.SpooledTemporaryFile missing _file attribute
3 participants