Skip to content

Add _file in class SpooledTemporaryFile in tempfile.pyi - #10327

Merged
Akuli merged 11 commits into
python:mainfrom
heysujal:main
Jun 24, 2023
Merged

Add _file in class SpooledTemporaryFile in tempfile.pyi#10327
Akuli merged 11 commits into
python:mainfrom
heysujal:main

Conversation

@heysujal

@heysujalheysujal commented Jun 18, 2023

Copy link
Copy Markdown
Contributor

@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

@AkuliAkuli left a comment

Copy link
Copy Markdown
Collaborator

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 :)

Comment threadstdlib/tempfile.pyi Outdated
Comment threadstdlib/tempfile.pyi Outdated
heysujaland 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.

@AkuliAkuli left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

Comment threadstdlib/tempfile.pyi Outdated
@heysujal
heysujal requested review from Akuli and Dr-IrvJune 23, 2023 15:05
@github-actions

Copy link
Copy Markdown
Contributor

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

@Akuli
Akuli merged commit 575dd0c into python:mainJun 24, 2023
Sign up for freeto 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

@heysujal@Dr-Irv@Akuli