Wykres commitów

1484 Commity (ebbb78e8e43ef88ae97beb61799890deca19c603)

Autor SHA1 Wiadomość Data
Jim Mussared ebbb78e8e4 logging: Bump minor version.
For changes in 5329ef5301.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-23 11:48:46 +10:00
Jim Mussared a19d2a3596 copy: Bump patch version.
For changes in 0e68c7d518.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-23 11:48:29 +10:00
Jim Mussared 97b7a30ab9 xmltok: Bump patch version.
For changes in 66924d9fa1.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-23 11:48:25 +10:00
Jim Mussared 87b4cdae2f aiorepl: Bump patch version.
For changes in ff842310de.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-23 11:48:14 +10:00
Jim Mussared 8513bfbe9d requests: Rename urequests to requests.
This module implements a subset of the Python requests module, and so
it should have the same name.

Added a backwards-compatibility wrapper to allow people to continue to use
`import urequests`. This lives in micropython/urequests.

Changed requests to be a package, so that we can implement extension
packages in the future for optional functionality.

Added a basic README.md to both.

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-23 11:41:44 +10:00
Jim Mussared 5004436164 tarfile: Rename from utarfile.
This is compatible with the CPython module, so should
be named tarfile.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-23 11:41:44 +10:00
Andrew Leech e45a7f6c18 fnmatch: Fix compatibility with ure -> re.
With the recent MicroPython change to remove the u prefix by default on
builtins (micropython/micropython#11740) the format checker in fnmatch
which was detecting ure no longer works.

This commit updates the module to filter the regex automatically as needed.

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
2023-07-21 17:19:43 +10:00
Jim Mussared 6103823b1b all: Remove __version__ from .py files.
It is inserted automatically during publish/freezing and having them in the
code prevents the automatic process from happening.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21 17:15:00 +10:00
Jim Mussared ff842310de aiorepl: Replace f-string with str.format.
f-strings aren't enabled on all builds (e.g. low-flash ESP8266).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21 17:10:41 +10:00
Andrew Leech 0e68c7d518 copy: Declare dependency on types. 2023-07-21 17:07:06 +10:00
Andrew Leech 5329ef5301 logging: Add full support for logging exception tracebacks.
This commit allows you to pass an exception object in as the exc_info kwarg
(CPython allows this), so logging exceptions can work even if the
MICROPY_PY_SYS_EXC_INFO option is disabled in the firmware.

Separately to that, currently even when sys.exc_info() is enabled, it's
only printing the traceback to _stream = sys.stderr - not to the configured
logging handlers.  This means for instance if you've got a file log
handler it misses out on the tracebacks.  That's also fixed in this commit.

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
2023-07-21 17:01:42 +10:00
Andrew Leech 028a369f90 keyword: Add manifest file. 2023-07-21 16:58:48 +10:00
Andrew Leech b95deb31e5 json: Add manifest file. 2023-07-21 16:58:48 +10:00
Andrew Leech 0f768c9af7 bisect: Add manifest file. 2023-07-21 16:58:48 +10:00
Andrew Leech c2b44ea83b types: Add manifest file. 2023-07-21 16:58:48 +10:00
Jim Mussared c48b17dd17 aiorepl/README.md: More info about globals.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21 16:06:49 +10:00
ThunderEX 66924d9fa1 xmltok: Change StopIteration to EOFError due to PEP-479.
Due to changes in MicroPython to support PEP-479, StopIteration has been
deprecated for return.  This results in xmltok to raise RuntimeError every
time.  This commit is a simple fix to just change from StopIteration to
EOFError and then return it in the generator.
2023-07-21 15:59:10 +10:00
Jim Mussared fe3e0a2fae cmd: Remove comments about using the string module.
Even though we now have a `string` module, just keep the existing
IDENTCHARS definition.

- If someone doesn't already have string installed (or aren't otherwise
  importing it), this would add an extra dependency and more memory used.

- If they do, then the resulting concatenated string has to be allocated
  separately, so there's no gain from using the string.x components.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-21 15:28:14 +10:00
