!22 update python-sqlalchemy for openstack wallaby

From: @liksh
Reviewed-by: @huangtianhua
Signed-off-by:
This commit is contained in:
openeuler-ci-bot 2021-08-19 06:14:47 +00:00 committed by Gitee
commit b449672e60
5 changed files with 74 additions and 68 deletions

Binary file not shown.

BIN
SQLAlchemy-1.3.23.tar.gz Normal file

Binary file not shown.

View File

@ -2,3 +2,4 @@ version_control: github
src_repo: sqlalchemy/sqlalchemy src_repo: sqlalchemy/sqlalchemy
tag_prefix: rel tag_prefix: rel
seperator: _ seperator: _

View File

@ -1,12 +1,12 @@
%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ %global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$
Name: python-sqlalchemy Name: python-sqlalchemy
Version: 1.3.22 Version: 1.3.23
Release: 3 Release: 1
Summary: SQL toolkit and object relational mapper for Python Summary: SQL toolkit and object relational mapper for Python
License: MIT License: MIT
URL: http://www.sqlalchemy.org/ URL: http://www.sqlalchemy.org/
Source0: https://files.pythonhosted.org/packages/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/ac/cd/f871773f1c1eb043f639b6751d6342539a45da0836bfede6a6889cea5255/SQLAlchemy-1.3.23.tar.gz
Patch0: tests_overcome_bpo42967.patch Patch0: tests_overcome_bpo42967.patch
@ -64,6 +64,9 @@ PYTHONPATH=. %{__python3} -m pytest test
%doc doc examples %doc doc examples
%changelog %changelog
* Tue Aug 10 2021 OpenStack_SIG <openstack@openeuler.org> - 1.3.23-1
- update to 1.3.23
* Tue Jun 22 2021 shixuantong <shixuantong@huawei.com> - 1.3.22-3 * Tue Jun 22 2021 shixuantong <shixuantong@huawei.com> - 1.3.22-3
- Type: bugfix - Type: bugfix
- ID: NA - ID: NA
@ -90,3 +93,4 @@ PYTHONPATH=. %{__python3} -m pytest test
* Tue Nov 26 2019 yanzhihua <yanzhihua4@huawei.com> - 1.2.11-2 * Tue Nov 26 2019 yanzhihua <yanzhihua4@huawei.com> - 1.2.11-2
- Package init - Package init

View File

@ -1,65 +1,66 @@
--- ---
lib/sqlalchemy/engine/url.py | 14 ++++++++++---- lib/sqlalchemy/engine/url.py | 14 ++++++++++----
test/dialect/mssql/test_engine.py | 3 ++- test/dialect/mssql/test_engine.py | 3 ++-
2 files changed, 12 insertions(+), 5 deletions(-) 2 files changed, 12 insertions(+), 5 deletions(-)
--- a/lib/sqlalchemy/engine/url.py --- a/lib/sqlalchemy/engine/url.py
+++ b/lib/sqlalchemy/engine/url.py +++ b/lib/sqlalchemy/engine/url.py
@@ -14,6 +14,7 @@ argument; alternatively, the URL is a pu @@ -14,6 +14,7 @@ argument; alternatively, the URL is a pu
be used directly and is also accepted directly by ``create_engine()``. be used directly and is also accepted directly by ``create_engine()``.
""" """
+import inspect +import inspect
import re import re
from .interfaces import Dialect from .interfaces import Dialect
@@ -218,7 +219,7 @@ class URL(object): @@ -218,7 +219,7 @@ class URL(object):
return translated return translated
-def make_url(name_or_url): -def make_url(name_or_url):
+def make_url(name_or_url, separator='&'): +def make_url(name_or_url, separator='&'):
"""Given a string or unicode instance, produce a new URL instance. """Given a string or unicode instance, produce a new URL instance.
The given string is parsed according to the RFC 1738 spec. If an The given string is parsed according to the RFC 1738 spec. If an
@@ -226,12 +227,12 @@ def make_url(name_or_url): @@ -226,12 +227,12 @@ def make_url(name_or_url):
""" """
if isinstance(name_or_url, util.string_types): if isinstance(name_or_url, util.string_types):
- return _parse_rfc1738_args(name_or_url) - return _parse_rfc1738_args(name_or_url)
+ return _parse_rfc1738_args(name_or_url, separator) + return _parse_rfc1738_args(name_or_url, separator)
else: else:
return name_or_url return name_or_url
-def _parse_rfc1738_args(name): -def _parse_rfc1738_args(name):
+def _parse_rfc1738_args(name, qs_sep): +def _parse_rfc1738_args(name, qs_sep):
pattern = re.compile( pattern = re.compile(
r""" r"""
(?P<name>[\w\+]+):// (?P<name>[\w\+]+)://
@@ -261,7 +262,12 @@ def _parse_rfc1738_args(name): @@ -261,7 +262,12 @@ def _parse_rfc1738_args(name):
if len(tokens) > 1: if len(tokens) > 1:
query = {} query = {}
- for key, value in util.parse_qsl(tokens[1]): - for key, value in util.parse_qsl(tokens[1]):
+ if 'separator' in inspect.signature(util.parse_qsl).parameters: + if 'separator' in inspect.signature(util.parse_qsl).parameters:
+ qs_dict = util.parse_qsl(tokens[1], separator=qs_sep) + qs_dict = util.parse_qsl(tokens[1], separator=qs_sep)
+ else: + else:
+ qs_dict = util.parse_qsl(tokens[1]) + qs_dict = util.parse_qsl(tokens[1])
+ +
+ for key, value in qs_dict: + for key, value in qs_dict:
if util.py2k: if util.py2k:
key = key.encode("ascii") key = key.encode("ascii")
if key in query: if key in query:
--- a/test/dialect/mssql/test_engine.py --- a/test/dialect/mssql/test_engine.py
+++ b/test/dialect/mssql/test_engine.py +++ b/test/dialect/mssql/test_engine.py
@@ -164,7 +164,8 @@ class ParseConnectTest(fixtures.TestBase @@ -164,7 +164,8 @@ class ParseConnectTest(fixtures.TestBase
u = url.make_url( u = url.make_url(
"mssql+pyodbc://@server_name/db_name?" "mssql+pyodbc://@server_name/db_name?"
"driver=ODBC+Driver+17+for+SQL+Server;" "driver=ODBC+Driver+17+for+SQL+Server;"
- "authentication=ActiveDirectoryIntegrated" - "authentication=ActiveDirectoryIntegrated"
+ "authentication=ActiveDirectoryIntegrated", + "authentication=ActiveDirectoryIntegrated",
+ separator=';' + separator=';'
) )
connection = dialect.create_connect_args(u) connection = dialect.create_connect_args(u)
eq_(connection[1], {}) eq_(connection[1], {})