diff --git a/python-sqlparse.changes b/python-sqlparse.changes index 6948036..9cb2435 100644 --- a/python-sqlparse.changes +++ b/python-sqlparse.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Thu Nov 26 08:42:20 UTC 2020 - Dirk Mueller + +- update to 0.4.1: + * Python 3.9 support + * Remove support for end-of-life Python 2.7 and 3.4. Python 3.5+ is now + required. + * Remaining strings that only consist of whitespaces are not treated as + statements anymore. Code that ignored the last element from + sqlparse.split() should be updated accordingly since that function + now doesn't return an empty string as the last element in some + cases (issue496). +- remove non-upstream stdout-encoding-set.patch patch + ------------------------------------------------------------------- Tue Mar 24 02:45:39 UTC 2020 - Steve Kowalik diff --git a/python-sqlparse.spec b/python-sqlparse.spec index 97feae3..14327f0 100644 --- a/python-sqlparse.spec +++ b/python-sqlparse.spec @@ -18,14 +18,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-sqlparse -Version: 0.3.1 +Version: 0.4.1 Release: 0 Summary: Non-validating SQL parser License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/andialbrecht/sqlparse Source: https://files.pythonhosted.org/packages/source/s/sqlparse/sqlparse-%{version}.tar.gz -Patch0: stdout-encoding-set.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -43,7 +42,6 @@ parsing, splitting and formatting SQL statements. %prep %setup -q -n sqlparse-%{version} sed -i -e '1{\,^#!%{_bindir}/env python,d}' sqlparse/__main__.py sqlparse/cli.py -%autopatch -p1 %build %python_build diff --git a/sqlparse-0.3.1.tar.gz b/sqlparse-0.3.1.tar.gz deleted file mode 100644 index abd043c..0000000 --- a/sqlparse-0.3.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e162203737712307dfe78860cc56c8da8a852ab2ee33750e33aeadf38d12c548 -size 67572 diff --git a/sqlparse-0.4.1.tar.gz b/sqlparse-0.4.1.tar.gz new file mode 100644 index 0000000..f54bea9 --- /dev/null +++ b/sqlparse-0.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8 +size 67228 diff --git a/stdout-encoding-set.patch b/stdout-encoding-set.patch deleted file mode 100644 index 010dc66..0000000 --- a/stdout-encoding-set.patch +++ /dev/null @@ -1,59 +0,0 @@ -Index: sqlparse-0.3.1/tests/test_cli.py -=================================================================== ---- sqlparse-0.3.1.orig/tests/test_cli.py -+++ sqlparse-0.3.1/tests/test_cli.py -@@ -1,5 +1,6 @@ - # -*- coding: utf-8 -*- - -+import io - import subprocess - import sys - -@@ -78,7 +79,10 @@ def test_script(): - def test_encoding_utf8_stdout(filepath, load_file, capfd): - path = filepath('encoding_utf8.sql') - expected = load_file('encoding_utf8.sql', 'utf-8') -- sys.stdout.encoding = 'utf-8' -+ if isinstance(sys.stdout, io.TextIOWrapper): -+ sys.stdout.reconfigure(encoding='utf-8') -+ else: -+ sys.stdout.encoding = 'utf-8' - sqlparse.cli.main([path]) - out, _ = capfd.readouterr() - assert out == expected -@@ -96,7 +100,10 @@ def test_encoding_utf8_output_file(filep - def test_encoding_gbk_stdout(filepath, load_file, capfd): - path = filepath('encoding_gbk.sql') - expected = load_file('encoding_gbk.sql', 'gbk') -- sys.stdout.encoding = 'gbk' -+ if isinstance(sys.stdout, io.TextIOWrapper): -+ sys.stdout.reconfigure(encoding='gbk') -+ else: -+ sys.stdout.encoding = 'gbk' - sqlparse.cli.main([path, '--encoding', 'gbk']) - out, _ = capfd.readouterr() - assert out == expected -@@ -117,7 +124,10 @@ def test_encoding_stdin_utf8(filepath, l - old_stdin = sys.stdin - with open(path, 'r') as f: - sys.stdin = f -- sys.stdout.encoding = 'utf-8' -+ if isinstance(sys.stdout, io.TextIOWrapper): -+ sys.stdout.reconfigure(encoding='utf-8') -+ else: -+ sys.stdout.encoding = 'utf-8' - sqlparse.cli.main(['-']) - sys.stdin = old_stdin - out, _ = capfd.readouterr() -@@ -130,7 +140,10 @@ def test_encoding_stdin_gbk(filepath, lo - old_stdin = sys.stdin - with open(path, 'r') as stream: - sys.stdin = stream -- sys.stdout.encoding = 'gbk' -+ if isinstance(sys.stdout, io.TextIOWrapper): -+ sys.stdout.reconfigure(encoding='gbk') -+ else: -+ sys.stdout.encoding = 'gbk' - sqlparse.cli.main(['-', '--encoding', 'gbk']) - sys.stdin = old_stdin - out, _ = capfd.readouterr()