Wykres commitów

8 Commity (6ae440a8a144233e6e703f6759b7e7a0afaa37a4)

Autor SHA1 Wiadomość Data
Marcel Petrick b3125247bf all: Correct various typos in comments and docs.
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>
2025-11-19 00:43:18 +11:00
Damien George 3eaf0279f3 datetime: Optimize for code size.
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>
2025-10-02 00:27:10 +10:00
Damien George 656f42071e datetime: Apply localtz patch to include naive date/time support.
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>
2025-10-02 00:25:35 +10:00
Damien George 0d4b3635b4 datetime: Skip tests that require the host to be in UTC timezone.
Signed-off-by: Damien George <damien@micropython.org>
2024-06-17 11:20:11 +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 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 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
Lorenzo Cappelletti fc86070ffb python-stdlib/datetime: Add new implementation of datetime module.
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>
2022-03-22 14:02:01 +11:00