Skip to content

Python-mode lacks Python 3 support #197

Closed

Description

@Deebogle

My VIM is compiled with +python3, but code-completion with rope does not work (but it works when using Python 2.7). So I think, the issue is, that the rope library included in python-mode is not intended to be used with Python 3.

Since Python 3 is already out for a while, it would be nice, if python-mode supports it.

2 WARNING:
3 Python-mode required vim compiled with +python.
4 "lint, rope, run, doc, virtualenv" features disabled.
5
6 Pymode variables:
7 -------------------

Activity

  1. jacobmerson commented on May 29, 2013

    @jacobmerson

    +1

  2. jgosmann commented on Jun 10, 2013

    @jgosmann
    Contributor

    +1

  3. john9631 commented on Jun 13, 2013

    @john9631

    +1 also :)

  4. proycon commented on Jun 21, 2013

    @proycon

    +1

  5. codito commented on Aug 17, 2013

    @codito
    Contributor

    I am starting work on python3 support. Here are some thoughts regarding re-usability of current structure, will appreciate any thoughts and comments.

    1. Replace calls to :python or :py with pymode#Execute function, the function will wrap python and python3 behavior
    2. Move all blocks of inline python code python << EOF to pymode python library or replace with vim function wrappers
    3. Introduce boolean variable pymode_py3k which will enable plugins for python3 and use python 3 executable
    4. Adjust sys.path to refer these components: a) pylibs-core for all versions, and one of b) pylibs if python 2 or, c) pylibs3 if python 3. Typical user setup will have (a) + (b) or (a) + (c).
    5. For the moment, pylibs\pymode will move out to pylibs-core\pymode. We will patch pymode to work in both python 2 and 3
    6. We will pick up python 3 versions of rope and push it to pylibs3

    @klen do you think this structure will work out?

  6. klen commented on Aug 19, 2013

    @klen
    Collaborator

    @codito The very nice idea. I think about python3 support and pylama library (code checking in pymode) already have it. I like your suggestions, except #3. I suggest pymode_py2k variable, that way we will have less troubles when python4 comes :)

    Let me make a minor release of the plugin and create branch for next big release with python3 support.

  7. klen commented on Dec 1, 2013

    @klen
    Collaborator

    Should be supported in last develop version. Vim should be have +python3 (python3-dyn) support. Use let g:pymode_python = 'python3' to force python interpreter.

  8. added a commit that references this issue on Oct 9, 2015
  9. added a commit that references this issue on May 2, 2016
  10. added a commit that references this issue on Feb 12, 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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions