stop using deprecated twisted.web.client.getPage #2857

Closed
opened 2016-12-28 20:39:44 +00:00 by warner · 2 comments

Twisted-16.7.0 is coming soon, and it deprecates twisted.web.client.getPage (and client.HTTPClientFactory). We use these in some of the unit tests, to fetch one of the HTTP WAPI/WUI pages and make sure the contents look right.

We need to change these tests to use twisted.web.client.Agent instead, or a package named "treq", which is a Twisted flavor of the excellent (but blocking) requests library.

This was caught by the Deprecations buildbot, testing Tahoe against Twisted trunk: https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/deprecations/builds/160/steps/upcoming-deprecations/logs/warnings

The Twisted deprecation ticket was https://twistedmatrix.com/trac/ticket/8960

Twisted-16.7.0 is coming soon, and it deprecates `twisted.web.client.getPage` (and `client.HTTPClientFactory`). We use these in some of the unit tests, to fetch one of the HTTP WAPI/WUI pages and make sure the contents look right. We need to change these tests to use `twisted.web.client.Agent` instead, or a package named "treq", which is a Twisted flavor of the excellent (but blocking) `requests` library. This was caught by the Deprecations buildbot, testing Tahoe against Twisted trunk: <https://tahoe-lafs.org/buildbot-tahoe-lafs/builders/deprecations/builds/160/steps/upcoming-deprecations/logs/warnings> The Twisted deprecation ticket was <https://twistedmatrix.com/trac/ticket/8960>
warner added the
code
normal
task
1.12.0
labels 2016-12-28 20:39:44 +00:00
warner added this to the 1.13.0 milestone 2016-12-28 20:39:44 +00:00
Author

(https://github.com/tahoe-lafs/tahoe-lafs/pull/425) is a PR to fix 23 of the 31 current warnings. I'm still working on the remaining 8.

(https://github.com/tahoe-lafs/tahoe-lafs/pull/425) is a PR to fix 23 of the 31 current warnings. I'm still working on the remaining 8.
Brian Warner <warner@lothar.com> commented 2017-07-28 00:41:30 +00:00
Owner

In 0386e0d/trunk:

merge PR428: fix client.getPage deprecation warnings

closes ticket:2857
In [0386e0d/trunk](/tahoe-lafs/trac-2024-07-25/commit/0386e0d5bff2437f570b5a4ec022e100f3515359): ``` merge PR428: fix client.getPage deprecation warnings closes ticket:2857 ```
tahoe-lafs added the
fixed
label 2017-07-28 00:41:30 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2857
No description provided.