Damien George 0a5b635594 utarfile: Fix read/write handling of nulls in tar header.
For reading, the size is always terminated by a null, so just ignore it by
using 11 for the uctypes entry (this fixes a regression introduced in
7128d423c2).

For writing, the size must always be terminated by a null.

Signed-off-by: Damien George <damien@micropython.org>
2023-07-21 12:58:40 +10:00
Jim Mussared da5ddfc6e2 hashlib: Refactor, split, and optimise.
This splits out each algorithm into its own extension package, so that only
the necessary algorithms can be installed.

This allows for a significant reduction in RAM and flash. i.e. previously
installing hashlib meant that all algorithms were imported.

Additionally ensures that any built-in hash algorithms (from uhashlib) are
still exposed (e.g. `md5`), and retains the existing behavior to use the
built-in preferentially.

Also includes a refactoring of the algorithms to reduce code size and
reduce the number of allocations they do as well as using bytearrays in
place of list-of-int where possible.

Add more comprehensive tests (using unittest).

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-07-20 23:28:08 +10:00
Angus Gratton 2fba6b8644 lora: Workaround SX1262 bug with GetStatus.
This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-07-20 23:13:03 +10:00
Angus Gratton 1957f24020 lora: Add lora modem drivers for SX127x and SX126x.
Includes:
- component oriented driver, to only install the parts that are needed
- synchronous operation
- async wrapper class for asynchronous operation
- two examples with async & synchronous versions
- documentation

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2023-07-20 23:07:22 +10:00
Dan Ellis 7128d423c2 utarfile: Support creating/appending tar files.
This adds a utarfile-write extension package that adds the ability to
create and append to tar files.

Work done by Doug Ellis <dpwe@ee.columbia.edu>.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-05-22 15:02:05 +10:00
glenn20 a1b9aa934c aioespnow: Add library providing asyncio support for espnow module.
This module provides asyncio support for the espnow module on ESP32 and
ESP8266 ports.
2023-05-04 14:21:32 +10:00
Jim Mussared c113611765 aioble: Fix descriptor flag handling.
Removes the workaround for micropython/issues/6864.

Sets the default flags for discovered descriptors to be WRITE,
so that d.write() will implicitly set response=True.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-12 07:04:12 +10:00
Jim Mussared 01db3da37e senml: Allow publishing to PyPI as micropython-senml.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-07 13:28:15 +10:00
Jim Mussared 9b5f4d73b0 tools/makepyproject.py: Add tool to generate PyPI package.
This tool makes a buildable package (including pyproject.toml) from
supported micropython-lib packages, suitable for publishing to PyPI and
using from CPython.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-07 13:24:15 +10:00
Jim Mussared afc9d0a541 micropython: Add missing metadata for packages.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-07 13:24:15 +10:00
Jim Mussared 386ab99d7f python-ecosys: Add pypi= to metadata.
This is so the package knows the "upstream" name of the corresponding PyPI
package that it's based on.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-04-06 12:06:15 +10:00
Andrew Leech f672353180 unittest-discover: Print results when no tests are found/run.
Prior to this commit, if no tests were found when running unittest discover
then nothing at all was written to stdout, leading one to think it's not
working at all.  CPython unittest does display a "0 tests run" sort of
output in such a case, and this commit ensures this package does the same.
2023-03-27 12:06:04 +11:00
Damien George ea21cb3fdc iperf3: Support devices without os.urandom().
Also add a version to the manifest.

Signed-off-by: Damien George <damien@micropython.org>
2023-03-21 16:04:00 +11:00
iabdalkader c8603192d1 senml: Fix data record encoding to use binascii instead of base64. 2023-03-06 23:12:38 +11:00
iabdalkader 295a9e300a senml: Remove u-module prefix from imports.
Signed-off-by: Damien George <damien@micropython.org>
2023-03-03 12:26:31 +11:00
iabdalkader b9741f6584 cbor2: Remove u-module prefix from imports. 2023-03-03 12:20:28 +11:00
Angus Gratton 40dfc5fbc5 github/workflows: Attach built packages to GitHub workflow artifacts. 2023-03-02 16:45:08 +11:00
Angus Gratton 1eb282ad47 tools/ci.sh: Support publishing package and index files to GitHub Pages.
Opt-in feature to make it easier for folks to test packages that are still
in development, open in Pull Requests, or even in independent forks.

