archipy-postgres 5.14.0__tar.gz → 5.16.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.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: archipy-postgres
3
- Version: 5.14.0
3
+ Version: 5.16.0
4
4
  Summary: ArchiPy postgres adapter.
5
5
  Author-email: Hossein Nejati <hosseinnejati14@gmail.com>
6
6
  License-Expression: Apache-2.0
7
7
  Requires-Python: <4,>=3.14
8
- Requires-Dist: archipy==5.14.0
8
+ Requires-Dist: archipy==5.16.0
9
9
  Requires-Dist: psycopg[binary,pool]>=3.3.6
10
10
  Description-Content-Type: text/markdown
11
11
 
@@ -30,7 +30,7 @@ class PostgresSQLAlchemyAdapter(BaseSQLAlchemyAdapter[PostgresSQLAlchemyConfig])
30
30
  Args:
31
31
  orm_config: PostgreSQL-specific configuration. If None, uses global config.
32
32
  """
33
- configs = BaseConfig.global_config().POSTGRES_SQLALCHEMY if orm_config is None else orm_config
33
+ configs = orm_config or BaseConfig.global_config().POSTGRES_SQLALCHEMY
34
34
  super().__init__(configs)
35
35
 
36
36
  @override
@@ -62,7 +62,7 @@ class AsyncPostgresSQLAlchemyAdapter(AsyncBaseSQLAlchemyAdapter[PostgresSQLAlche
62
62
  Args:
63
63
  orm_config: PostgreSQL-specific configuration. If None, uses global config.
64
64
  """
65
- configs = BaseConfig.global_config().POSTGRES_SQLALCHEMY if orm_config is None else orm_config
65
+ configs = orm_config or BaseConfig.global_config().POSTGRES_SQLALCHEMY
66
66
  super().__init__(configs)
67
67
 
68
68
  @override
@@ -25,13 +25,19 @@ class PostgresSQlAlchemySessionManager(BaseSQLAlchemySessionManager[PostgresSQLA
25
25
  orm_config: PostgreSQL-specific configuration. If None, uses global config.
26
26
  """
27
27
 
28
+ @classmethod
29
+ @override
30
+ def _default_config(cls) -> PostgresSQLAlchemyConfig:
31
+ """Return the global config's POSTGRES_SQLALCHEMY section."""
32
+ return BaseConfig.global_config().POSTGRES_SQLALCHEMY
33
+
28
34
  def __init__(self, orm_config: PostgresSQLAlchemyConfig | None = None) -> None:
29
35
  """Initialize the PostgreSQL session manager.
30
36
 
31
37
  Args:
32
38
  orm_config: PostgreSQL-specific configuration. If None, uses global config.
33
39
  """
34
- configs = BaseConfig.global_config().POSTGRES_SQLALCHEMY if orm_config is None else orm_config
40
+ configs = orm_config or self._default_config()
35
41
  super().__init__(configs)
36
42
 
37
43
  @override
@@ -93,13 +99,19 @@ class AsyncPostgresSQlAlchemySessionManager(
93
99
  orm_config: PostgreSQL-specific configuration. If None, uses global config.
94
100
  """
95
101
 
102
+ @classmethod
103
+ @override
104
+ def _default_config(cls) -> PostgresSQLAlchemyConfig:
105
+ """Return the global config's POSTGRES_SQLALCHEMY section."""
106
+ return BaseConfig.global_config().POSTGRES_SQLALCHEMY
107
+
96
108
  def __init__(self, orm_config: PostgresSQLAlchemyConfig | None = None) -> None:
97
109
  """Initialize the async PostgreSQL session manager.
98
110
 
99
111
  Args:
100
112
  orm_config: PostgreSQL-specific configuration. If None, uses global config.
101
113
  """
102
- configs = BaseConfig.global_config().POSTGRES_SQLALCHEMY if orm_config is None else orm_config
114
+ configs = orm_config or self._default_config()
103
115
  super().__init__(configs)
104
116
 
105
117
  @override
@@ -5,10 +5,10 @@ authors = [
5
5
  { name = "Hossein Nejati", email = "hosseinnejati14@gmail.com" },
6
6
  ]
7
7
  readme = "README.md"
8
- version = "5.14.0" # This version is set on publish flow!
8
+ version = "5.16.0" # This version is set on publish flow!
9
9
  requires-python = ">=3.14,<4"
10
10
  dependencies = [
11
- "archipy==5.14.0", # Pinned to core version on publish flow!
11
+ "archipy==5.16.0", # Pinned to core version on publish flow!
12
12
  "psycopg[binary,pool]>=3.3.6",
13
13
  ]
14
14
  license = "Apache-2.0"