Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.9k
tempfile.SpooledTemporaryFile: inherit from IOBase on 3.11#7802
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
Conversation
This comment has been minimized.
This comment has been minimized.
AlexWaygood left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I'd prefer us to use a wordier-but-more-readable alias name, like_SpooledTemporaryFileBase, rather than_STFBase which feels a bit opaque.
Uh oh!
There was an error while loading.Please reload this page.
AlexWaygood left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It looks like in typeshed, we've always pretended thatSpooledTemporaryFile hasreadable() andseekable() methods on Python <3.11 (see the comment on line 330), even though they don't at runtime. This is becauseSpooledTemporaryFile inherits fromIO in typeshed, andIO hasreadable() andseekable() as abstract methods.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
AlexWaygood left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What about the newdetach() method?https://github.com/python/cpython/pull/29560/files#diff-6553a99f3ae04c9fc9c2349ac27037bfe3b274d5ca54d5800d9c5b5f11e29d21R813
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This comment has been minimized.
This comment has been minimized.
stdlib/tempfile.pyi Outdated
| # It does not actually derive from IO[AnyStr], but it does mostly behave | ||
| # like one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The comment should probably be moved down above the class itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Done
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
According tomypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
JelleZijlstra commentedMay 18, 2022
hm, I expected unused stubtest allowlist entries. I'll look into that in a followup PR. |
python/cpython#29560