diff --git a/databases/py-mycli/Makefile b/databases/py-mycli/Makefile index 1a3be1146a23..6a570886ad55 100644 --- a/databases/py-mycli/Makefile +++ b/databases/py-mycli/Makefile @@ -3,6 +3,7 @@ PORTNAME= mycli PORTVERSION= 1.22.2 +PORTREVISION= 1 CATEGORIES= databases python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -20,7 +21,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cli-helpers>=1.1.0:devel/py-cli-helpers@${PY ${PYTHON_PKGNAMEPREFIX}prompt_toolkit>=3.0.0<4.0.0:devel/py-prompt_toolkit@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pygments>=1.6:textproc/py-pygments@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pymysql>=0.9.2:databases/py-pymysql@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}sqlparse>=0.3.0<0.4.0:databases/py-sqlparse@${PY_FLAVOR} + ${PYTHON_PKGNAMEPREFIX}sqlparse>=0.3.0:databases/py-sqlparse@${PY_FLAVOR} USES= mysql python:3.6+ USE_PYTHON= autoplist concurrent distutils diff --git a/databases/py-mycli/files/patch-mycli-packages-completion_engine.py b/databases/py-mycli/files/patch-mycli-packages-completion_engine.py new file mode 100644 index 000000000000..2c9cca4fe4b6 --- /dev/null +++ b/databases/py-mycli/files/patch-mycli-packages-completion_engine.py @@ -0,0 +1,19 @@ +--- mycli/packages/completion_engine.py.orig 2020-07-25 03:46:06 UTC ++++ mycli/packages/completion_engine.py +@@ -2,7 +2,6 @@ import os + import sys + import sqlparse + from sqlparse.sql import Comparison, Identifier, Where +-from sqlparse.compat import text_type + from .parseutils import last_word, extract_tables, find_prev_keyword + from .special import parse_special_command + +@@ -55,7 +54,7 @@ def suggest_type(full_text, text_before_cursor): + stmt_start, stmt_end = 0, 0 + + for statement in parsed: +- stmt_len = len(text_type(statement)) ++ stmt_len = len(str(statement)) + stmt_start, stmt_end = stmt_end, stmt_end + stmt_len + + if stmt_end >= current_pos: diff --git a/databases/py-mycli/files/patch-setup.py b/databases/py-mycli/files/patch-setup.py new file mode 100644 index 000000000000..1ef14ba5b51b --- /dev/null +++ b/databases/py-mycli/files/patch-setup.py @@ -0,0 +1,11 @@ +--- setup.py.orig 2020-07-25 03:46:06 UTC ++++ setup.py +@@ -21,7 +21,7 @@ install_requirements = [ + 'Pygments >= 1.6', + 'prompt_toolkit>=3.0.0,<4.0.0', + 'PyMySQL >= 0.9.2', +- 'sqlparse>=0.3.0,<0.4.0', ++ 'sqlparse>=0.3.0', + 'configobj >= 5.0.5', + 'cryptography >= 1.0.0', + 'cli_helpers[styles] > 1.1.0', diff --git a/databases/py-mycli/pkg-descr b/databases/py-mycli/pkg-descr index 3608f6248ac4..ff81a4f495fe 100644 --- a/databases/py-mycli/pkg-descr +++ b/databases/py-mycli/pkg-descr @@ -1,5 +1,5 @@ mycli is a command line interface for MySQL, MariaDB, and Percona with auto-completion and syntax highlighting. -WWW: https://pypi.org/project/mycli/ WWW: https://www.mycli.net/ +WWW: https://github.com/dbcli/mycli