Opened 2 years ago

Closed 19 months ago

Last modified 19 months ago

#5767 task closed fixed (fixed)

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
(diff, github, buildbot, log)
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 (8)

comment:1 Changed 22 months ago by teratorn

  • Cc teratorn@… added

comment:2 Changed 19 months ago by tomprince

  • Author set to tomprince
  • Branch set to branches/remove-zshcomp-5767

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

comment:3 Changed 19 months ago by tom.prince

  • Keywords review added

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

comment:4 Changed 19 months ago by rwall

  • Cc richard@… added
  • Owner set to rwall
  • Status changed from new to assigned

Reviewing...

comment:5 Changed 19 months ago by rwall

  • Keywords review removed
  • Owner changed from rwall to tom.prince
  • Status changed from assigned to new

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.

comment:6 Changed 19 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

comment:7 Changed 19 months ago by tomprince

  • Resolution set to fixed
  • Status changed from new to closed

(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.

comment:8 Changed 19 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.