Wykres commitów

1571 Commity (7271f1ddc75d4d64341e9701a7a21e9b39968b4b)

Autor SHA1 Wiadomość Data
Jim Mussared 75d129b96f micropython/drivers: Move "lsm6sox" imu driver from main repo.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06 13:21:48 +10:00
Jim Mussared fd84cd92f3 micropython/drivers: Move "lsm9ds1" imu driver from main repo.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06 13:21:44 +10:00
Jim Mussared a5e2f3239c micropython/drivers: Move "ssd1306" display driver from main repo.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06 13:21:40 +10:00
Jim Mussared d88505680f micropython/drivers: Move "lcd160cr" display driver from main repo.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06 13:21:35 +10:00
Jim Mussared 2a849f5ec0 micropython/drivers: Move "wm8960" codec driver from main repo.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06 13:21:30 +10:00
Jim Mussared 34c9faefd1 micropython/drivers: Move "onewire" bus driver from main repo.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-06 13:21:26 +10:00
Jim Mussared f3cfc52ab0 unix-ffi: Move more unix-only packages to unix-ffi.
With the dependencies captured in manifest.py, several packages in
python-stdlib were still unix-only due to direct or transitive dependencies
on unix-only or ffi modules.  Or they just make no sense to run on
microcontroller targets.

In a few cases (e.g. base64) where possible, the unix dependency could be
removed.

Updates manifest.py to use the `unix_ffi=True` arg to `require()` for these
libraries.

Rename re-pcre to re now that unix-ffi is effectively its own namespace.

Update unix-ffi/README.md, and strengthen the wording that the unix
libraries are unmaintained.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:50:42 +10:00
Jim Mussared ce66e701a5 all: Replace metadata.txt with manifest.py.
Uses the new require()/package()/module() functions from manifestfile.py.

Add manifest.py for iperf3 and pyjwt.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:50:28 +10:00
Jim Mussared 8d7753d7d4 micropython/upip: Remove upip library.
This is unmaintained and not the one installed by default on boards
(see github.com/micropython/micropython/blob/master/tools/upip.py).

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:50:16 +10:00
Jim Mussared ecef7a506c all: Remove all setup.py files.
These are unused and will be replaced with manifest.py.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-05 17:50:11 +10:00
Philip Peitsch a18d49cda7 aioble: Make l2cap chunk size configurable to allow optimization by app. 2022-09-05 15:14:13 +10:00
Philip Peitsch c4fada7f6f aioble: Fix missing GattError import in server.py.
2015-01-01 07:45:46.790 INFO Received OLCP_OP_FIRST
2015-01-01 07:45:46.979 ERROR Error in ble_write_listener
Traceback (most recent call last):
  File "aioble/server.py", line 223, in indicate
NameError: name 'GattError' isn't defined
2022-09-05 15:12:48 +10:00
Andrew Leech 09f0e47386 aioble: Add timeout to device.exchange_mtu.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-09-01 22:30:43 +10:00
Jim Mussared c3f4779002 python-ecosys/pyjwt/jwt.py: Fix missing whitespace.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-09 17:06:49 +10:00
Jim Mussared f95260d7e3 python-stdlib/hmac: Update to work with built-in hash functions.
This library was non-functional unless used with the micropython-lib
pure-Python implementation of hashlib, even if the device provides
sha1 and sha256.

This updates hmac to be significantly more RAM efficient (removes the
512-byte table), and functional with the built-in hash functions.

