arize-phoenix 11.5.0__py3-none-any.whl → 11.6.0__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.

Potentially problematic release.


This version of arize-phoenix might be problematic. Click here for more details.

phoenix/server/types.py CHANGED
@@ -1,5 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import asyncio
3
4
  from abc import ABC, abstractmethod
4
5
  from asyncio import Task, create_task, sleep
5
6
  from collections import defaultdict
@@ -29,11 +30,12 @@ class CanGetLastUpdatedAt(Protocol):
29
30
  class DbSessionFactory:
30
31
  def __init__(
31
32
  self,
32
- db: Callable[[], AbstractAsyncContextManager[AsyncSession]],
33
+ db: Callable[[Optional[asyncio.Lock]], AbstractAsyncContextManager[AsyncSession]],
33
34
  dialect: str,
34
35
  ):
35
36
  self._db = db
36
37
  self.dialect = SupportedSQLDialect(dialect)
38
+ self.lock: Optional[asyncio.Lock] = None
37
39
  self.should_not_insert_or_update = False
38
40
  """An informational flag that allows different tasks to coordinate whether insert
39
41
  and update operations should be allowed. For example, this can be set to True when disk
@@ -43,7 +45,7 @@ class DbSessionFactory:
43
45
  """
44
46
 
45
47
  def __call__(self) -> AbstractAsyncContextManager[AsyncSession]:
46
- return self._db()
48
+ return self._db(self.lock)
47
49
 
48
50
 
49
51
  _AnyT = TypeVar("_AnyT")
phoenix/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "11.5.0"
1
+ __version__ = "11.6.0"