Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a bunch more DeprecationWarning #37

Closed
simonw opened this issue Nov 15, 2024 · 2 comments
Closed

Fix a bunch more DeprecationWarning #37

simonw opened this issue Nov 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@simonw
Copy link
Owner

simonw commented Nov 15, 2024

================================================================================================== warnings summary ===================================================================================================
tests/test_asgi_csrf.py: 35 warnings
  /Users/simon/Dropbox/Development/asgi-csrf/.venv/lib/python3.10/site-packages/httpx/_client.py:1437: DeprecationWarning: The 'app' shortcut is now deprecated. Use the explicit style 'transport=ASGITransport(app=...)' instead.
    warnings.warn(message, DeprecationWarning)

tests/test_asgi_csrf.py: 27 warnings
  /Users/simon/Dropbox/Development/asgi-csrf/.venv/lib/python3.10/site-packages/httpx/_client.py:1570: DeprecationWarning: Setting per-request cookies=<...> is being deprecated, because the expected behaviour on cookie persistence is ambiguous. Set cookies directly on the client instance instead.
    warnings.warn(message, DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================================================================== 48 passed, 62 warnings in 0.17s ===========================================================================================
@simonw simonw added the bug Something isn't working label Nov 15, 2024
@simonw
Copy link
Owner Author

simonw commented Nov 15, 2024

I'm using this to find them:

pytest -W error -x

@simonw
Copy link
Owner Author

simonw commented Nov 15, 2024

Got them all passing, need to fix this:

/Users/simon/Dropbox/Development/asgi-csrf/.venv/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))

@simonw simonw closed this as completed in fb842b1 Nov 15, 2024
simonw added a commit that referenced this issue Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant