Merge pull request #189 from grillazz/187-python313

187 python313
This commit is contained in:
Jakub Miazek 2024-12-16 21:05:23 +01:00 committed by GitHub
commit 9d08ae91ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 679 additions and 714 deletions

View File

@ -209,21 +209,21 @@ I've included a few of my favorites to kick things off!
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/python-has-powers/
[fastapi.tiangolo.com]: https://img.shields.io/badge/FastAPI-0.115.2-009485?style=for-the-badge&logo=fastapi&logoColor=white
[fastapi.tiangolo.com]: https://img.shields.io/badge/FastAPI-0.115.6-009485?style=for-the-badge&logo=fastapi&logoColor=white
[fastapi-url]: https://fastapi.tiangolo.com/
[pydantic.com]: https://img.shields.io/badge/Pydantic-2.9.2-e92063?style=for-the-badge&logo=pydantic&logoColor=white
[pydantic.com]: https://img.shields.io/badge/Pydantic-2.10.3-e92063?style=for-the-badge&logo=pydantic&logoColor=white
[pydantic-url]: https://docs.pydantic.dev/latest/
[sqlalchemy.org]: https://img.shields.io/badge/SQLAlchemy-2.0.36-bb0000?color=bb0000&style=for-the-badge
[sqlalchemy-url]: https://docs.sqlalchemy.org/en/20/
[uvicorn.org]: https://img.shields.io/badge/Uvicorn-0.32.0-2094f3?style=for-the-badge&logo=uvicorn&logoColor=white
[uvicorn.org]: https://img.shields.io/badge/Uvicorn-0.34.0-2094f3?style=for-the-badge&logo=uvicorn&logoColor=white
[uvicorn-url]: https://www.uvicorn.org/
[asyncpg.github.io]: https://img.shields.io/badge/asyncpg-0.29.0-2e6fce?style=for-the-badge&logo=postgresql&logoColor=white
[asyncpg.github.io]: https://img.shields.io/badge/asyncpg-0.30.0-2e6fce?style=for-the-badge&logo=postgresql&logoColor=white
[asyncpg-url]: https://magicstack.github.io/asyncpg/current/
[pytest.org]: https://img.shields.io/badge/pytest-8.3.3-fff?style=for-the-badge&logo=pytest&logoColor=white
[pytest.org]: https://img.shields.io/badge/pytest-8.3.4-fff?style=for-the-badge&logo=pytest&logoColor=white
[pytest-url]: https://docs.pytest.org/en/6.2.x/
[alembic.sqlalchemy.org]: https://img.shields.io/badge/alembic-1.13.3-6BA81E?style=for-the-badge&logo=alembic&logoColor=white
[alembic.sqlalchemy.org]: https://img.shields.io/badge/alembic-1.14.0-6BA81E?style=for-the-badge&logo=alembic&logoColor=white
[alembic-url]: https://alembic.sqlalchemy.org/en/latest/
[rich.readthedocs.io]: https://img.shields.io/badge/rich-13.9.2-009485?style=for-the-badge&logo=rich&logoColor=white
[rich.readthedocs.io]: https://img.shields.io/badge/rich-13.9.4-009485?style=for-the-badge&logo=rich&logoColor=white
[rich-url]: https://rich.readthedocs.io/en/latest/
[redis.io]: https://img.shields.io/badge/redis-5.1.1-dc382d?style=for-the-badge&logo=redis&logoColor=white
[redis.io]: https://img.shields.io/badge/redis-5.2.1-dc382d?style=for-the-badge&logo=redis&logoColor=white
[redis-url]: https://redis.io/

View File

@ -35,7 +35,7 @@ async def lifespan(_app: FastAPI):
# Initialize the cache with the redis connection
redis_cache = await get_cache()
FastAPICache.init(RedisBackend(redis_cache), prefix="fastapi-cache")
logger.info(FastAPICache.get_cache_status_header())
# logger.info(FastAPICache.get_cache_status_header())
# Initialize the postgres connection pool
_app.postgres_pool = await asyncpg.create_pool(
dsn=_postgres_dsn,
@ -51,7 +51,7 @@ async def lifespan(_app: FastAPI):
await _app.postgres_pool.close()
app = FastAPI(title="Stuff And Nonsense API", version="0.16", lifespan=lifespan)
app = FastAPI(title="Stuff And Nonsense API", version="0.17", lifespan=lifespan)
app.include_router(stuff_router)
app.include_router(nonsense_router)

1332
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -9,31 +9,30 @@ package-mode = false
[tool.poetry.dependencies]
python = "^3.13"
fastapi = {version = "^0.115.2", extras = ["all"]}
pydantic = {version = "^2.9.2", extras = ["email"]}
pydantic-settings = "^2.6.0"
fastapi = {version = "^0.115.6", extras = ["all"]}
pydantic = {version = "^2.10.3", extras = ["email"]}
pydantic-settings = "^2.7.0"
sqlalchemy = "^2.0.36"
uvicorn = { version = "^0.32.0", extras = ["standard"]}
uvicorn = { version = "^0.34.0", extras = ["standard"]}
asyncpg = "^0.30.0"
alembic = "^1.13.3"
httpx = "^0.27.2"
pytest = "^8.3.3"
pytest-cov = "^5.0.0"
alembic = "^1.14.0"
httpx = "^0.28.1"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
uvloop = "^0.21.0"
httptools = "^0.6.4"
rich = "^13.9.2"
pyjwt = {version = "^2.9.0", extras = ["cryptography"]}
redis = "^5.1.1"
bcrypt = "^4.2.0"
polars = "^1.9.0"
python-multipart = "^0.0.12"
rich = "^13.9.4"
pyjwt = {version = "^2.10.1", extras = ["cryptography"]}
redis = "^5.2.1"
bcrypt = "^4.2.1"
polars = "^1.17.1"
python-multipart = "^0.0.20"
fastexcel = "^0.12.0"
fastapi-cache2 = {git = "https://github.com/yoco-tech/fastapi-cache.git", rev = "main"}
inline-snapshot = "^0.13.3"
fastapi-cache2 = "^0.2.1"
inline-snapshot = "^0.17.0"
dirty-equals = "^0.8.0"
polyfactory = "^2.17.0"
granian = "^1.6.1"
transformers = "^4.45.2"
polyfactory = "^2.18.1"
granian = "^1.7.0"
apscheduler = {version = "^4.0.0a5", extras = ["redis,sqlalchemy"]}
pendulum = {git = "https://github.com/sdispater/pendulum.git", rev="develop"}

View File

@ -32,7 +32,7 @@ async def test_add_user(client: AsyncClient):
response.json()["access_token"], options={"verify_signature": False}
)
assert claimset["expiry"] == IsPositiveFloat()
assert claimset["platform"] == "python-httpx/0.27.2"
assert claimset["platform"] == "python-httpx/0.28.1"
# TODO: parametrize test with diff urls including 404 and 401
@ -49,7 +49,7 @@ async def test_get_token(client: AsyncClient):
)
assert claimset["email"] == payload["email"]
assert claimset["expiry"] == IsPositiveFloat()
assert claimset["platform"] == "python-httpx/0.27.2"
assert claimset["platform"] == "python-httpx/0.28.1"
# TODO: baerer token test