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

Support python-sqlparse 0.2.0 #302

Closed
taoso opened this issue Aug 5, 2016 · 4 comments
Closed

Support python-sqlparse 0.2.0 #302

taoso opened this issue Aug 5, 2016 · 4 comments

Comments

@taoso
Copy link

taoso commented Aug 5, 2016

mycli 1.8.0 could not work with python-sqlparse 0.2.0.

Traceback (most recent call last):
  File "/usr/lib64/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File ".../lib/python3.5/site-packages/prompt_toolkit/interface.py", line 836, in run
    completions = list(buffer.completer.get_completions(document, complete_event))
  File ".../mycli/mycli/sqlcompleter.py", line 246, in get_completions
    suggestions = suggest_type(document.text, document.text_before_cursor)
  File ".../mycli/mycli/packages/completion_engine.py", line 85, in suggest_type
    full_text, identifier)
  File ".../mycli/mycli/packages/completion_engine.py", line 134, in suggest_based_on_last_token
    token_v = token.value.lower()
AttributeError: 'tuple' object has no attribute 'value'
@taoso taoso changed the title Support python-sqlparser 0.2.0 Support python-sqlparse 0.2.0 Aug 5, 2016
@meeuw
Copy link
Contributor

meeuw commented Sep 13, 2016

I have the same error on Fedora 24, the tuple contains an integer.
dnf downgrade python3-sqlparse-0.1.18-5.fc24
works around this.

@meeuw
Copy link
Contributor

meeuw commented Sep 13, 2016

I've bisected sqlparse and found this commit breaks mycli
andialbrecht/sqlparse@c4954af

@amjith
Copy link
Member

amjith commented Sep 16, 2016

@meeuw Thank you for taking the time to bisect and find the error. The latest release of sqlparse (version 0.2.0) made some significant changes that are breaking mycli. So I've chosen to pin the version of required sqlparse to 0.1.19.

I haven't found the time to upgrade mycli to adapt to the changes introduced in 0.2.0.

Sorry for the inconvenience. I hope to get it compatible eventually, but it's just taking a while.

@tsroten
Copy link
Member

tsroten commented Mar 18, 2017

Closing this issue since it was released in version 1.8.1.

@tsroten tsroten closed this as completed Mar 18, 2017
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

No branches or pull requests

4 participants