uhttp-client 2.2.1__tar.gz → 3.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. uhttp_client-3.0.0/.github/workflows/publish.yml +32 -0
  2. uhttp_client-3.0.0/.github/workflows/tests.yml +87 -0
  3. uhttp_client-3.0.0/.gitignore +10 -0
  4. uhttp_client-3.0.0/PKG-INFO +1041 -0
  5. uhttp_client-3.0.0/README.md +1024 -0
  6. uhttp_client-3.0.0/examples/client_async.py +131 -0
  7. uhttp_client-3.0.0/examples/client_basic.py +117 -0
  8. uhttp_client-3.0.0/examples/client_https.py +74 -0
  9. uhttp_client-3.0.0/examples/client_stream.py +120 -0
  10. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/pyproject.toml +5 -2
  11. uhttp_client-3.0.0/tests/__init__.py +0 -0
  12. uhttp_client-3.0.0/tests/helpers.py +230 -0
  13. uhttp_client-3.0.0/tests/test_100_continue.py +245 -0
  14. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_async.py +38 -50
  15. uhttp_client-3.0.0/tests/test_body_framing.py +103 -0
  16. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_errors.py +4 -5
  17. uhttp_client-3.0.0/tests/test_event_mode.py +336 -0
  18. uhttp_client-3.0.0/tests/test_http_compliance.py +278 -0
  19. uhttp_client-3.0.0/tests/test_integration.py +536 -0
  20. uhttp_client-3.0.0/tests/test_mpy_integration.py +430 -0
  21. uhttp_client-3.0.0/tests/test_mpy_resources.py +234 -0
  22. uhttp_client-3.0.0/tests/test_nonblocking_connect.py +385 -0
  23. uhttp_client-3.0.0/tests/test_selectors_v3.py +613 -0
  24. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_unit.py +131 -2
  25. uhttp_client-3.0.0/tests/test_v3_fixes.py +253 -0
  26. uhttp_client-3.0.0/tests/test_v3_review.py +341 -0
  27. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/uhttp/cli.py +2 -10
  28. uhttp_client-3.0.0/uhttp/client.py +2077 -0
  29. uhttp_client-3.0.0/uhttp_client.egg-info/PKG-INFO +1041 -0
  30. uhttp_client-3.0.0/uhttp_client.egg-info/SOURCES.txt +40 -0
  31. uhttp_client-3.0.0/uhttp_client.egg-info/scm_file_list.json +37 -0
  32. uhttp_client-3.0.0/uhttp_client.egg-info/scm_version.json +8 -0
  33. uhttp_client-2.2.1/PKG-INFO +0 -666
  34. uhttp_client-2.2.1/README.md +0 -649
  35. uhttp_client-2.2.1/tests/test_integration.py +0 -260
  36. uhttp_client-2.2.1/uhttp/client.py +0 -851
  37. uhttp_client-2.2.1/uhttp_client.egg-info/PKG-INFO +0 -666
  38. uhttp_client-2.2.1/uhttp_client.egg-info/SOURCES.txt +0 -19
  39. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/LICENSE +0 -0
  40. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/setup.cfg +0 -0
  41. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_auth.py +0 -0
  42. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_basic.py +0 -0
  43. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_cli.py +0 -0
  44. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_cookies.py +0 -0
  45. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/tests/test_keepalive.py +0 -0
  46. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/uhttp_client.egg-info/dependency_links.txt +0 -0
  47. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/uhttp_client.egg-info/entry_points.txt +0 -0
  48. {uhttp_client-2.2.1 → uhttp_client-3.0.0}/uhttp_client.egg-info/top_level.txt +0 -0
@@ -0,0 +1,32 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ environment: pypi
11
+ permissions:
12
+ id-token: write
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v5
19
+ with:
20
+ python-version: "3.14"
21
+
22
+ - name: Install build dependencies
23
+ run: pip install build
24
+
25
+ - name: Install package
26
+ run: pip install .
27
+
28
+ - name: Build package
29
+ run: python -m build
30
+
31
+ - name: Publish to PyPI
32
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,87 @@
1
+ name: Tests
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches: [main, v2]
7
+ pull_request:
8
+ branches: [main, v2]
9
+
10
+ jobs:
11
+ test-ubuntu:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ max-parallel: 1
15
+ matrix:
16
+ python-version: ["3.10", "3.14"]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+
26
+ - name: Install package
27
+ run: pip install .
28
+
29
+ - name: Install test dependencies
30
+ run: pip install uhttp-server
31
+
32
+ - name: Run unit tests
33
+ run: python -m unittest discover -v tests/
34
+
35
+ test-windows:
36
+ runs-on: windows-latest
37
+ strategy:
38
+ max-parallel: 1
39
+ matrix:
40
+ python-version: ["3.10", "3.14"]
41
+
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+
45
+ - name: Set up Python ${{ matrix.python-version }}
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version: ${{ matrix.python-version }}
49
+
50
+ - name: Install package
51
+ run: pip install .
52
+
53
+ - name: Install test dependencies
54
+ run: pip install uhttp-server
55
+
56
+ - name: Run unit tests
57
+ run: python -m unittest discover -v tests/
58
+
59
+ micropython:
60
+ if: github.event_name == 'push'
61
+ needs: [test-ubuntu, test-windows]
62
+ runs-on: [self-hosted, Linux]
63
+ # One device, two maintained branches - queue instead of colliding, and
64
+ # never cancel: interrupting mpytool mid-operation wedges the REPL.
65
+ concurrency:
66
+ group: micropython-${{ matrix.device }}
67
+ cancel-in-progress: false
68
+ strategy:
69
+ fail-fast: false
70
+ matrix:
71
+ device: [ESP32]
72
+
73
+ steps:
74
+ - uses: actions/checkout@v4
75
+
76
+ - name: Install packages
77
+ run: |
78
+ $HOME/actions-runner/.venv/bin/pip install -e .
79
+ $HOME/actions-runner/.venv/bin/pip install 'mpytool>=2.4.0'
80
+
81
+ - name: MicroPython tests (${{ matrix.device }})
82
+ run: |
83
+ export PATH="$HOME/actions-runner/.venv/bin:$PATH"
84
+ export MPY_TEST_PORT="$(cat $HOME/actions-runner/.config/mpytool/${{ matrix.device }})"
85
+ export MPY_WIFI_SSID="$(jq -r .ssid $HOME/actions-runner/.config/uhttp/wifi.json)"
86
+ export MPY_WIFI_PASSWORD="$(jq -r .password $HOME/actions-runner/.config/uhttp/wifi.json)"
87
+ python -m unittest tests.test_mpy_integration -v
@@ -0,0 +1,10 @@
1
+ *.egg-info
2
+ __pycache__
3
+ *.pyc
4
+ .*
5
+ !.gitignore
6
+ !.github
7
+ !.mpyproject
8
+ *.pem
9
+ *.md
10
+ !README*.md