---

To enable this on your own GitHub fork of the micropython-lib repository
then navigate to the fork's "Settings" -> "Secrets and variables" ->
"Actions" -> "Variables" page, then click "New repository variable", and
create a variable named MIP_INDEX with value true (or any "truthy" value).

Once enabled then any time a branch is pushed to your fork and builds
successfully, GitHub Actions will also push the built packages and package
index to the gh-pages branch which is associated with the repo's GitHub
Pages web site.  The packages can then be installed remotely via:

    mpremote mip --index \
      https://USERNAME.github.io/micropython-lib/mip/BRANCH_NAME PACKAGE_NAME

or on a device as:

    mip.install(PACKAGE_NAME, index="https://USERNAME.github.io/micropython-lib/mip/BRANCHNAME")

(Replace USERNAME, BRANCH_NAME and PACKAGE_NAME as applicable. If you've
renamed your fork, change the name micropython-lib to match.)

Note: As well as the MIP_INDEX repository variable, this functionality
depends on both GitHub Actions and GitHub Pages being enabled on your
repository in GitHub.  However both options should enable automatically,
unless they have been manually disabled.

This work was funded through GitHub Sponsors.
2023-03-02 16:44:18 +11:00
iabdalkader 9ee02576cb senml: Add SenML library.
This is a new library that doesn't follow any existing API.

The library is originally from
https://github.com/kpn-iot/senml-micropython-library.
2023-03-01 01:18:30 +11:00
iabdalkader 52fcb8e4a7 cbor2: Add cbor2 library.
This aims to follow the API of the cbor2 library found at
https://github.com/agronholm/cbor2 (also on PyPI as cbor2).

The original source for this MicroPython version of cbor2 is from
https://github.com/kpn-iot/senml-micropython-library.
2023-03-01 01:13:06 +11:00
Daniel Flanagan 78900afca5 aioble: Add short name support to scan results.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-28 11:07:34 +11:00
Gavin Douch 23018a86bf unittest: Add subtest usage examples.
This work was funded by Planet Innovation.
2023-02-21 23:56:06 +11:00
iabdalkader e3371bef6c bmm150: Add new magnetometer driver.
For the BOSCH BMM150 magnetometer.
2023-02-18 15:55:36 +11:00
iabdalkader 92854c1754 bmi270: Add new IMU driver.
For the BOSCH BMI270 IMU.
2023-02-18 15:55:10 +11:00
iabdalkader bf8b3c04de lsm9ds1: Refactor driver.
Changes are:
- fix typos
- simplify the driver init code
- support setting the magnetometer ODR separately
- update manifest
2023-02-18 15:54:04 +11:00
iabdalkader e88aa3af16 lsm6dsox: Refactor driver.
Changes are:
- fix typos
- make constants global
- rename functions with double underscore to single underscore
- rename __init__ keyword argument cs_pin -> cs
- rename read_mlc_output() -> mlc_output()
- rename read_gyro() -> gyro()
- rename read_accel() -> accel()
- update manifest
2023-02-18 15:51:53 +11:00
iabdalkader 203e1e63b1 hs3003: Add new relative humidity and temperature sensor driver.
Renesas HS3003 Humidity and Temperature sensor driver.
2023-02-18 15:50:57 +11:00
Jim Mussared a08087249f top: Update Python formatting to black "2023 stable style".
See https://black.readthedocs.io/en/stable/the_black_code_style/index.html

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-02-03 17:12:38 +11:00
Damien George c1526d2d1e github/workflows: Add workflow to build all packages.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-01 12:28:25 +11:00
Damien George e3059a9b58 bundle-networking: Fix metadata to correctly use "description" field.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-01 12:21:08 +11:00
Damien George 2cd63d6cf4 glob: Fix require of os-path.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-01 12:07:28 +11:00
Damien George 212cb7790f urllib.parse: Fix require of collections-defaultdict.
Signed-off-by: Damien George <damien@micropython.org>
2023-02-01 12:04:07 +11:00