python3-commons 0.8.8__py3-none-any.whl → 0.8.9__py3-none-any.whl

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.
@@ -52,7 +52,7 @@ class AsyncSessionManager:
52
52
  except KeyError:
53
53
  logger.debug(f'Creating session maker: {name}')
54
54
  engine = self.get_engine(name)
55
- session_maker = async_sessionmaker(engine)
55
+ session_maker = async_sessionmaker(engine, expire_on_commit=False)
56
56
  self.session_makers[name] = session_maker
57
57
 
58
58
  return session_maker
@@ -67,7 +67,8 @@ class AsyncSessionManager:
67
67
  return get_session
68
68
 
69
69
  def get_session_context(self, name: str):
70
- return contextlib.asynccontextmanager(lambda: self.get_async_session(name)())
70
+ # TODO: cache
71
+ return contextlib.asynccontextmanager(self.get_async_session(name))
71
72
 
72
73
 
73
74
  async def is_healthy(engine: AsyncEngine) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python3-commons
3
- Version: 0.8.8
3
+ Version: 0.8.9
4
4
  Summary: Re-usable Python3 code
5
5
  Author-email: Oleg Korsak <kamikaze.is.waiting.you@gmail.com>
6
6
  License: gpl-3
@@ -6,7 +6,7 @@ python3_commons/fs.py,sha256=wfLjybXndwLqNlOxTpm_HRJnuTcC4wbrHEOaEeCo9Wc,337
6
6
  python3_commons/helpers.py,sha256=OmuCF7UeJ6oe-rH1Y4ZYVW_uPQ973lCLsikj01wmNqs,3101
7
7
  python3_commons/object_storage.py,sha256=Bte49twIJ4l6VAzIqK6tLx7DFYwijErUmmhWkrZpSJE,4074
8
8
  python3_commons/permissions.py,sha256=V6kT7gBQ0fZRDQwreM9es90BvvpB3gUofuqnFvx2g-o,1553
9
- python3_commons/db/__init__.py,sha256=NP5ESM2etmP-mP6esZRmXpm3UjWCShw3bho68pqB_zY,2705
9
+ python3_commons/db/__init__.py,sha256=_SKKKf4uW4xYdSkL6Getow9ERGd_RYBlaM4xKEQKos8,2741
10
10
  python3_commons/db/helpers.py,sha256=0z-pXAxQg0KqrqfoUcRooRHNrrKi-g2mSO6euVMscpE,1891
11
11
  python3_commons/db/models/__init__.py,sha256=AeeTLUqdqQrhCTi14ACWO0ccyVyWFppZVtCeWShSvR0,193
12
12
  python3_commons/db/models/auth.py,sha256=ctHiz_5x17TdXac7a3SjfuZ0-nEgnxK7RwKOY8qflZc,1195
@@ -19,9 +19,9 @@ python3_commons/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
19
19
  python3_commons/serializers/json.py,sha256=P288wWz9ic38QWEMrpp_uwKPYkQiOgvE1cI4WZn6ZCg,808
20
20
  python3_commons/serializers/msgpack.py,sha256=tzIGGyDL3UpZnnouCtnxuYDx6InKM_C3PP1N4PN8wd4,1269
21
21
  python3_commons/serializers/msgspec.py,sha256=FuZVqOLJb0-lEKrs7dtjhwEbHIpfMUk5yu1hD64zRdc,2038
22
- python3_commons-0.8.8.dist-info/licenses/AUTHORS.rst,sha256=3R9JnfjfjH5RoPWOeqKFJgxVShSSfzQPIrEr1nxIo9Q,90
23
- python3_commons-0.8.8.dist-info/licenses/LICENSE,sha256=xxILuojHm4fKQOrMHPSslbyy6WuKAN2RiG74HbrYfzM,34575
24
- python3_commons-0.8.8.dist-info/METADATA,sha256=PDEwcNb5dW45EBgs9XfvhDUeQ5vbY_hJFs_Mw5NJau4,1149
25
- python3_commons-0.8.8.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
26
- python3_commons-0.8.8.dist-info/top_level.txt,sha256=lJI6sCBf68eUHzupCnn2dzG10lH3jJKTWM_hrN1cQ7M,16
27
- python3_commons-0.8.8.dist-info/RECORD,,
22
+ python3_commons-0.8.9.dist-info/licenses/AUTHORS.rst,sha256=3R9JnfjfjH5RoPWOeqKFJgxVShSSfzQPIrEr1nxIo9Q,90
23
+ python3_commons-0.8.9.dist-info/licenses/LICENSE,sha256=xxILuojHm4fKQOrMHPSslbyy6WuKAN2RiG74HbrYfzM,34575
24
+ python3_commons-0.8.9.dist-info/METADATA,sha256=SD0hFz7Gcz3JCB9LujpYhyyEQql-5cln8XOMSxjHYFU,1149
25
+ python3_commons-0.8.9.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
26
+ python3_commons-0.8.9.dist-info/top_level.txt,sha256=lJI6sCBf68eUHzupCnn2dzG10lH3jJKTWM_hrN1cQ7M,16
27
+ python3_commons-0.8.9.dist-info/RECORD,,