-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
bpo-26175: Implement io.IOBase
interface for SpooledTemporaryFile
#29560
bpo-26175: Implement io.IOBase
interface for SpooledTemporaryFile
#29560
Conversation
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
@pR0Ps I guess you ignored the change requests from the other PR, shouldn't call Also IMO you'd want to give the warning regardless of the file having been rolled over to disk or not. |
a39b1e8
to
54b6c7b
Compare
@ztane Made the requested change to the |
54b6c7b
to
fba27e4
Compare
Rebased on latest main. |
fba27e4
to
c6546f7
Compare
c6546f7
to
ebb1d76
Compare
ebb1d76
to
dbc85fd
Compare
Since the underlying file-like objects (either `io.BytesIO`, `io.StringIO`, or a true file object) all implement the `io.IOBase` interface, the `SpooledTemporaryFile` should as well. Additionally, since the underlying file object will either be an instance of an `io.BufferedIOBase` (for binary mode) or an `io.TextIOBase` (for text mode), methods for these classes were also implemented. In every case, the required methods and properties are simply delegated to the underlying file object. Co-authored-by: Gary Fernie <[email protected]>
dbc85fd
to
e66d4a3
Compare
In the future, please avoid force pushes on Python repositories, they make reviewing less pleasant: https://devguide.python.org/pullrequest/ |
e66d4a3
to
753aeb0
Compare
Sorry, I've re-pushed the change as a separate commit and will do the same in the future. |
@pR0Ps Thanks! When PR is updated with a usual push, everybody subscribed can open the PR from "Unread notifications" and see only these updates of a diff. For example, a full With a force-push, however, GitHub gives up and forces a reviewer to open a list of commits and manually scan for all changes: When there are a few commits per day, it's ok. However, in this repo with a dosen of changes per hour, such manual works would become a second job. |
Misc/NEWS.d/next/Library/2021-11-14-01-35-04.bpo-26175.LNlOfI.rst
Outdated
Show resolved
Hide resolved
Misc/NEWS.d/next/Library/2021-11-14-01-35-04.bpo-26175.LNlOfI.rst
Outdated
Show resolved
Hide resolved
@erlend-aasland Can you take a look please? |
python/cpython#29560 Co-authored-by: Alex Waygood <[email protected]>
Since the underlying file-like objects (either
io.BytesIO
,io.StringIO
, or a true file object) all implement theio.IOBase
interface, theSpooledTemporaryFile
should as well.Additionally, since the underlying file object will either be an instance of an
io.BufferedIOBase
(for binary mode) or anio.TextIOBase
(for text mode), methods for these classes were also implemented.In every case, the required methods and properties are simply delegated to the underlying file object.
Co-authored-by: Gary Fernie <[email protected]>
This is a rebased and reworked followup of the seemingly-abandoned #3249
https://bugs.python.org/issue26175