Bug 1376124
Summary: | mycli broken with python3-sqlparse-0.2.1-1.fc24 | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dick Marinus <dick> |
Component: | mycli | Assignee: | Terje Røsten <terje.rosten> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 24 | CC: | fale, terje.rosten |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | mycli-1.8.0-2.fc25 mycli-1.8.0-2.fc24 mycli-1.8.0-2.fc23 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-09-27 00:38:47 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Dick Marinus
2016-09-14 18:42:24 UTC
I've written a patch for sqlparse 0.2 support: https://github.com/meeuw/mycli/commit/895e109ca169e240e0f26e087b93c3b47df2232a.patch Great, works fine! Thanks! mycli-1.8.0-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-d7d6e78421 mycli-1.8.0-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b9b07582fe mycli-1.8.0-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-dbf69e17ce I've did some more testing and there're more modifications required for sqlparse 0.2.1.. https://github.com/meeuw/mycli/commit/d14ec3d92d808ddca3eeeb8e9c2ed22e3ed87c1b.patch Steps to reproduce: 1. start mycli 2. USE `mysql` 3. SELECT FROM user 4. Change to SELECT user FROM user (triggers auto completion) Results in: Exception in thread Thread-49: 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 "/usr/lib/python3.5/site-packages/prompt_toolkit/interface.py", line 759, in run completions = list(buffer.completer.get_completions(document, complete_event)) File "/home/meeuw/git/mycli/mycli/sqlcompleter.py", line 247, in get_completions suggestions = suggest_type(document.text, document.text_before_cursor) File "/home/meeuw/git/mycli/mycli/packages/completion_engine.py", line 86, in suggest_type full_text, identifier) File "/home/meeuw/git/mycli/mycli/packages/completion_engine.py", line 216, in suggest_based_on_last_token return [{'type': 'column', 'tables': extract_tables(full_text)}, File "/home/meeuw/git/mycli/mycli/packages/parseutils.py", line 154, in extract_tables return list(extract_table_identifiers(stream)) File "/home/meeuw/git/mycli/mycli/packages/parseutils.py", line 113, in extract_table_identifiers for item in token_stream: File "/home/meeuw/git/mycli/mycli/packages/parseutils.py", line 79, in extract_from_part if is_subselect(item): File "/home/meeuw/git/mycli/mycli/packages/parseutils.py", line 67, in is_subselect if not parsed.is_group(): TypeError: 'bool' object is not callable I am not able to reproduce or I am misunderstanding something: USE mysql; SELECT user FROM use<tab-to-complete> works fine. You tried something more complex? Nope, it breaks when you try to complete the "column" user, not the "table" user: USE mysql SELECT u<tab-to-complete> FROM user; But I haven't tried this using the RPM you've build... Seems to work here: USE mysql; SELECT <tab-to-complete> FROM user; brings all columns in mysql.user. Even select `User`,<tab-to-complete> FROM `user`; works, strange. Versions: $ rpm -qa mycli python3-sqlparse mycli-1.8.0-2.fc23.noarch python3-sqlparse-0.2.1-1.fc23.noarch mycli-1.8.0-2.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-d7d6e78421 mycli-1.8.0-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-b9b07582fe mycli-1.8.0-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-dbf69e17ce mycli-1.8.0-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report. mycli-1.8.0-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report. mycli-1.8.0-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report. |