yhttp-dbmanager 9.1.1__tar.gz → 9.2.0__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 (23) hide show
  1. {yhttp_dbmanager-9.1.1/yhttp_dbmanager.egg-info → yhttp_dbmanager-9.2.0}/PKG-INFO +2 -2
  2. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/setup.py +1 -1
  3. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp/ext/dbmanager/__init__.py +1 -1
  4. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp/ext/dbmanager/dbmanager.py +4 -5
  5. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp/ext/dbmanager/migration.py +2 -2
  6. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0/yhttp_dbmanager.egg-info}/PKG-INFO +2 -2
  7. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp_dbmanager.egg-info/requires.txt +1 -1
  8. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/LICENSE +0 -0
  9. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/README.md +0 -0
  10. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/setup.cfg +0 -0
  11. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/tests/test_cli_createdrop.py +0 -0
  12. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/tests/test_cli_migration.py +0 -0
  13. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/tests/test_cli_usercommand.py +0 -0
  14. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/tests/test_dbmanager.py +0 -0
  15. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/tests/test_dburi.py +0 -0
  16. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/tests/test_install.py +0 -0
  17. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/tests/test_migrator.py +0 -0
  18. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp/ext/dbmanager/cli.py +0 -0
  19. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp/ext/dbmanager/install.py +0 -0
  20. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp/ext/dbmanager/uri.py +0 -0
  21. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp_dbmanager.egg-info/SOURCES.txt +0 -0
  22. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp_dbmanager.egg-info/dependency_links.txt +0 -0
  23. {yhttp_dbmanager-9.1.1 → yhttp_dbmanager-9.2.0}/yhttp_dbmanager.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yhttp-dbmanager
3
- Version: 9.1.1
3
+ Version: 9.2.0
4
4
  Summary: Database manager command line interface and API for yhttp.
5
5
  Home-page: http://github.com/yhttp/yhttp-dbmanager
6
6
  Author: Vahid Mardani
@@ -23,7 +23,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: yhttp<10,>=9.1
26
- Requires-Dist: psycopg2
26
+ Requires-Dist: psycopg[c]
27
27
  Dynamic: author
28
28
  Dynamic: author-email
29
29
  Dynamic: classifier
@@ -19,7 +19,7 @@ with open(
19
19
 
20
20
  dependencies = [
21
21
  'yhttp >= 9.1, < 10',
22
- 'psycopg2',
22
+ 'psycopg[c]',
23
23
  ]
24
24
 
25
25
 
@@ -6,4 +6,4 @@ from .uri import DatabaseURI
6
6
  from .migration import Migrator
7
7
 
8
8
 
9
- __version__ = '9.1.1'
9
+ __version__ = '9.2.0'
@@ -1,7 +1,6 @@
1
1
  import abc
2
2
 
3
- import psycopg2
4
- from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT
3
+ import psycopg
5
4
 
6
5
 
7
6
  class DatabaseManager(metaclass=abc.ABCMeta):
@@ -31,13 +30,13 @@ class PostgresqlManager(DatabaseManager):
31
30
 
32
31
  def __init__(self, host=None, database='postgres', user=None,
33
32
  password=None):
34
- self.connection = psycopg2.connect(
33
+ self.connection = psycopg.connect(
35
34
  host=host,
36
35
  dbname=database,
37
36
  user=user,
38
- password=password
37
+ password=password,
38
+ autocommit=True,
39
39
  )
40
- self.connection.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
41
40
 
42
41
  def execute(self, query):
43
42
  cursor = self.connection.cursor()
@@ -4,7 +4,7 @@ import importlib
4
4
  from functools import cached_property
5
5
  from contextlib import contextmanager
6
6
 
7
- import psycopg2
7
+ import psycopg
8
8
 
9
9
 
10
10
  VERSIONFILE_TEMPLATE = '''\
@@ -23,7 +23,7 @@ class Database:
23
23
 
24
24
  @cached_property
25
25
  def connection(self):
26
- return psycopg2.connect(self.url)
26
+ return psycopg.connect(self.url)
27
27
 
28
28
  def commit(self):
29
29
  self.connection.commit()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yhttp-dbmanager
3
- Version: 9.1.1
3
+ Version: 9.2.0
4
4
  Summary: Database manager command line interface and API for yhttp.
5
5
  Home-page: http://github.com/yhttp/yhttp-dbmanager
6
6
  Author: Vahid Mardani
@@ -23,7 +23,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: yhttp<10,>=9.1
26
- Requires-Dist: psycopg2
26
+ Requires-Dist: psycopg[c]
27
27
  Dynamic: author
28
28
  Dynamic: author-email
29
29
  Dynamic: classifier
@@ -1,2 +1,2 @@
1
1
  yhttp<10,>=9.1
2
- psycopg2
2
+ psycopg[c]
File without changes