Avoid pending Twisted deprecations #490

Merged
exarkun merged 2 commits from pending-deprecations into master 2018-05-01 17:07:10 +00:00
exarkun commented 2018-04-20 20:05:09 +00:00 (Migrated from github.com)

Replaces getClientIP with getClientAddress if possible. Fixes the deprecation builder.

This introduces "uncovered" code because coverage is only measured when running the test suite against the released version of Twisted, not trunk@HEAD, and one of the codepaths is currently only exercised against Twisted trunk@HEAD. This seems not ideal but not catastrophic to me since we are actually testing both code paths - we just don't measure one of them automatically.

When the next Twisted release happens, the situation will get a bit worse because we will only test the newer codepath - because both the Twisted-release and Twisted-trunk@HEAD builds will both be running the newer codepath. To keep testing the older codepath, we would need a CI job that uses other than the newest allowed released Twisted. Not sure what to do about that (apart from the semi-obvious: set up a new CI job).

Replaces getClientIP with getClientAddress if possible. Fixes the deprecation builder. This introduces "uncovered" code because coverage is only measured when running the test suite against the released version of Twisted, not trunk@HEAD, and one of the codepaths is currently only exercised against Twisted trunk@HEAD. This seems not ideal but not catastrophic to me since we _are_ actually testing both code paths - we just don't measure one of them automatically. When the next Twisted release happens, the situation will get a bit worse because we will _only_ test the newer codepath - because both the Twisted-release and Twisted-trunk@HEAD builds will both be running the newer codepath. To keep testing the older codepath, we would need a CI job that uses other than the newest allowed released Twisted. Not sure what to do about that (apart from the semi-obvious: set up a new CI job).
codecov-io commented 2018-04-20 20:30:03 +00:00 (Migrated from github.com)

Codecov Report

Merging #490 into master will decrease coverage by 0.08%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #490      +/-   ##
==========================================
- Coverage   90.25%   90.16%   -0.09%     
==========================================
  Files         144      144              
  Lines       27443    27453      +10     
  Branches     3934     3935       +1     
==========================================
- Hits        24768    24754      -14     
- Misses       1940     1958      +18     
- Partials      735      741       +6
Impacted Files Coverage Δ
src/allmydata/webish.py 85.6% <63.63%> (-2.23%) ⬇️
src/allmydata/immutable/downloader/share.py 92.82% <0%> (-2.47%) ⬇️
src/allmydata/mutable/publish.py 95.65% <0%> (-1.02%) ⬇️
src/allmydata/mutable/servermap.py 93.38% <0%> (-0.81%) ⬇️
src/allmydata/immutable/upload.py 95.53% <0%> (+0.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 890360c...8eb83bb. Read the comment docs.

# [Codecov](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490?src=pr&el=h1) Report > Merging [#490](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490?src=pr&el=desc) into [master](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/commit/890360c8ea97e61ec02e1071f97f3772d7525d31?src=pr&el=desc) will **decrease** coverage by `0.08%`. > The diff coverage is `63.63%`. [![Impacted file tree graph](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490/graphs/tree.svg?src=pr&token=Ztmu9sr4vi&width=650&height=150)](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490?src=pr&el=tree) ```diff @@ Coverage Diff @@ ## master #490 +/- ## ========================================== - Coverage 90.25% 90.16% -0.09% ========================================== Files 144 144 Lines 27443 27453 +10 Branches 3934 3935 +1 ========================================== - Hits 24768 24754 -14 - Misses 1940 1958 +18 - Partials 735 741 +6 ``` | [Impacted Files](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [src/allmydata/webish.py](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490/diff?src=pr&el=tree#diff-c3JjL2FsbG15ZGF0YS93ZWJpc2gucHk=) | `85.6% <63.63%> (-2.23%)` | :arrow_down: | | [src/allmydata/immutable/downloader/share.py](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490/diff?src=pr&el=tree#diff-c3JjL2FsbG15ZGF0YS9pbW11dGFibGUvZG93bmxvYWRlci9zaGFyZS5weQ==) | `92.82% <0%> (-2.47%)` | :arrow_down: | | [src/allmydata/mutable/publish.py](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490/diff?src=pr&el=tree#diff-c3JjL2FsbG15ZGF0YS9tdXRhYmxlL3B1Ymxpc2gucHk=) | `95.65% <0%> (-1.02%)` | :arrow_down: | | [src/allmydata/mutable/servermap.py](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490/diff?src=pr&el=tree#diff-c3JjL2FsbG15ZGF0YS9tdXRhYmxlL3NlcnZlcm1hcC5weQ==) | `93.38% <0%> (-0.81%)` | :arrow_down: | | [src/allmydata/immutable/upload.py](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490/diff?src=pr&el=tree#diff-c3JjL2FsbG15ZGF0YS9pbW11dGFibGUvdXBsb2FkLnB5) | `95.53% <0%> (+0.27%)` | :arrow_up: | ------ [Continue to review full report at Codecov](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490?src=pr&el=footer). Last update [890360c...8eb83bb](https://codecov.io/gh/tahoe-lafs/tahoe-lafs/pull/490?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tahoe-lafs/tahoe-lafs#490
No description provided.