Update to 2.1.1

Changes:	https://github.com/dbcli/pgcli/blob/master/changelog.rst
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2019-05-31 10:27:59 +00:00
parent 689c2d7d37
commit 21f7254c61
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=503136
3 changed files with 5 additions and 62 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= pgcli
PORTVERSION= 2.1.0
PORTREVISION= 1
PORTVERSION= 2.1.1
CATEGORIES= databases python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -23,7 +22,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cli-helpers>=1.2.0:devel/py-cli-helpers@${PY
${PYTHON_PKGNAMEPREFIX}psycopg2>=2.7.4:databases/py-psycopg2@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pygments>=2.0:textproc/py-pygments@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setproctitle>=1.1.9:devel/py-setproctitle@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sqlparse>=0.2.2<0.4:databases/py-sqlparse@${PY_FLAVOR}
${PYTHON_PKGNAMEPREFIX}sqlparse>=0.3.0<0.4:databases/py-sqlparse@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=2.7.0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}mock>=1.0.1:devel/py-mock@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pexpect>=0:misc/py-pexpect@${PY_FLAVOR}

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1555504008
SHA256 (pgcli-2.1.0.tar.gz) = 3791a3c7734802fd14fefe9d18082a95687a02631f3287bd154cd27b4f12c05c
SIZE (pgcli-2.1.0.tar.gz) = 113063
TIMESTAMP = 1559293001
SHA256 (pgcli-2.1.1.tar.gz) = 84e0817a29c3cacaaaf85351422bdb90f230f2550e4af558c25536fd235ab6ca
SIZE (pgcli-2.1.1.tar.gz) = 115729

View File

@ -1,56 +0,0 @@
# Upgrade to sqlparse 0.3.0 #1052
# https://github.com/dbcli/pgcli/pull/1052
# Unpin psycopg2
# https://github.com/dbcli/pgcli/issues/1036
# https://github.com/dbcli/pgcli/pull/1059
From 1908142adb80f324d6c795e76e38f7939948d7f1 Mon Sep 17 00:00:00 2001
From: Amjith Ramanujam <amjith.r@gmail.com>
Date: Mon, 6 May 2019 09:05:56 -0700
Subject: [PATCH 4/5] Upgrade to sqlparse 0.3.0.
--- pgcli/packages/sqlcompletion.py.orig 2018-09-28 21:20:16 UTC
+++ pgcli/packages/sqlcompletion.py
@@ -154,7 +154,7 @@ def suggest_type(full_text, text_before_cursor):
# Be careful here because trivial whitespace is parsed as a
# statement, but the statement won't have a first token
tok1 = stmt.parsed.token_first()
- if tok1 and tok1.value == '\\':
+ if tok1 and tok1.value.startswith('\\'):
text = stmt.text_before_cursor + stmt.word_before_cursor
return suggest_special(text)
@@ -398,7 +398,7 @@ def suggest_based_on_last_token(token, stmt):
elif token_v == 'set':
return (Column(table_refs=stmt.get_tables(),
local_tables=stmt.local_tables),)
- elif token_v in ('select', 'where', 'having', 'by', 'distinct'):
+ elif token_v in ('select', 'where', 'having', 'order by', 'distinct'):
# Check for a table alias or schema qualification
parent = (stmt.identifier and stmt.identifier.get_parent_name()) or []
tables = stmt.get_tables()
--- setup.py.orig 2019-04-06 00:24:36 UTC
+++ setup.py
@@ -16,8 +16,8 @@ install_requirements = [
'click >= 4.1',
'Pygments >= 2.0', # Pygments has to be Capitalcased. WTF?
'prompt_toolkit>=2.0.6,<2.1.0',
- 'psycopg2 >= 2.7.4,<2.8',
- 'sqlparse >=0.2.2,<0.3.0',
+ 'psycopg2 >= 2.7.4',
+ 'sqlparse >=0.2.2,<0.4',
'configobj >= 5.0.6',
'humanize >= 0.5.1',
'cli_helpers[styles] >= 1.2.0',
--- tests/test_sqlcompletion.py.orig 2018-01-11 20:31:20 UTC
+++ tests/test_sqlcompletion.py
@@ -236,7 +236,7 @@ def test_distinct_suggests_cols(text):
(
'SELECT * FROM tbl x JOIN tbl1 y ORDER BY ',
'SELECT * FROM tbl x JOIN tbl1 y ORDER BY ',
- 'BY',
+ 'ORDER BY',
)
])
def test_distinct_and_order_by_suggestions_with_aliases(text, text_before,