The only unsupported function is "copy", but this is non-critical, and now
fails with a NotSupportedError.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2022-08-09 00:19:31 +10:00
Miguel Grinberg 9fdf046e27 python-ecosys/pyjwt: Add pyjwt-compatible module. 2022-08-08 22:13:08 +10:00
Andrew Leech 70e422dc2e urequests: Release 0.7.0. 2022-06-29 13:02:46 +10:00
Bogdan a3d6d29b1b urequests: Add timeout, passed to underlying socket if supported. 2022-06-29 13:02:31 +10:00
Andrew Leech dbd8fff830 urequests: Raise error when server doesn't respond with valid http. 2022-06-29 13:02:00 +10:00
karfas a725c42049 urequests: Always open sockets in SOCK_STREAM mode.
On the ESP32, socket.getaddrinfo() might return SOCK_DGRAM instead of
SOCK_STREAM, eg with ".local" adresses.  As a HTTP request is always a TCP
stream, we don't need to rely on the values returned by getaddrinfo.
2022-06-29 13:01:34 +10:00
Diefesson de Sousa SIlva b29cffb3e3 urequests: Add support for redirects. 2022-06-29 13:01:24 +10:00
Diefesson de Sousa SIlva b17e9aaf93 urequests: Add support for requests with chunked upload data. 2022-06-29 13:01:01 +10:00
Diefesson de Sousa SIlva be327a7bc7 binascii: Implement newline param in function b2a_base64.
See: https://docs.python.org/3/library/binascii.html#binascii.b2a_base64
2022-06-29 13:00:50 +10:00
Fabian Schmitt e7e8eff86b urequests: Add Basic Authentication support.
Usage matches the shorthand version described in
https://requests.readthedocs.io/en/latest/user/authentication/#basic-authentication
2022-06-29 12:59:38 +10:00
Andrew Leech 106c28a4d7 urequests: Fix raising unsupported Transfer-Encoding exception.
Would lead to recursive TypeError because of str + bytes.
2022-06-29 12:59:12 +10:00
Paul Sokolovsky d978e246d5 urequests: Explicitly add "Connection: close" to request headers.
Even though we use HTTP 1.0, where closing connection after sending
response should be the default, some servers ignore this requirement and
keep the connection open.  So, explicitly send corresponding header to get
the expected behavior.
2022-06-29 12:58:47 +10:00
Paul Sokolovsky 5854ae1286 urequests: Add ability to parse response headers.
This is controlled by parse_headers param to request(), which defaults to
True for compatibility with upstream requests. In this case, headers are
available as .headers of Response objects. They are however normal (not
case-insensitive) dict.

If parse_headers=False, old behavior of ignore response headers is used,
which saves memory on the dict.

Finally, parse_headers can be a custom function which can e.g. parse only
subset of headers (again, to save memory).
2022-06-28 16:55:15 +10:00
Andrew Leech db4c739863 unittest: Version 0.9.0 2022-05-06 10:47:37 +10:00
Andrew Leech 959115d3a9 unittest: Add support for specifying custom TestRunner. 2022-05-06 10:47:37 +10:00
Steve Li 2d61dbdb93 unittest: Add setUpClass and tearDownClass handling.
Supports setUp and tearDown functionality at Class level.
2022-05-06 10:47:37 +10:00
Andrew Leech ddeb9a7da2 unittest: Improve failure text consistency with cpython. 2022-05-06 10:47:37 +10:00
Andrew Leech 9b6315a2ba unittest: Add exception capturing for subTest. 2022-05-06 10:47:37 +10:00
Andrew Leech 9f6f211506 unittest: Reset python env between tests. 2022-05-06 10:47:37 +10:00
Andrew Leech cb8d108ac1 unittest: Add test for environment isolation. 2022-05-06 10:47:37 +10:00
Andrew Leech a7b2f63117 unittest: Add discover function. 2022-05-06 10:47:37 +10:00
Andrew Leech 9d9ca3d59b unittest: Run test_* functions as well as TestCase classes. 2022-05-06 10:47:37 +10:00
Andrew Leech c7eb3de858 unittest: Print module name on result lines.
Matches cpython format.
2022-05-06 10:47:37 +10:00
Paul Sokolovsky f92833b015 unittest: Support TestCase subclasses with own runTest() method.
E.g. for doctest.

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky ac282d861e unittest: Add TextTestRunner as alias for TestRunner.
For CPython compatibility.

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 5a53a75ec1 unittest: Print no. of skipped tests in a way compatible with CPython.
Perhaps, modern CPython (3.8).

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 01fcd42042 unittest: test_unittest: Add tests for expectedFailure decorator.
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 377ebbfe56 unittest: Add expectedFailure decorator.
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 8e82f3d80b unittest: Support recursive TestSuite's.
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky e582666f5d unittest: Properly handle failures vs errors.
Also, rework result printing to be more compatible with CPython.

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 1b46612f94 unittest: Implement basic addCleanup()/doCleanup().
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 2c0b508e4d unittest: TestSuite: Add run() method.
For CPython compatibility.

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 04dce89790 unittest: Add dummy TestCase.assertWarns() context manager.
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 555f28ce6d unittest: Add dummy TestCase.subTest() context manager.
Just runs "subtests" in the scope of the main TestCase.

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 7d77774027 unittest: Add TestCase.skipTest() method.
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00
Paul Sokolovsky 5d3a44cb1c unittest: TestCase: Add (dummy) __init__.
Mostly to workaround inherited MicroPython's issues with inheritance.

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
2022-05-06 10:47:37 +10:00