Closed brunolnetto closed 6 days ago
Hi. Sorry for the offtop. I just found your docs here and install redbird by pip install redbird, but the first import statement from redbird.repo import JSONDirectoryRepositroy crashes into
>>> from redbird.repos import JSONDirectoryRepository
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/venv/lib/python3.10/site-packages/redbird/__init__.py", line 2, in <module>
from .base import BaseRepo, BaseResult
File "/tmp/venv/lib/python3.10/site-packages/redbird/base.py", line 116, in <module>
class BaseRepo(ABC, BaseModel):
File "/tmp/venv/lib/python3.10/site-packages/redbird/base.py", line 153, in BaseRepo
ordered: bool = Field(default=False, const=True)
File "/tmp/venv/lib/python3.10/site-packages/pydantic/fields.py", line 766, in Field
raise PydanticUserError('`const` is removed, use `Literal` instead', code='removed-kwargs')
pydantic.errors.PydanticUserError: `const` is removed, use `Literal` instead
For further information visit https://errors.pydantic.dev/2.7/u/removed-kwargs
Can we help with that?
It seems redbird has started well and went rogue at some point. I have not an author's letter of attorney, however I think, any help will be appreciated.
The available pull requests validate pydantic v2 and increment features on current library version. May someone review them? This will be very useful on my API.
Best regards.