micropython-lib/python-ecosys
Richard Weickelt 65a14116d5 requests: Do not leak header modifications when calling request.
The requests() function takes a headers dict argument
(call-by-reference). This object is then modified in the function. For
instance the host is added and authentication information. Such behavior
is not expected. It is also problematic:

- Modifications of the header dictionary will be visible on the caller
  site.
- When reusing the same (supposedly read-only) headers object for
  differenct calls, the second call will apparently re-use wrong headers
  from the previous call and may fail.

This patch should also fix #839. Unfortunately the copy operation does
not preserve the key order and we have to touch the existing test cases.

Signed-off-by: Richard Weickelt <richard@weickelt.de>
2024-12-12 00:27:39 +01:00
..
aiohttp aiohttp: Fix type of header's Sec-WebSocket-Key. 2024-05-24 17:26:22 +10:00
cbor2 all: Enable ruff F841 'Local variable is assigned to but never used'. 2024-05-15 18:05:21 +10:00
iperf3 all: Enable ruff E401 and E402 import lints. 2024-05-17 17:06:33 +10:00
pyjwt all: Standardise x.y.z versioning for all packages. 2023-07-23 11:48:57 +10:00
requests requests: Do not leak header modifications when calling request. 2024-12-12 00:27:39 +01:00
README.md top: Update top-level docs. 2022-12-16 17:16:03 +11:00

README.md

Python-ecosystem packages

These MicroPython versions of common Python packages, typically found on PyPI.

If a package has the same name as a PyPI package, then it should match at least some subset of the functionality.

Future plans

  • More organised directory structure based on library purpose (e.g. drivers, network, etc).