Skip to content

Remove support for rope #10440

Closed
Closed

Description

@mjbvz

Environment data

Steps to reproduce:

  1. Make python file dirty
  2. Then select some code and try running extract method

Expected behavior

It extracts the method

Actual behavior

A notification appears telling me to save the file. Why do I need to save? And if saving is really required for now, why don't you just save the file for me?

This current UX makes refactoring a pain

Activity

  1. added
    triage-neededNeeds assignment to the proper sub-team
    bugIssue identified by VS Code Team member as probable bug
    on Mar 5, 2020
  2. ghost removed
    triage-neededNeeds assignment to the proper sub-team
    on Mar 5, 2020
  3. karthiknadig commented on Mar 5, 2020

    @karthiknadig
    Member

    Kim-Adeline Miguel (@kimadeline) First we need to know if they are using rope. We need to see if we can pass string to rope.

  4. kimadeline commented on Mar 9, 2020

    @kimadeline

    Yup, Extract Method uses rope for refactoring, and it performs these actions on resources pointing to files inside a project (in our case, the workspace folder).

    👉 We can't pass strings to rope, we have to work with a file.

    Suggestions:

    • save the file automatically
    • copy the code in a temp file, perform the action there, and then replace the content of the current file
  5. DonJayamanne commented on Mar 10, 2020

    @DonJayamanne

    copy the code in a temp file, perform the action there, and then replace

    Considering the fact that rope has not supported Python 3 for a while, I think its time consider dropping it. However we'd need to first find out whether this is a good idea, i.e. do users use this today, does it work without any problems (I don't think so, hasn't supported 3).
    Brett Cannon (@brettcannon) /cc

  6. brettcannon commented on Mar 10, 2020

    @brettcannon
    Member

    We still get bug reports for it so some people seem to be at least attempting to use it. David said he is looking at refactoring support in Jedi.

    As for whether we should just yank it now or wait I don't know without chatting with Luciana Abud (@luabud) about it.

  7. 10 remaining items

  8. mcepl commented on Jul 5, 2021

    @mcepl

    This whole bug is based on the wrong premise: rope has been supporting Python 3 for some time already. I (the only remaining something-like-maintainer of rope, https://github.com/python-rope/rope/ ) have no idea about VSCode (so I don't know how rope is weird into it), feel free to file issues for any bugs you find.

  9. melMass commented on Aug 27, 2021

    @melMass

    Well, I think this is becoming more urgent now:
    python-rope/rope#360

  10. brettcannon commented on Aug 27, 2021

    @brettcannon
    Member

    Our current plan is to remove Rope in our 2021.10 release.

  11. lieryan commented on Sep 5, 2021

    @lieryan

    Hi all, rope is getting a new maintainer (me). Is there anything we can help fix here in rope for VSCode users that wants to continue to use rope for refactoring?

    Rope 0.19.0 already has support for a lot of new Python 3.x syntaxes and I'm going to continue to further improving coverage of supported syntax, fix existing bugs, as well as improving usability and ease of use and integrations.

  12. melMass commented on Sep 5, 2021

    @melMass

    Hi all, rope is getting a new maintainer (me)

    Good news!
    I think the decision to remove rope and ctags is unfortunately acted for 2021.1 (see the just released change log)...

    Brett Cannon (@brettcannon) Are you planning to replace the refactoring with something else than rope? (I'm using it a lot)

  13. gramster commented on Sep 5, 2021

    @gramster
  14. brettcannon commented on Sep 8, 2021

    @brettcannon
    Member

    Rope has been replaced by JediLSP (Jedi behind LSP) and/or Pylance for refactoring.

    As Graham Wheeler (@gramster) pointed out, probably the best option for those that wish to continue to use Rope would be to create a separate extension, and I would strongly recommend putting rope behind LSP. That way other editors could also use rope directly w/o much effort.

  15. kimadeline commented on Sep 28, 2021

    @kimadeline

    Testing done as part of #17540

  16. lieryan commented on Nov 23, 2021

    @lieryan

    Hi all, Rope should now be be usable again in VSCode and other editors that supports LSP using pylsp-rope. You'll want to install the pylsp-rope extension and configure your VSCode to use pylsp language server.

  17. locked as resolved and limited conversation to collaborators on Dec 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.feature-requestRequest for new features or functionalitypartner askverifiedVerification succeeded

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions