Non-functional changes only:
- Fixed minor spelling mistakes in comments.
- Corrected typos in user-facing strings.
- No variables, logic, or functional code was modified.
Signed-off-by: Marcel Petrick <mail@marcelpetrick.it>
Optimizations applied here are:
- writing once-used helper functions inline in their place of use
- writing once-used constant tuples inline in their place of use (I would
have used `from micropython import const` but that renders the code not
runnable under CPython for testing, and also increases code size itself
for the import)
- renamed _tmod to _t
- renamed _format to _fmt
- optimised timedelta._tuple() slightly
Reduces datetime.mpy by: 8897 -> 8728, so saves 169 bytes.
Signed-off-by: Damien George <damien@micropython.org>
This commit applies the existing `localtz.patch` patch to add support for
naive datetime objects. That is, objects that don't have any info about
the current timezone.
This allows `datetime.datetime.now()` to work; prior to this patch it would
raise NotImplementedError.
Although we don't really have support for localtime vs gmtime on
bare-metal, ports such as the unix port and webassembly port do have this
distinction, and for them being able to do `datetime.datetime.now()` is
quite important (at least, that's what users expect to be able to do).
The associated unittest test has been updated.
This patch changes the size of datetime.mpy: 8466 -> 8897, so +431 bytes.
Signed-off-by: Damien George <damien@micropython.org>
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>
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>
This new module is a port of Python datetime providing classes for
manipulating dates, times, and deltas. It completely replaces the existing
unix-ffi version.
Signed-off-by: Lorenzo Cappelletti <lorenzo.cappelletti@gmail.com>