Skip to content

vim/merlin/autoload/merlin.py: AttributeError: module 'sys' has no attribute 'maxint' #1302

@OnkV

Description

@OnkV

The Merlin toolkit version v4.1-412, for Ocaml 4.12.0
Vim 8.1 compiled with +python3 on Debian 10 stable.

Opening an OCaml file in Vim results in this error:

Error detected while processing /home/XXX/.cache/vimfiles/repos/github.com/ocaml/merlin/vim/merlin/autoload/merlin.vim:
line   86:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/XXX/.cache/vimfiles/repos/github.com/ocaml/merlin/vim/merlin/autoload/merlin.py", line 642, in <module>
    def vim_next_hole(min = 0, max = sys.maxint):
AttributeError: module 'sys' has no attribute 'maxint'
Error detected while processing function merlin#Register[142]..merlin#LoadProject:
line    2:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'merlin' is not defined
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'merlin' is not defined

In Python3 sys.maxint was renamed to sys.maxsize. Changing sys.maxint to sys.maxsize in merlin/vim/merlin/autoload/merlin.py fixes the problem for users of Python3.

Metadata

Metadata

Assignees

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