Skip to main content

micropython-stdlib-stubs

A limited size copy of typesheds stdlib directory. https://github.com/python/typeshed/tree/main/stdlib

This is used as a dependency in the micropython-*-stub packages to allow overriding of some of the stdlib modules with MicroPython specific implementations.

MicroPython specific updates to:

  • collections

If you have suggestions or find any issues with the stubs, please report them in the MicroPython-stubs Discussions

For an overview of Micropython Stubs please see: https://micropython-stubs.readthedocs.io/en/main/

Building

This is a short description of the steps taken to create or update the stubs for the micropython-stdlib-stubs distribution. this package is built using uv build and published using uv publish.

There are two possible reasons to rebuild

  1. Rebuild in order to update from the reference-stubs or ducument-stubs. This will use the same typeshed stubs, and infuse or enrich them with new information from MicroPython.
  2. Rebuild in order to update to a newer version of theof the typeshedrepo.for this you will need to manually advance the typeset repo to a newer version. Perhaps the newest versionand then rerun the update script it might be that due to the changes in the base 5 stubs that you'll need to make updates to the updatescript in order to accommodate for that.

Steps

  • clone the typeshed repository

    cd repos
    git clone https://github.com/python/typeshed.git
    cd typeshed
    git checkout <commit-hash>
    
  • update the version in pyproject toml to the new version ( .postnn)

  • from the publish/micropython-stdlib-stubs directory

    • run python build.py
  • update and publish the micropython-stdlib-stubs package

    uv publish
    
  • commit the changes to the micropython-stdlib-stubs repository

asyncio notes

asyncio

  • no _asyncio.pyi stubs to avoid conflict with stdlib re-use

  • Generators are not values - but are always callables, or coroutines so rewrite open_connection: Generator ## = <generator> to async def open_connection () -> Callable[..., Awaitable[Tuple[StreamReader, StreamWriter]]] or similar

Publish to PyPi

Publish using uv publish.

Metadata

Release files for micropython-stdlib-stubs 1.29.0.post2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for micropython-stdlib-stubs 1.29.0.post2
File Interpreter ABI Platform
micropython_stdlib_stubs-1.29.0.post2-py3-none-any.whl Python 3 none any Details

Release files / micropython_stdlib_stubs-1.29.0.post2-py3-none-any.whl

Download URL micropython_stdlib_stubs-1.29.0.post2-py3-none-any.whl
Size 154.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdcd54d9896d8e1d455b3a99995d82a8399e1e2c9cb94eacabe278e5c2397783
BLAKE2b-256 checksum
How to use checksums
3ae63edc7601ecbfb1deaee29e7e8beadb7e2d4877b5ed4f71f0c6644bb7493d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for micropython-stdlib-stubs 1.29.0.post2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.29.0.post2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page