Ticket #5767 task closed fixed

Opened 10 months ago

Last modified 3 months ago

Remove deprecated twisted.python.zshcomp

Reported by: thijs Owned by: tom.prince
Priority: low Milestone:
Component: core Keywords:
Cc: thijs, teratorn@…, richard@… Branch: branches/remove-zshcomp-5767
Author: tomprince Launchpad Bug:

Description

twisted.python.zshcomp is deprecated as of Twisted 11.1 and can be removed. Shell tab-completion is now handled by twisted.python.usage.

Change History

1

Changed 6 months ago by teratorn

  • cc teratorn@… added

2

Changed 4 months ago by tomprince

  • branch set to branches/remove-zshcomp-5767
  • branch_author set to tomprince

(In [36844]) Branching to remove-zshcomp-5767

3

Changed 4 months ago by tom.prince

  • keywords review added

twisted/python/zsh isn't removed, since those files just forward to the new completion mechanism.

4

Changed 3 months ago by rwall

  • owner set to rwall
  • cc richard@… added
  • status changed from new to assigned

Reviewing...

5

Changed 3 months ago by rwall

  • owner changed from rwall to tom.prince
  • status changed from assigned to new
  • keywords review removed

Code Review

The changes look good. A few minor comments below...

  1.  Build results
    1. A few failures but I think they're expected
  2. twisted/topfiles/5767.removal
    1. Typo "deprecated in since"
  3. zsh (zsh 5.0.2 (x86_64-redhat-linux-gnu) completion still seems to work on Fedora 18 with this branch - that may be because of the legacy functions mentioned below. I found the following...
        $ find /usr/share/zsh/ -name '*twisted*'
        /usr/share/zsh/5.0.2/functions/_twisted
    
  4. twisted/python/zsh
    1. I don't fully understand how zsh completion works, but are you sure that these files can't be removed. I notice that they all contain the following...
             THIS DIRECTORY AND ALL FILES INCLUDED ARE DEPRECATED.
      
             These are the old zsh completion functions for Twisted commands... they used
             to contain full completion functions, but now they've simply been replaced
             by the current "stub" code that delegates completion control to Twisted.
      
             This directory and included files need to remain for several years in order
             to provide backwards-compatibility with an old version of the Twisted
             stub function that was shipped with Zsh.
      
      2.
    2. Is there at least a ticket explaining when these files can be removed? I think it would be useful to create one and link to it in this README.
    3. teratorn seems to be the maintainer of the zsh completion files - maybe he can comment.

+1 from me if you fix the typo in the news file.

If possible open a ticket with a plan and a date for the eventual removal of the legacy zsh shell functions.

-RichardW.

6

Changed 3 months ago by teratorn

Hi, a few points,

  • Could you indicate in the news file that the *functionality* has not been removed, just the deprecated module?
  • Zsh still ships the old stub in their tree [1]. I've just sent an email (today) [2] asking them to update to the new function. As soon as they do they, we can start a 5 year countdown for removing the twisted/python/zsh/_* files that exist for backwards compatibility with old stub.
  • Folks that PACKAGE twisted, OUGHT to be packaging our Zsh stub function, and installing it as "_twisted" in an appropriate "site-functions" directory for Zsh to find - this obviates the need for zsh to already have a stub function, if the user gets their stub from a Twisted package. I do not know how to communicate any information to packagers of Twisted, or know of any documentation that exists for them (?)

[1] -  http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob;f=Completion/Unix/Command/_twisted;h=b3b2427290cc56c37d7343cd134fd24b80e41c8c;hb=HEAD [2] -  http://www.zsh.org/mla/workers//2013/msg00079.html

7

Changed 3 months ago by tomprince

  • status changed from new to closed
  • resolution set to fixed

(In [37058]) Merge remove-zshcomp-5767: Remove deprecated twisted.python.zshcomp.

Author: tom.prince Reviewers: rwall Fixes: #5767

Shell tab-completion is now handled by twisted.python.usage.

8

Changed 3 months ago by tom.prince

  • The stubs in twisted/python/zsh are used with the completion shipped with zsh. They can be removed sometime after distributions are no longer shipping versions of zsh that reference them, if having them becomes a maintenance burden. A ticket could be filed if the later ever comes about.
  • I'll file a bug about creating some documentation for packagers.
Note: See TracTickets for help on using tickets.