Can H. Tartanoglu
Can H. Tartanoglu
@sydney-runkle Pydantic base models can actually inherit from frozen to non-frozen, but the issue is pyright. Pyright treats `BaseModel` as `dataclass` in this instance. Dataclass inheritance from frozen to non-frozen...
I like the idea of overriding `fields` with `computed_fields`, but would appreciate some sort of warning during runtime so that I know it is happening. After the warning, if I...
> Well, from an abstract point of view, I think overriding an attribute/ field with computed field follows the principle of dependency inversion, whether a field is a computed field...
You need to store the result in an attribute. I would make it a private attribute (note underscored attributes are not supported in V2 atm): ```python class Foo(BaseModel): bar_1: int...
Cool! I will use it with dependency injection in FastAPI; the connection will shut down naturally when we stop the server or if the WSGI dies for some reason.
This should work (but is wrong, [correct approach](https://github.com/Intreecom/scyllapy/issues/37#issuecomment-1826222865)): ```python app = FastAPI() async def get_scylla_session() -> AsyncGenerator[Scylla, None]: with Scylla(...) as scylla: yield scylla @app.get("/") def root_endpoint(scylla: Scylla = Depends(get_scylla_session)):...
Just tested this, you are correct. After this PR, the code should be like this: ```python from fastapi import Depends, FastAPI, Request from typing import Any, AsyncGenerator from contextlib import...
I got your emails, was going to answer; however, this is too much. Can you condense your question, and remove it from here? Can we turn on the discussion section...
Yes, sorry, you are correct.
@antonilol, you could even have no interface, and have your workers open rocksdb directly. RocksDB supports concurrent reads, most on disk KVs do. This is related in the way that...