You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Running unit tests I noticed lots of deprecation warnings:
DeprecationWarning: twisted.web.http.Request.getClientIP was deprecated in Twisted 18.4.0; please use getClientAddress instead
tags.PEER_HOST_IPV6: request.getClientIP(),
So it should be safe to use the nondeprecated alternative.
The difference seems to be getClientIp returns a str whereas getClientAddress returns an IAddress. The documentation says:
Callers must check the type of the returned address.
which is a bit of a faff. It's probably safe to assume that every where we call it we either get an IPv4Address or IPv6Address, both of which have a host attribute which is probably what we want. I think this needs a little more thought to convince ourselves that's right. But once we do that I'm pretty sure fixing these up will be routine.