Opened 10 years ago
Closed 9 years ago
#6026 enhancement closed fixed (fixed)
Port twisted.protocols.basic.FileSender to Python 3
Reported by: | Itamar Turner-Trauring | Owned by: | Tom Prince |
---|---|---|---|
Priority: | normal | Milestone: | Python-3.x |
Component: | core | Keywords: | |
Cc: | Branch: |
branches/filesender-py3-6026-2
branch-diff, diff-cov, branch-cov, buildbot |
|
Author: | therve |
Description
FileSender
is not being ported to Python 3 as part of #6025, so will need to be done separately.
Change History (13)
comment:1 Changed 10 years ago by
Owner: | set to therve |
---|
comment:2 Changed 10 years ago by
Author: | → therve |
---|---|
Branch: | → branches/filesender-py3-6026 |
comment:3 Changed 10 years ago by
Keywords: | review added |
---|---|
Owner: | therve deleted |
This is ready for review. This was mainly about adding new tests, as there was no incompatible bits that I could spot. I did change the interface implemented and remove one method not part of the interface, though.
comment:5 Changed 9 years ago by
I clicked on the given link but I didn't actually see build results. Is there a buildbot bug here someplace, or is 4 days actually so long that our build history falls off the end?
comment:7 Changed 9 years ago by
Owner: | set to therve |
---|
- I don't think removing
pauseProducing
without deprecation is allowable, under the compatibility policy. - Is there any reason to use a real file, rather than something like
StringIO
? Also, the consumer should probably be something designed for testing likeStringTransport
. - New tests should be synchronous when possible, using
successResultOf
,failureResultOf
, andassertNoResult
. - The tests don't test the case when multiple chunks are required to send the file. (It is probably reasonable to shrink
CHUNK_SIZE
when testing this.
Please resubmit for review, after addressing the above points.
comment:8 Changed 9 years ago by
Keywords: | review removed |
---|
comment:9 Changed 9 years ago by
Branch: | branches/filesender-py3-6026 → branches/filesender-py3-6026-2 |
---|
(In [37088]) Branching to 'filesender-py3-6026-2'
comment:10 Changed 9 years ago by
Keywords: | review added |
---|---|
Owner: | therve deleted |
Thanks, everything handled I think!
comment:11 Changed 9 years ago by
Keywords: | review removed |
---|
- The comments in the test should explain why
resumeProducing
needs to be called twice. test_transferMultipleChunks
doesn't actually test that things are sent in chunk-size bits. It should check the output at each step.- Something should verify that the producer gets unregistered.
- Similarly, something should verify that the producer gets properly registered as a non-streaming producer.
I'll fix these up and commit.
comment:12 Changed 9 years ago by
Owner: | set to Tom Prince |
---|
Also, stopProducing
isn't normally called, except in exception cases, so don't call it from the tests except in exceptional cases.
comment:13 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [36403]) Branching to 'filesender-py3-6026'