You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The original httpx package is no longer maintained; httpx2 is the
continuation of the project, maintained by Pydantic.
- Add ASYNC127 unmaintained-httpx: triggers on any import of httpx,
recommending httpx2 to keep getting security updates.
- ASYNC210 and ASYNC212 now detect blocking calls made through httpx2
identically to httpx ones.
- ASYNC210/211/212 messages now recommend httpx2.AsyncClient instead
of httpx.AsyncClient.
https://claude.ai/code/session_01LmC7WhyCTN11M9xBycd4Xu
Copy file name to clipboardExpand all lines: docs/changelog.rst
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,11 @@ Changelog
4
4
5
5
`CalVer, YY.month.patch <https://calver.org/>`_
6
6
7
+
26.6.1
8
+
======
9
+
- Add :ref:`ASYNC127 <async127>` unmaintained-httpx: use ``httpx2`` instead of ``httpx``, which is no longer maintained, to get security updates. `(issue #460) <https://github.com/python-trio/flake8-async/issues/460>`_
10
+
- :ref:`ASYNC210 <async210>`, :ref:`ASYNC211 <async211>` and :ref:`ASYNC212 <async212>` now also detect blocking calls made through ``httpx2``, and their messages recommend ``httpx2.AsyncClient`` instead of ``httpx.AsyncClient``.
11
+
7
12
26.4.2
8
13
======
9
14
- Fixed a regression in canonical-qualname resolution where a call nested inside an attribute chain (e.g. ``foo("x").bar``) was silently elided into a dotted name (``"foo.bar"``). This caused :ref:`ASYNC200 <async200>` false alarms for patterns like ``*session.get`` matching ``read_session("a").get(...)``, where ``.get`` is a method on the *return value* of ``read_session()``.
User-configured error for blocking sync calls in async functions.
152
161
Does nothing by default, see :ref:`async200-blocking-calls` for how to configure it.
153
162
154
-
ASYNC210 : blocking-http-call
155
-
Sync HTTP call in async function, use `httpx.AsyncClient`_.
156
-
This and the other :ref:`ASYNC21x <ASYNC211>` checks look for usage of `urllib3`_ and `httpx.Client`_, and recommend using `httpx.AsyncClient`_ as that's the largest http client supporting anyio/trio.
163
+
_`ASYNC210` : blocking-http-call
164
+
Sync HTTP call in async function, use `httpx2.AsyncClient`_.
165
+
This and the other :ref:`ASYNC21x <ASYNC211>` checks look for usage of `urllib3`_, `httpx.Client`_, and `httpx2.Client`_, and recommend using `httpx2.AsyncClient`_ as that's the largest http client supporting anyio/trio.
166
+
Sync calls through the unmaintained ``httpx`` package are detected the same way as ``httpx2`` ones, but the recommendation is always `httpx2.AsyncClient`_ - see :ref:`ASYNC127 <ASYNC127>`.
157
167
158
168
_`ASYNC211` : blocking-http-call-pool
159
-
Likely sync HTTP call in async function, use `httpx.AsyncClient`_.
169
+
Likely sync HTTP call in async function, use `httpx2.AsyncClient`_.
160
170
Looks for `urllib3`_ method calls on pool objects, but only matching on the method signature and not the object.
161
171
162
-
ASYNC212 : blocking-http-call-httpx
163
-
Blocking sync HTTP call on httpx object, use `httpx.AsyncClient`_.
172
+
_`ASYNC212` : blocking-http-call-httpx
173
+
Blocking sync HTTP call on httpx/httpx2 object, use `httpx2.AsyncClient`_.
164
174
165
175
ASYNC220 : blocking-create-subprocess
166
176
Sync call to :class:`subprocess.Popen` (or equivalent) in async function, use :func:`trio.run_process`/:func:`anyio.run_process`/:ref:`asyncio.create_subprocess_[exec/shell] <asyncio-subprocess>` in a :ref:`taskgroup_nursery`.
0 commit comments