Compare commits
No commits in common. "d08b9265fb72973b44fe262c33257a80806d1e6c" and "b8254f089489b209af77e7b7d1e3d6532590f8b6" have entirely different histories.
d08b9265fb
...
b8254f0894
@ -1,28 +0,0 @@
|
|||||||
From 55c30253b61fb3e1fbe6db4b2cb8a487ce908fe6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: baizg1107 <preloyalwhite@163.com>
|
|
||||||
Date: Mon, 20 Jun 2022 11:52:47 +0800
|
|
||||||
Subject: [PATCH] fix none type judge
|
|
||||||
|
|
||||||
---
|
|
||||||
lib/sqlalchemy/engine/base.py | 5 +++--
|
|
||||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
|
|
||||||
index 0e695f6..fefc43b 100644
|
|
||||||
--- a/lib/sqlalchemy/engine/base.py
|
|
||||||
+++ b/lib/sqlalchemy/engine/base.py
|
|
||||||
@@ -152,8 +152,9 @@ class Connection(Connectable):
|
|
||||||
account current schema translate map.
|
|
||||||
|
|
||||||
"""
|
|
||||||
-
|
|
||||||
- name = obj.schema
|
|
||||||
+ name = None
|
|
||||||
+ if obj is not None:
|
|
||||||
+ name = obj.schema
|
|
||||||
schema_translate_map = self._execution_options.get(
|
|
||||||
"schema_translate_map", None
|
|
||||||
)
|
|
||||||
--
|
|
||||||
2.27.0
|
|
||||||
|
|
||||||
36
README.en.md
Normal file
36
README.en.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# python-sqlalchemy
|
||||||
|
|
||||||
|
#### Description
|
||||||
|
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
||||||
|
|
||||||
|
#### Software Architecture
|
||||||
|
Software architecture description
|
||||||
|
|
||||||
|
#### Installation
|
||||||
|
|
||||||
|
1. xxxx
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### Instructions
|
||||||
|
|
||||||
|
1. xxxx
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### Contribution
|
||||||
|
|
||||||
|
1. Fork the repository
|
||||||
|
2. Create Feat_xxx branch
|
||||||
|
3. Commit your code
|
||||||
|
4. Create Pull Request
|
||||||
|
|
||||||
|
|
||||||
|
#### Gitee Feature
|
||||||
|
|
||||||
|
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
||||||
|
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
||||||
|
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
||||||
|
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
||||||
|
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
||||||
|
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||||
39
README.md
Normal file
39
README.md
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# python-sqlalchemy
|
||||||
|
|
||||||
|
#### 介绍
|
||||||
|
{**以下是码云平台说明,您可以替换此简介**
|
||||||
|
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||||
|
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||||
|
|
||||||
|
#### 软件架构
|
||||||
|
软件架构说明
|
||||||
|
|
||||||
|
|
||||||
|
#### 安装教程
|
||||||
|
|
||||||
|
1. xxxx
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### 使用说明
|
||||||
|
|
||||||
|
1. xxxx
|
||||||
|
2. xxxx
|
||||||
|
3. xxxx
|
||||||
|
|
||||||
|
#### 参与贡献
|
||||||
|
|
||||||
|
1. Fork 本仓库
|
||||||
|
2. 新建 Feat_xxx 分支
|
||||||
|
3. 提交代码
|
||||||
|
4. 新建 Pull Request
|
||||||
|
|
||||||
|
|
||||||
|
#### 码云特技
|
||||||
|
|
||||||
|
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||||
|
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||||
|
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
||||||
|
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
||||||
|
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||||
|
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||||
BIN
SQLAlchemy-1.3.22.tar.gz
Normal file
BIN
SQLAlchemy-1.3.22.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -1,15 +1,16 @@
|
|||||||
%global __provides_exclude_from ^(%{python3_sitearch})/.*\\.so$
|
%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$
|
||||||
|
|
||||||
Name: python-sqlalchemy
|
Name: python-sqlalchemy
|
||||||
Version: 1.4.48
|
Version: 1.3.22
|
||||||
Release: 1
|
Release: 3
|
||||||
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/source/S/SQLAlchemy/SQLAlchemy-%{version}.tar.gz
|
||||||
Patch0: 0001-fix-none-type-judge.patch
|
|
||||||
BuildRequires: python3-devel python3-setuptools python3-pytest gcc python3-greenlet
|
Patch0: tests_overcome_bpo42967.patch
|
||||||
Requires: python3-greenlet
|
|
||||||
|
BuildRequires: python3-devel python3-setuptools python3-pytest gcc
|
||||||
|
|
||||||
%description
|
%description
|
||||||
SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible,
|
SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible,
|
||||||
@ -63,21 +64,6 @@ PYTHONPATH=. %{__python3} -m pytest test
|
|||||||
%doc doc examples
|
%doc doc examples
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Jun 16 2023 yaoxin <yao_xin001@hoperun.com> - 1.4.48-1
|
|
||||||
- Update to 1.4.48
|
|
||||||
|
|
||||||
* Mon Jun 20 2022 baizhonggui <baizhonggui@h-partners.com> - 1.4.31-2
|
|
||||||
- Fix None type judgment
|
|
||||||
|
|
||||||
* Wed Jun 01 2022 huangtianhua <huangtianhua@huawei.com> - 1.4.31-1
|
|
||||||
- update to 1.4.31
|
|
||||||
|
|
||||||
* Wed Dec 22 2021 guozhaorui <guozhaorui1@huawei.com> - 1.3.24-1
|
|
||||||
- update to 1.3.24
|
|
||||||
|
|
||||||
* 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
|
||||||
@ -104,4 +90,3 @@ 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
|
||||||
|
|
||||||
@ -2,4 +2,3 @@ version_control: github
|
|||||||
src_repo: sqlalchemy/sqlalchemy
|
src_repo: sqlalchemy/sqlalchemy
|
||||||
tag_prefix: rel
|
tag_prefix: rel
|
||||||
seperator: _
|
seperator: _
|
||||||
|
|
||||||
|
|||||||
65
tests_overcome_bpo42967.patch
Normal file
65
tests_overcome_bpo42967.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
---
|
||||||
|
lib/sqlalchemy/engine/url.py | 14 ++++++++++----
|
||||||
|
test/dialect/mssql/test_engine.py | 3 ++-
|
||||||
|
2 files changed, 12 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/sqlalchemy/engine/url.py
|
||||||
|
+++ b/lib/sqlalchemy/engine/url.py
|
||||||
|
@@ -14,6 +14,7 @@ argument; alternatively, the URL is a pu
|
||||||
|
be used directly and is also accepted directly by ``create_engine()``.
|
||||||
|
"""
|
||||||
|
|
||||||
|
+import inspect
|
||||||
|
import re
|
||||||
|
|
||||||
|
from .interfaces import Dialect
|
||||||
|
@@ -218,7 +219,7 @@ class URL(object):
|
||||||
|
return translated
|
||||||
|
|
||||||
|
|
||||||
|
-def make_url(name_or_url):
|
||||||
|
+def make_url(name_or_url, separator='&'):
|
||||||
|
"""Given a string or unicode instance, produce a new URL instance.
|
||||||
|
|
||||||
|
The given string is parsed according to the RFC 1738 spec. If an
|
||||||
|
@@ -226,12 +227,12 @@ def make_url(name_or_url):
|
||||||
|
"""
|
||||||
|
|
||||||
|
if isinstance(name_or_url, util.string_types):
|
||||||
|
- return _parse_rfc1738_args(name_or_url)
|
||||||
|
+ return _parse_rfc1738_args(name_or_url, separator)
|
||||||
|
else:
|
||||||
|
return name_or_url
|
||||||
|
|
||||||
|
|
||||||
|
-def _parse_rfc1738_args(name):
|
||||||
|
+def _parse_rfc1738_args(name, qs_sep):
|
||||||
|
pattern = re.compile(
|
||||||
|
r"""
|
||||||
|
(?P<name>[\w\+]+)://
|
||||||
|
@@ -261,7 +262,12 @@ def _parse_rfc1738_args(name):
|
||||||
|
if len(tokens) > 1:
|
||||||
|
query = {}
|
||||||
|
|
||||||
|
- for key, value in util.parse_qsl(tokens[1]):
|
||||||
|
+ if 'separator' in inspect.signature(util.parse_qsl).parameters:
|
||||||
|
+ qs_dict = util.parse_qsl(tokens[1], separator=qs_sep)
|
||||||
|
+ else:
|
||||||
|
+ qs_dict = util.parse_qsl(tokens[1])
|
||||||
|
+
|
||||||
|
+ for key, value in qs_dict:
|
||||||
|
if util.py2k:
|
||||||
|
key = key.encode("ascii")
|
||||||
|
if key in query:
|
||||||
|
--- a/test/dialect/mssql/test_engine.py
|
||||||
|
+++ b/test/dialect/mssql/test_engine.py
|
||||||
|
@@ -164,7 +164,8 @@ class ParseConnectTest(fixtures.TestBase
|
||||||
|
u = url.make_url(
|
||||||
|
"mssql+pyodbc://@server_name/db_name?"
|
||||||
|
"driver=ODBC+Driver+17+for+SQL+Server;"
|
||||||
|
- "authentication=ActiveDirectoryIntegrated"
|
||||||
|
+ "authentication=ActiveDirectoryIntegrated",
|
||||||
|
+ separator=';'
|
||||||
|
)
|
||||||
|
connection = dialect.create_connect_args(u)
|
||||||
|
eq_(connection[1], {})
|
||||||
Loading…
x
Reference in New Issue
Block a user