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
The twisted own test suite should not use deprecated code.
My reasoning is as follows.
When a PR is created to deprecated some API, the PR will take care of replacing all usage of that API in Twisted itself.
Then, when it's time to remove the deprecated API, the PR to remove the code will just need to remove the API and will not have to see how to replace the API in the current code base.
Later, we might have a CI check to make sure the test will not introduce new DeprecationsWarnings
This is the meta ticket which shows the current state.
Separeate tickets should be created for each deprecated API/warning
$ python3 -Wall -m twisted.trial -n twisted > /dev/null
/home/adi/chevah/twisted/.tox/build3/lib/python3.9/site-packages/unittest2/compatibility.py:143: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
class ChainMap(collections.MutableMapping):
/home/adi/chevah/twisted/src/twisted/application/test/test_internet.py:38: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/application/twist/test/test_options.py:22: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/application/twist/test/test_twist.py:13: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/test/test_twistd.py:42: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/conch/test/test_cftp.py:33: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_channel.py:19: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/conch/scripts/ckeygen.py:15: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
from imp import reload
/home/adi/chevah/twisted/src/twisted/conch/test/test_default.py:17: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_endpoints.py:29: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import EventLoggingObserver, MemoryReactorClock
/home/adi/chevah/twisted/src/twisted/conch/test/test_endpoints.py:29: DeprecationWarning: twisted.test.proto_helpers.MemoryReactorClock was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactorClock instead.
from twisted.test.proto_helpers import EventLoggingObserver, MemoryReactorClock
/home/adi/chevah/twisted/src/twisted/conch/test/test_endpoints.py:80: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_forwarding.py:18: DeprecationWarning: twisted.test.proto_helpers.MemoryReactorClock was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactorClock instead.
from twisted.test.proto_helpers import MemoryReactorClock, StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_forwarding.py:18: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import MemoryReactorClock, StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_insults.py:8: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_manhole.py:18: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_recvline.py:23: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/conch/test/test_mixin.py:6: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/test/test_tcp.py:29: DeprecationWarning: twisted.test.proto_helpers.AccumulatingProtocol was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.AccumulatingProtocol instead.
from twisted.test.proto_helpers import AccumulatingProtocol
/home/adi/chevah/twisted/src/twisted/internet/test/test_tcp.py:95: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor, StringTransport
/home/adi/chevah/twisted/src/twisted/internet/test/test_tcp.py:95: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import MemoryReactor, StringTransport
/home/adi/chevah/twisted/src/twisted/internet/test/test_protocol.py:31: DeprecationWarning: twisted.test.proto_helpers.MemoryReactorClock was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactorClock instead.
from twisted.test.proto_helpers import MemoryReactorClock, StringTransport
/home/adi/chevah/twisted/src/twisted/internet/test/test_protocol.py:31: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import MemoryReactorClock, StringTransport
/home/adi/chevah/twisted/src/twisted/mail/test/test_imap.py:53: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport, StringTransportWithDisconnection
/home/adi/chevah/twisted/src/twisted/mail/test/test_imap.py:53: DeprecationWarning: twisted.test.proto_helpers.StringTransportWithDisconnection was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransportWithDisconnection instead.
from twisted.test.proto_helpers import StringTransport, StringTransportWithDisconnection
/home/adi/chevah/twisted/src/twisted/mail/test/test_mail.py:53: DeprecationWarning: twisted.test.proto_helpers.LineSendingProtocol was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.LineSendingProtocol instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/mail/test/test_mail.py:53: DeprecationWarning: twisted.test.proto_helpers.MemoryReactorClock was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactorClock instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/mail/test/test_mail.py:53: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/mail/test/test_mailmail.py:22: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/mail/test/test_pop3.py:26: DeprecationWarning: twisted.test.proto_helpers.LineSendingProtocol was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.LineSendingProtocol instead.
from twisted.test.proto_helpers import LineSendingProtocol
/home/adi/chevah/twisted/src/twisted/mail/test/test_pop3client.py:21: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/mail/test/test_smtp.py:24: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor, StringTransport
/home/adi/chevah/twisted/src/twisted/mail/test/test_smtp.py:24: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import MemoryReactor, StringTransport
/home/adi/chevah/twisted/src/twisted/names/test/test_names.py:29: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/names/test/test_names.py:29: DeprecationWarning: twisted.test.proto_helpers.MemoryReactorClock was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactorClock instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/names/test/test_names.py:29: DeprecationWarning: twisted.test.proto_helpers.waitUntilAllDisconnected was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.waitUntilAllDisconnected instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/names/test/test_srvconnect.py:21: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/protocols/haproxy/test/test_parser.py:9: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/protocols/haproxy/test/test_wrapper.py:11: DeprecationWarning: twisted.test.proto_helpers.StringTransportWithDisconnection was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransportWithDisconnection instead.
from twisted.test.proto_helpers import StringTransportWithDisconnection
/home/adi/chevah/twisted/src/twisted/protocols/test/test_tls.py:66: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport, NonStreamingProducer
/home/adi/chevah/twisted/src/twisted/protocols/test/test_tls.py:66: DeprecationWarning: twisted.test.proto_helpers.NonStreamingProducer was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.NonStreamingProducer instead.
from twisted.test.proto_helpers import StringTransport, NonStreamingProducer
/home/adi/chevah/twisted/src/twisted/runner/test/test_procmon.py:15: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/spread/test/test_banana.py:14: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/spread/test/test_jelly.py:16: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/spread/test/test_pb.py:37: DeprecationWarning: twisted.test.proto_helpers._FakeConnector was deprecated in Twisted 19.7.0: Please use twisted.internet.testing._FakeConnector instead.
from twisted.test.proto_helpers import _FakeConnector
/home/adi/chevah/twisted/src/twisted/test/test_amp.py:23: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/test/test_application.py:31: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/test/test_dict.py:7: DeprecationWarning: twisted.protocols.dict was deprecated in Twisted 17.9.0: There is no replacement for this module.
from twisted.protocols import dict
/home/adi/chevah/twisted/src/twisted/test/test_finger.py:10: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/test/test_ident.py:19: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/test/test_memcache.py:15: DeprecationWarning: twisted.test.proto_helpers.StringTransportWithDisconnection was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransportWithDisconnection instead.
from twisted.test.proto_helpers import StringTransportWithDisconnection
/home/adi/chevah/twisted/src/twisted/test/test_policies.py:14: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/test/test_policies.py:15: DeprecationWarning: twisted.test.proto_helpers.StringTransportWithDisconnection was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransportWithDisconnection instead.
from twisted.test.proto_helpers import StringTransportWithDisconnection
/home/adi/chevah/twisted/src/twisted/test/test_postfix.py:11: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/test/test_ssl.py:15: DeprecationWarning: twisted.test.proto_helpers.waitUntilAllDisconnected was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.waitUntilAllDisconnected instead.
from twisted.test.proto_helpers import waitUntilAllDisconnected
/home/adi/chevah/twisted/src/twisted/trial/_dist/test/test_disttrial.py:21: DeprecationWarning: twisted.test.proto_helpers.MemoryReactorClock was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactorClock instead.
from twisted.test.proto_helpers import MemoryReactorClock
/home/adi/chevah/twisted/src/twisted/trial/_dist/test/test_worker.py:24: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/home/adi/chevah/twisted/src/twisted/trial/_dist/test/test_workertrial.py:15: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
/usr/lib/python3.9/inspect.py:351: DeprecationWarning: twisted.trial.test.test_assertions.somethingOld was deprecated in Bar 1.2.3: It's old and clunky
value = getattr(object, key)
/home/adi/chevah/twisted/src/twisted/web/test/test_agent.py:23: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_agent.py:23: DeprecationWarning: twisted.test.proto_helpers.MemoryReactorClock was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactorClock instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_agent.py:23: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_agent.py:63: DeprecationWarning: twisted.test.proto_helpers.AccumulatingProtocol was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.AccumulatingProtocol instead.
from twisted.test.proto_helpers import AccumulatingProtocol
/home/adi/chevah/twisted/src/twisted/web/test/test_web.py:27: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import EventLoggingObserver
/home/adi/chevah/twisted/src/twisted/web/test/test_http.py:42: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_http.py:42: DeprecationWarning: twisted.test.proto_helpers.NonStreamingProducer was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.NonStreamingProducer instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_http.py:42: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_httpauth.py:35: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import EventLoggingObserver
/home/adi/chevah/twisted/src/twisted/web/test/test_newclient.py:20: DeprecationWarning: twisted.test.proto_helpers.AccumulatingProtocol was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.AccumulatingProtocol instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_newclient.py:20: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_newclient.py:20: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_newclient.py:20: DeprecationWarning: twisted.test.proto_helpers.StringTransportWithDisconnection was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransportWithDisconnection instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_proxy.py:9: DeprecationWarning: twisted.test.proto_helpers.StringTransportWithDisconnection was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransportWithDisconnection instead.
from twisted.test.proto_helpers import StringTransportWithDisconnection
/home/adi/chevah/twisted/src/twisted/web/test/test_proxy.py:10: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor
/home/adi/chevah/twisted/src/twisted/web/test/test_template.py:29: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import EventLoggingObserver
/home/adi/chevah/twisted/src/twisted/web/test/test_webclient.py:25: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_webclient.py:25: DeprecationWarning: twisted.test.proto_helpers.waitUntilAllDisconnected was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.waitUntilAllDisconnected instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_webclient.py:25: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import (
/home/adi/chevah/twisted/src/twisted/web/test/test_webclient.py:1631: DeprecationWarning: twisted.web.client.HTTPPageGetter was deprecated in Twisted 16.7.0: please use https://pypi.org/project/treq/ or twisted.web.client.Agent instead
protocolClass = client.HTTPPageGetter
/home/adi/chevah/twisted/src/twisted/web/test/test_webclient.py:1660: DeprecationWarning: twisted.web.client.HTTPPageGetter was deprecated in Twisted 16.7.0: please use https://pypi.org/project/treq/ or twisted.web.client.Agent instead
protocolClass = client.HTTPPageGetter
/home/adi/chevah/twisted/src/twisted/web/test/test_webclient.py:1689: DeprecationWarning: twisted.web.client.HTTPPageDownloader was deprecated in Twisted 16.7.0: please use https://pypi.org/project/treq/ or twisted.web.client.Agent instead
protocolClass = client.HTTPPageDownloader
/home/adi/chevah/twisted/src/twisted/web/test/test_webclient.py:1697: DeprecationWarning: twisted.web.client.HTTPPageDownloader was deprecated in Twisted 16.7.0: please use https://pypi.org/project/treq/ or twisted.web.client.Agent instead
protocolClass = client.HTTPPageDownloader
/home/adi/chevah/twisted/src/twisted/web/test/test_wsgi.py:29: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import EventLoggingObserver
/home/adi/chevah/twisted/src/twisted/web/test/test_xmlrpc.py:25: DeprecationWarning: twisted.test.proto_helpers.MemoryReactor was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.MemoryReactor instead.
from twisted.test.proto_helpers import MemoryReactor, EventLoggingObserver
/home/adi/chevah/twisted/src/twisted/web/test/test_xmlrpc.py:25: DeprecationWarning: twisted.test.proto_helpers.EventLoggingObserver was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.EventLoggingObserver instead.
from twisted.test.proto_helpers import MemoryReactor, EventLoggingObserver
/home/adi/chevah/twisted/src/twisted/words/test/test_irc.py:14: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport, StringIOWithoutClosing
/home/adi/chevah/twisted/src/twisted/words/test/test_irc.py:14: DeprecationWarning: twisted.test.proto_helpers.StringIOWithoutClosing was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringIOWithoutClosing instead.
from twisted.test.proto_helpers import StringTransport, StringIOWithoutClosing
/home/adi/chevah/twisted/src/twisted/words/test/test_ircsupport.py:8: DeprecationWarning: twisted.test.proto_helpers.StringTransport was deprecated in Twisted 19.7.0: Please use twisted.internet.testing.StringTransport instead.
from twisted.test.proto_helpers import StringTransport
I think a slightly different approach would be better. When Twisted deprecates some public api, it should of course no longer use that code itself. But the now-deprecated code will (hopefully) have tests which exercised it. Those tests should remain, but should be updated to assert that they elicit the expected deprecation warnings. (Perhaps as simple as adding a decorator to the test function.) Other than the (pre-existing) unit tests, of course, nothing in Twisted should be calling into the deprecated code.
Why I like this approach: it's a common pattern to hollow-out a deprecated API so it just calls the replacement API. But we want to ensure that we don't break users of Twisted until after the deprecation period ends and we actually remove the API. Keeping the original tests around helps ensure that we don't break the API without giving users a chance to migrate off of it.
The twisted own test suite should not use deprecated code.
My reasoning is as follows.
When a PR is created to deprecated some API, the PR will take care of replacing all usage of that API in Twisted itself.
Then, when it's time to remove the deprecated API, the PR to remove the code will just need to remove the API and will not have to see how to replace the API in the current code base.
Later, we might have a CI check to make sure the test will not introduce new DeprecationsWarnings
This is the meta ticket which shows the current state.
Separeate tickets should be created for each deprecated API/warning
Searchable metadata
The text was updated successfully, but these errors were encountered: