Skip to content

Commit

Permalink
docs(asgi): clarify python version requirements for AsyncioContextPro…
Browse files Browse the repository at this point in the history
…vider (#6686)

This pull request updates the documentation of ASGI integrations to be
clearer about the requirements of legacy Python versions, and to conform
with [this
docstring](https://github.com/DataDog/dd-trace-py/blob/45532233f6e9e70c84c2946aab06513c947f4500/ddtrace/contrib/asyncio/provider.py#L12).

## Checklist

- [x] Change(s) are motivated and described in the PR description.
- [x] Testing strategy is described if automated tests are not included
in the PR.
- [x] Risk is outlined (performance impact, potential for breakage,
maintainability, etc).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed. If no release note is required, add label
`changelog/no-changelog`.
- [x] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/)).
- [x] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist

- [x] Title is accurate.
- [x] No unnecessary changes are introduced.
- [x] Description motivates each change.
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes unless absolutely necessary.
- [x] Testing strategy adequately addresses listed risk(s).
- [x] Change is maintainable (easy to change, telemetry, documentation).
- [x] Release note makes sense to a user of the library.
- [x] Reviewer has explicitly acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment.
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
  • Loading branch information
emmettbutler authored Aug 18, 2023
1 parent ede731c commit c0de2a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions ddtrace/contrib/asgi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
ddtrace-run uvicorn app:app
If using Python 3.6, the legacy ``AsyncioContextProvider`` will have to be
enabled before using the middleware::
On Python 3.6 and below, you must enable the legacy ``AsyncioContextProvider`` before using the middleware::
from ddtrace.contrib.asyncio.provider import AsyncioContextProvider
from ddtrace import tracer # Or whichever tracer instance you plan to use
Expand Down
3 changes: 1 addition & 2 deletions ddtrace/contrib/fastapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
app = FastAPI()
If using Python 3.6, the legacy ``AsyncioContextProvider`` will have to be
enabled before using the middleware::
On Python 3.6 and below, you must enable the legacy ``AsyncioContextProvider`` before using the middleware::
from ddtrace.contrib.asyncio.provider import AsyncioContextProvider
from ddtrace import tracer # Or whichever tracer instance you plan to use
Expand Down
3 changes: 1 addition & 2 deletions ddtrace/contrib/sanic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ def index(request):
if __name__ == '__main__':
app.run()
If using Python 3.6, the legacy ``AsyncioContextProvider`` will have to be
enabled before using the middleware::
On Python 3.6 and below, you must enable the legacy ``AsyncioContextProvider`` before using the middleware::
from ddtrace.contrib.asyncio.provider import AsyncioContextProvider
from ddtrace import tracer # Or whichever tracer instance you plan to use
Expand Down
3 changes: 1 addition & 2 deletions ddtrace/contrib/starlette/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
app = Starlette()
If using Python 3.6, the legacy ``AsyncioContextProvider`` will have to be
enabled before using the middleware::
On Python 3.6 and below, you must enable the legacy ``AsyncioContextProvider`` before using the middleware::
from ddtrace.contrib.asyncio.provider import AsyncioContextProvider
from ddtrace import tracer # Or whichever tracer instance you plan to use
Expand Down

0 comments on commit c0de2a2

Please sign in to comment.