sqlalchemy-singlestoredb 1.1.1__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {sqlalchemy_singlestoredb-1.1.1/sqlalchemy_singlestoredb.egg-info → sqlalchemy_singlestoredb-1.1.2}/PKG-INFO +4 -4
  2. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/setup.cfg +2 -3
  3. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/__init__.py +1 -1
  4. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/base.py +30 -1
  5. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2/sqlalchemy_singlestoredb.egg-info}/PKG-INFO +4 -4
  6. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/LICENSE +0 -0
  7. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/README.md +0 -0
  8. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/setup.py +0 -0
  9. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/column.py +0 -0
  10. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/ddlelement.py +0 -0
  11. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/dtypes.py +0 -0
  12. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/reflection.py +0 -0
  13. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/tests/__init__.py +0 -0
  14. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/tests/test.sql +0 -0
  15. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb/tests/test_basics.py +0 -0
  16. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb.egg-info/SOURCES.txt +0 -0
  17. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb.egg-info/dependency_links.txt +0 -0
  18. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb.egg-info/entry_points.txt +0 -0
  19. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb.egg-info/requires.txt +0 -0
  20. {sqlalchemy_singlestoredb-1.1.1 → sqlalchemy_singlestoredb-1.1.2}/sqlalchemy_singlestoredb.egg-info/top_level.txt +0 -0
@@ -1,20 +1,20 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sqlalchemy_singlestoredb
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: SQLAlchemy dialect for the SingleStoreDB database
5
5
  Home-page: https://github.com/singlestore-labs/sqlalchemy-singlestoredb
6
6
  Author: SingleStore
7
7
  Author-email: support@singlestore.com
8
8
  License: Apache-2.0
9
9
  Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: License :: OSI Approved :: Apache Software License
11
10
  Classifier: Programming Language :: Python :: 3
12
11
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Requires-Python: >=3.8
12
+ Requires-Python: >=3.9
14
13
  Description-Content-Type: text/markdown
15
14
  License-File: LICENSE
16
15
  Requires-Dist: singlestoredb>=1.0.0
17
16
  Requires-Dist: sqlalchemy<3.0.0dev,>=1.4.0
17
+ Dynamic: license-file
18
18
 
19
19
  # <img src="https://raw.githubusercontent.com/singlestore-labs/singlestoredb-python/main/resources/singlestore-logo.png" height="60" valign="middle"/> SingleStoreDB SQLAlchemy Dialect
20
20
 
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = sqlalchemy_singlestoredb
3
- version = 1.1.1
3
+ version = 1.1.2
4
4
  description = SQLAlchemy dialect for the SingleStoreDB database
5
5
  long_description = file: README.md
6
6
  long_description_content_type = text/markdown
@@ -11,7 +11,6 @@ license = Apache-2.0
11
11
  license_files = LICENSE
12
12
  classifiers =
13
13
  Development Status :: 5 - Production/Stable
14
- License :: OSI Approved :: Apache Software License
15
14
  Programming Language :: Python :: 3
16
15
  Programming Language :: Python :: 3 :: Only
17
16
 
@@ -20,7 +19,7 @@ packages = find:
20
19
  install_requires =
21
20
  singlestoredb>=1.0.0
22
21
  sqlalchemy>=1.4.0,<3.0.0dev
23
- python_requires = >=3.8
22
+ python_requires = >=3.9
24
23
  tests_require =
25
24
  coverage
26
25
  pytest
@@ -51,7 +51,7 @@ array = base.array
51
51
  # default dialect
52
52
  dialect = base.dialect
53
53
 
54
- __version__ = '1.1.1'
54
+ __version__ = '1.1.2'
55
55
 
56
56
  __all__ = (
57
57
  'BIGINT',
@@ -8,6 +8,8 @@ from typing import Dict
8
8
  from typing import List
9
9
  from typing import Optional
10
10
  from typing import Type
11
+ from urllib.parse import quote
12
+ from urllib.parse import quote_plus
11
13
 
12
14
  import sqlalchemy.sql.elements as se
13
15
  from sqlalchemy import util
@@ -318,6 +320,33 @@ class _myconnpyBIT(BIT):
318
320
  return None
319
321
 
320
322
 
323
+ def render_as_string(url: URL) -> str:
324
+ s = url.drivername + '://'
325
+ if url.username is not None:
326
+ s += quote(url.username)
327
+ if url.password is not None:
328
+ s += ':' + quote(str(url.password))
329
+ s += '@'
330
+ if url.host is not None:
331
+ if ':' in url.host:
332
+ s += f'[{url.host}]'
333
+ else:
334
+ s += url.host
335
+ if url.port is not None:
336
+ s += ':' + str(url.port)
337
+ if url.database is not None:
338
+ s += '/' + url.database
339
+ if url.query:
340
+ keys = list(url.query)
341
+ keys.sort()
342
+ s += '?' + '&'.join(
343
+ f'{quote_plus(k)}={quote_plus(element)}'
344
+ for k in keys
345
+ for element in util.to_list(url.query[k])
346
+ )
347
+ return s
348
+
349
+
321
350
  class SingleStoreDBDialect(MySQLDialect):
322
351
  """SingleStoreDB SQLAlchemy dialect."""
323
352
 
@@ -383,7 +412,7 @@ class SingleStoreDBDialect(MySQLDialect):
383
412
 
384
413
  def create_connect_args(self, url: URL) -> List[Any]:
385
414
  from singlestoredb.connection import build_params
386
- return [[], build_params(host=url.render_as_string(hide_password=False))]
415
+ return [[], build_params(host=render_as_string(url))]
387
416
 
388
417
  def _extract_error_code(self, exception: Exception) -> int:
389
418
  return getattr(exception, 'errno', -1)
@@ -1,20 +1,20 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: sqlalchemy_singlestoredb
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: SQLAlchemy dialect for the SingleStoreDB database
5
5
  Home-page: https://github.com/singlestore-labs/sqlalchemy-singlestoredb
6
6
  Author: SingleStore
7
7
  Author-email: support@singlestore.com
8
8
  License: Apache-2.0
9
9
  Classifier: Development Status :: 5 - Production/Stable
10
- Classifier: License :: OSI Approved :: Apache Software License
11
10
  Classifier: Programming Language :: Python :: 3
12
11
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Requires-Python: >=3.8
12
+ Requires-Python: >=3.9
14
13
  Description-Content-Type: text/markdown
15
14
  License-File: LICENSE
16
15
  Requires-Dist: singlestoredb>=1.0.0
17
16
  Requires-Dist: sqlalchemy<3.0.0dev,>=1.4.0
17
+ Dynamic: license-file
18
18
 
19
19
  # <img src="https://raw.githubusercontent.com/singlestore-labs/singlestoredb-python/main/resources/singlestore-logo.png" height="60" valign="middle"/> SingleStoreDB SQLAlchemy Dialect
20
20