ci: migrate to uv! (#4698)

* Migrate to `uv`
* Format `pyproject.toml` files properly
* Remove upper bounds on dependencies, and bounds on dev dependencies
(we should be using latest)
* Move to hatch for packaing

In the future we should:
* Set up dependabot / automate lockfile updates and tests
* Add tests for min compatible versions (I'll do this right after merge)
* Use dynamic versioning
* Bump `pydantic` to v2.11.4 in the lockfile, we have some tests failing
This commit is contained in:
Sydney Runkle
2025-05-15 17:39:14 -07:00
committed by GitHub
parent 217795eb72
commit 228a08b966
94 changed files with 19388 additions and 23600 deletions
@@ -1,8 +1,9 @@
import random
import sqlite3
import threading
from collections.abc import AsyncIterator, Iterator, Sequence
from contextlib import closing, contextmanager
from typing import Any, AsyncIterator, Dict, Iterator, Optional, Sequence, Tuple
from typing import Any, Optional, cast
from langchain_core.runnables import RunnableConfig
@@ -261,7 +262,12 @@ class SqliteSaver(BaseCheckpointSaver[str]):
return CheckpointTuple(
config,
self.serde.loads_typed((type, checkpoint)),
self.jsonplus_serde.loads(metadata) if metadata is not None else {},
cast(
CheckpointMetadata,
self.jsonplus_serde.loads(metadata)
if metadata is not None
else {},
),
(
{
"configurable": {
@@ -283,7 +289,7 @@ class SqliteSaver(BaseCheckpointSaver[str]):
self,
config: Optional[RunnableConfig],
*,
filter: Optional[Dict[str, Any]] = None,
filter: Optional[dict[str, Any]] = None,
before: Optional[RunnableConfig] = None,
limit: Optional[int] = None,
) -> Iterator[CheckpointTuple]:
@@ -349,7 +355,12 @@ class SqliteSaver(BaseCheckpointSaver[str]):
}
},
self.serde.loads_typed((type, checkpoint)),
self.jsonplus_serde.loads(metadata) if metadata is not None else {},
cast(
CheckpointMetadata,
self.jsonplus_serde.loads(metadata)
if metadata is not None
else {},
),
(
{
"configurable": {
@@ -428,7 +439,7 @@ class SqliteSaver(BaseCheckpointSaver[str]):
def put_writes(
self,
config: RunnableConfig,
writes: Sequence[Tuple[str, Any]],
writes: Sequence[tuple[str, Any]],
task_id: str,
task_path: str = "",
) -> None:
@@ -496,7 +507,7 @@ class SqliteSaver(BaseCheckpointSaver[str]):
self,
config: Optional[RunnableConfig],
*,
filter: Optional[Dict[str, Any]] = None,
filter: Optional[dict[str, Any]] = None,
before: Optional[RunnableConfig] = None,
limit: Optional[int] = None,
) -> AsyncIterator[CheckpointTuple]: