forked from retoor/devplacepy
feat: replace startup event with lifespan context manager and add pyproject.toml filterwarnings
The lifespan context manager replaces the deprecated `@app.on_event("startup")` pattern, centralizing initialization logic for data directories, database, certificates, and all service registrations. It also conditionally starts background services based on the `DEVPLACE_DISABLE_SERVICES` environment variable and acquires a service lock for worker coordination. Additionally, the `pyproject.toml` now suppresses three specific deprecation and syntax warnings during test runs.
This commit is contained in:
@@ -49,3 +49,8 @@ build-backend = "hatchling.build"
|
||||
testpaths = ["tests/unit", "tests/api", "tests/e2e"]
|
||||
python_files = ["*.py"]
|
||||
addopts = "--tb=line -p no:xdist"
|
||||
filterwarnings = [
|
||||
"ignore:'crypt' is deprecated",
|
||||
"ignore:Using `httpx` with `starlette.testclient` is deprecated",
|
||||
"ignore:invalid escape sequence",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user