Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.9 support (WIP) #1029

Closed
wants to merge 3 commits into from
Closed

Python 3.9 support (WIP) #1029

wants to merge 3 commits into from

Conversation

hjwp
Copy link

@hjwp hjwp commented Oct 13, 2020

Hi! Just thought I'd give this a go. My plan is to update the submodules for jedi and parso and then see if I can fix any errors the tests throw up.

I've done a couple so far, only one left:

test/vspec/goto.vim failed:
not found in 'runtimepath': "ftdetect/*.vim"
3 more lines:call jedi#goto()
jedi-vim: Cannot open a new buffer, use `:set hidden` or save your buffer
not ok 1 - goto simple: goto definitions
# Expected line('.') == 2 at line 2
#       Actual value: 3
#     Expected value: 2
3 more lines:call jedi#goto_assignments()
jedi-vim: Cannot open a new buffer, use `:set hidden` or save your buffer
not ok 2 - goto simple: goto assignments
# Expected line('.') == 2 at line 2
#       Actual value: 3
#     Expected value: 2:call jedi#goto_assignments()

"." is a directory
Traceback (most recent call last):
  File "/home/harry/workspace/jedi-vim/pythonx/jedi_vim.py", line 194, in wrapper
    return func(*args, **kwargs)
  File "/home/harry/workspace/jedi-vim/pythonx/jedi_vim.py", line 405, in goto
    vim.current.window.cursor = d.line, d.column
vim.error: cursor position outside buffer
not ok 3 - goto with tabs: follow import
# Expected getline('.') == 'import subprocess' at line 3
#       Actual value: ""
#     Expected value: "import subprocess"
6 buffers wiped out
jedi-vim: Cannot open a new buffer, use `:set hidden` or save your buffer
jedi-vim: Cannot open a new buffer, use `:set hidden` or save your buffer

"/usr/lib/python3.9/os.py" 
"/usr/lib/python3.9/os.py" [readonly] 1116L, 39065C
ok 4 - goto with buffers no new tabs
2 buffers wiped out:call jedi#goto_assignments()
"~/workspace/jedi-vim" is a directory
Traceback (most recent call last):
  File "/home/harry/workspace/jedi-vim/pythonx/jedi_vim.py", line 194, in wrapper
    return func(*args, **kwargs)
  File "/home/harry/workspace/jedi-vim/pythonx/jedi_vim.py", line 405, in goto
    vim.current.window.cursor = d.line, d.column
vim.error: cursor position outside buffer
not ok 5 - goto with splits follow import
# Expected getline('.') == 'import subprocess' at line 3
#       Actual value: ""
#     Expected value: "import subprocess"
2 buffers wiped out
"/usr/lib/python3.9/subprocess.py" 
"/usr/lib/python3.9/subprocess.py" [readonly] 2074L, 82465C
ok 6 - goto wildignore restores wildignore
2 buffers wiped out
"/usr/lib/python3.9/subprocess.py" 
"/usr/lib/python3.9/subprocess.py" [readonly] 2074L, 82465C
ok 7 - goto wildignore not using tagstack
2 buffers wiped out

not sure if those errors saying jedi-vim: Cannot open a new buffer, use :set hidden or save your buffer matter? are they safe to ignore?

@hjwp hjwp mentioned this pull request Oct 13, 2020
@hjwp
Copy link
Author

hjwp commented Oct 13, 2020

ah looks like travis is unhappy too https://travis-ci.org/github/davidhalter/jedi-vim/jobs/735363787

  File "/home/travis/build/davidhalter/jedi-vim/pythonx/parso/parso/parser.py", line 113
    node_map: Dict[str, type] = {}
            ^
SyntaxError: invalid syntax# -----------------------------------------------------------------------------

maybe it needs switching to 3.9?? I'll have a hack about in the travis config, not sure if that's the right thing to do...

@hjwp hjwp mentioned this pull request Oct 13, 2020
@isidentical
Copy link

  File "/home/travis/build/davidhalter/jedi-vim/pythonx/parso/parso/parser.py", line 113
    node_map: Dict[str, type] = {}
            ^
SyntaxError: invalid syntax# -----------------------------------------------------------------------------

I didn't inspected the whole thing, but can this be related Python 2? FWIW We have dropped support for 3.6< on Parso, and inlined the annotations (which was previously hold in external stub files).

@hjwp
Copy link
Author

hjwp commented Oct 14, 2020

@isidentical there's a PR open to upgrade jedi which drops python 2 support, may need to merge that first #1025

@hjwp
Copy link
Author

hjwp commented Oct 26, 2020

closing in favour of #1025

@hjwp hjwp closed this Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants