Opened 10 years ago

Closed 10 years ago

#3581 task closed fixed (fixed)

Remove all the pre-split compatibility code

Reported by: Thijs Triemstra Owned by:
Priority: high Milestone:
Component: core Keywords:
Cc: Thijs Triemstra Branch: branches/remove-pre-split-code-3581-2
branch-diff, diff-cov, branch-cov, buildbot
Author: thijs, exarkun

Description (last modified by Thijs Triemstra)

[source:trunk/twisted/im.py] is one the pre-split modules that hasn't been touched in 4 years, it's probably time to get rid of it? It also contains a really old project link, which could be fixed instead if for some reason this file has to stay there.

Change History (19)

comment:1 Changed 10 years ago by Thijs Triemstra

Description: modified (diff)
Summary: Remove twisted/im.pyRemove all the pre-split compatibility code

Updating description

comment:2 Changed 10 years ago by Thijs Triemstra

Author: thijs
Branch: branches/remove-pre-split-code-3581

(In [25683]) Branching to 'remove-pre-split-code-3581'

comment:3 Changed 10 years ago by Thijs Triemstra

Status: newassigned

Modules that will go:

./im.py:util.moduleMovedForSplit('twisted.im', 'twisted.words.im',
./protocols/dns.py:util.moduleMovedForSplit('twisted.protocols.dns', 'twisted.names.dns',
./protocols/ethernet.py:util.moduleMovedForSplit('twisted.protocols.ethernet', 'twisted.pair.ethernet',
./protocols/http.py:util.moduleMovedForSplit('twisted.protocols.http', 'twisted.web.http',
./protocols/imap4.py:util.moduleMovedForSplit('twisted.protocols.imap4', 'twisted.mail.imap4',
./protocols/ip.py:util.moduleMovedForSplit('twisted.protocols.ip', 'twisted.pair.ip',
./protocols/irc.py:util.moduleMovedForSplit('twisted.protocols.irc', 'twisted.words.protocols.irc',
./protocols/jabber.py:util.moduleMovedForSplit('twisted.protocols.jabber', 'twisted.words.protocols.jabber',
./protocols/msn.py:util.moduleMovedForSplit('twisted.protocols.msn', 'twisted.words.protocols.msn',
./protocols/nntp.py:util.moduleMovedForSplit('twisted.protocols.nntp', 'twisted.news.nntp',
./protocols/oscar.py:util.moduleMovedForSplit('twisted.protocols.oscar', 'twisted.words.protocols.oscar',
./protocols/pop3.py:util.moduleMovedForSplit('twisted.protocols.pop3', 'twisted.mail.pop3',
./protocols/raw.py:util.moduleMovedForSplit('twisted.protocols.raw', 'twisted.pair.raw',
./protocols/rawudp.py:util.moduleMovedForSplit('twisted.protocols.rawudp', 'twisted.pair.rawudp',
./protocols/smtp.py:util.moduleMovedForSplit('twisted.protocols.smtp', 'twisted.mail.smtp',
./protocols/sux.py:util.moduleMovedForSplit('twisted.protocols.sux', 'twisted.web.sux',
./protocols/toc.py:util.moduleMovedForSplit('twisted.protocols.toc', 'twisted.words.protocols.toc',

comment:4 Changed 10 years ago by Jean-Paul Calderone

moduleMovedForSplit can be deprecated too.

comment:5 Changed 10 years ago by Thijs Triemstra

Removed the placeholder modules in r25686, and cleaned up the python.util module in r25687. I 'accidently' removed the C{moduleMovedForSplit} method which should've been deprecated first, so will fix that now.

comment:6 Changed 10 years ago by Thijs Triemstra

Removed note about DeprecationWarnings in t.p in r25688

comment:7 Changed 10 years ago by Thijs Triemstra

Cc: Thijs Triemstra added
Keywords: review added
Owner: Thijs Triemstra deleted
Status: assignednew

Deprecated moduleMovedForSplit in r25689, putting it up for review. I probably didn't do it the right way so looking forward to any pointers (that I'll incorporate in #3264).

comment:8 Changed 10 years ago by Thijs Triemstra

And I guess the split faq needs an update as well, by removing the NOTES for the t.protocols placeholders.

comment:9 Changed 10 years ago by Jean-Paul Calderone

Owner: set to Jean-Paul Calderone
Status: newassigned

comment:10 Changed 10 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: changed from Jean-Paul Calderone to Thijs Triemstra
Status: assignednew

Please put all of the unrelated util.py changes into a ticket for general util.py coding standard cleanups.

Coding standard cleanups in moduleMovedForSplit would be fine for this branch, but making changes to every other API in util.py is too annoying.

comment:11 Changed 10 years ago by Thijs Triemstra

Branch: branches/remove-pre-split-code-3581branches/remove-pre-split-code-3581-2

(In [26436]) Branching to 'remove-pre-split-code-3581-2'

comment:12 Changed 10 years ago by Thijs Triemstra

Keywords: review added
Owner: Thijs Triemstra deleted

Created a new branch that is ready for review (r26437), basically the same as the previous branch but now without the docstring fixes.

comment:13 Changed 10 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to Thijs Triemstra
Priority: normalhigh

The deprecation warning in moduleMovedForSplit needs a unit test. This will show that it is missing a stacklevel=2 argument. :) The function should also have a docstring pointing out that it does nothing and is just for compatibility.

Also, there's a global warnings import, so there doesn't still need to be one in the function.

comment:14 Changed 10 years ago by Thijs Triemstra

Owner: changed from Thijs Triemstra to Jean-Paul Calderone

Thanks for the review, assigning it to you so you can safely fix the rest of this ticket :)

comment:15 Changed 10 years ago by Jean-Paul Calderone

(In [26523]) Add test for deprecation; remove nested warnings imports

refs #3581

comment:16 Changed 10 years ago by Jean-Paul Calderone

Author: thijsthijs, exarkun
Keywords: review added
Owner: Jean-Paul Calderone deleted

comment:17 Changed 10 years ago by Michael Hudson-Doyle

Keywords: review removed
Owner: set to Jean-Paul Calderone

Looks fine, please land.

comment:18 Changed 10 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [26541]) Merge remove-pre-split-code-3581-2

Author: thijs, exarkun Reviewer: exarkun, mwh Fixes: #3581

Remove the compatibility layer added for modules which were moved to new locations for the 2.0 split.

comment:19 Changed 8 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.