You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we minimize our imports sufficiently that hip is able to run on micropython?
$ grep "^import" ./src/hip/* -h | sort | uniq
import contextlib # *snip* (Used in the timeouts. Use an explicit manager instead.)
import contextvars # *snip* (Used in the timeouts. An explicit style would be `backend.timeout(...)` instead of global contextvar.)
import copy # *snip* (Used in JSON to ensure immutability. Easy to do this explicitly instead.)
import datetime # *snip* (User in Server for `Date` header. Replace with `time.gmtime()` and an explicit formatting helper function)
import enum # *snip* (Used in parsers. Could just use CONSTANTS.)
import io
import ipaddress # *snip* (Used in URL parsing. This validation could be optional, or removed.)
import json
import logging # *snip* (We could shim this.)
import os
import re
import time
import types # *snip* (Annotations only.)
import typing # *snip* (Annotations only.)
import zlib
Async support is a pre-cursor for this working all the way through.
Perhaps having the import contraints of micropython would be worthwhile?
Activity
[-]MicorPython[/-][+]MicroPython[/+][-]MicroPython[/-][+]MicroPython support[/+][-]MicroPython support[/-][+]Minimising imports[/+][-]Minimising imports[/-][+]so smol!!... minimising imports[/+][-]so smol!!... minimising imports[/-][+]✨🐱✨ smol - minimising imports[/+][-]✨🐱✨ smol - minimising imports[/-][+]✨🐱✨ smol - minimising imports!![/+]