Wykres commitów

1569 Commity (master)

Autor SHA1 Wiadomość Data
Damien George 7b1161dd1b logging: Add support for custom handlers.
Any custom handlers will be passed a LogRecord instance which has members
and a dict with "levelname", "message" and "name", to be used for creating
a log message.  The handler list is a global singleton so that sub-logging
objects all use the same set of (root) handlers.

The name of the root handler is also changed from None to "root", to match
CPython.

Signed-off-by: Damien George <damien@micropython.org>
2020-07-08 15:59:01 +10:00
Damien George dedf328503 fnmatch: Remove dependency on posixpath module.
In micropython-lib, os.path.normcase is already a no-op.

Signed-off-by: Damien George <damien@micropython.org>
2020-07-07 19:09:59 +10:00
Damien George 6b985bbc1b copy: Support copy and deepcopy of OrderedDict objects.
Signed-off-by: Damien George <damien@micropython.org>
2020-07-07 10:56:10 +10:00
Damien George b89114c834 Revert "README: Add note that repository is unmaintained."
This reverts commit 1509830fee.
2019-02-26 01:02:14 +11:00
Paul Sokolovsky 1509830fee README: Add note that repository is unmaintained. 2019-02-24 21:09:10 +03:00
Paul Sokolovsky f20d89c6aa logging: Release 0.3. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky a4f2d5665d logging: example_logging: Add testcase for exception(). 2018-05-11 14:18:02 +10:00
Paul Sokolovsky b97fe09ed9 logging: Add exc() and exception() methods.
Non-standard exc() method accepts exception instance to log as a
parameter. exception() just uses sys.exc_info().
2018-05-11 14:18:02 +10:00
Paul Sokolovsky 09c59c4704 logging: Add setLevel() method. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky a93d0ee87b logging: Release 0.2. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 0feab3397e logging: example_logging: Add more testcases. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 6b67e351f0 logging: Implement isEnabledFor(level) method. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky f788f667ca logging: Some performance and memory use optimizations. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 220b501eeb unittest: Release 0.3.2. 2018-05-11 14:18:02 +10:00
Konstantin Belyalov 912f9413ac unittest: Exit with non zero code in case of failures. Fixing #259 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 0a581ef357 uasyncio.udp: Release 0.1.1. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 8d75a36431 uasyncio.udp: Remove optional flags value in a call to usocket.sendto(). 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 4238bc9653 uasyncio: Release 2.0. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 97be3343fa uasyncio.core: Release 2.0. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 5149a54f91 uasyncio: Update __init__() to take runq_len & waitq_len params. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 7e8a3cfe45 uasyncio.core: test_full_wait: Update for runq/waitq refactor. 2018-05-11 14:18:02 +10:00
Paul Sokolovsky 4c63ecf5a6 uasyncio.core: Switch to separate run and wait queues.
Instead of using single priority queue for all tasks, split into using
"run queue", which represents tasks not waiting until specific time,
which should be run on every (well, next) loop iteration, and wait queue,
still a priority queue. Run queue is a simple FIFO, implemented by
ucollections.deque, recently introduced in pfalcon/micropython. Thus,
there's minimal storage overhead and intrinsic scheduling fairness.
Generally, run queue should hold both a callback/coro and its arguments,
but as we don't feed any send args into coros still, it's optimized to
hold just 1 items for coros, while 2 for callbacks.

Introducing run queue will also allow to get rid of tie-breaking counter
in utimeq implementation, which was introduced to enforce fair scheduling.
It's no longer needed, as all tasks which should be run at given time
are batch-removed from wait queue and batch-inserted into run queue. So,
they may be executed not in the order scheduled (due to non-stable order
of heap), but the whole batch will be executed "atomically", and any new
schedulings from will be processed no earlier than next loop iteration.
2018-05-11 14:18:02 +10:00
Paul Sokolovsky ab3198edd7 uasyncio: benchmark/boom_uasyncio.py: More assert output. 2018-05-11 14:18:02 +10:00
Damien George e439624748 upip: Release 1.2.4.
Change PyPI URL to pypi.org.
2018-04-23 16:15:00 +10:00
Dustin Ingram e17efb0844 upip: Fix upip bootstrap script to use pypi.org. 2018-04-23 16:03:17 +10:00
Dustin Ingram b4c27ea1ea upip: Use new JSON API pointing to pypi.org.
So upip doesn't have to follow redirects.
2018-04-23 16:02:29 +10:00
Dustin Ingram 49e8a839a0 README: Update links related to new PyPI URL.
pypi.python.org was turned off on 13th April 2018 and pypi.org is now the
URL to use; see https://packaging.python.org/guides/migrating-to-pypi-org/
2018-04-23 16:01:35 +10:00
Paul Sokolovsky 9e21d6e1ed uasyncio.udp: Typo fix in debug print. 2018-02-05 12:48:06 +02:00
Paul Sokolovsky 72a90a0c93 uasyncio.core: test_full_wait.py: Make easier to debug. 2018-02-05 12:36:13 +02:00
Paul Sokolovsky 85c82e7467 uasyncio.core: example_call_soon.py: Add logging setup. 2018-02-05 00:21:39 +02:00
Paul Sokolovsky bc14f2f6eb uasyncio.core: test_fair_schedule.py: More checks and iterations. 2018-02-05 00:19:34 +02:00
Paul Sokolovsky 5925aa60e2 uasyncio: Release 1.4.2. Packaging fix. 2018-02-04 13:44:38 +02:00
Paul Sokolovsky 04f8f3db0c uasyncio.core: Release 1.7.2. Packaging fix. 2018-02-04 13:43:07 +02:00
Paul Sokolovsky 31b384c137 uasyncio.websocket.server: Release 0.1. 2018-02-02 20:32:27 +02:00
Paul Sokolovsky 60de502676 all: setup.py: Switch to sdist_upip. 2018-02-02 20:30:52 +02:00
Paul Sokolovsky a44ce8dcc6 make_metadata: Switch to use sdist_upip. 2018-02-02 20:30:05 +02:00
Paul Sokolovsky 2ff5940d92 all: setup.py: Consistently update author and maintainer fields. 2018-02-02 20:25:27 +02:00
Paul Sokolovsky c3cded0134 make_metadata: Support multi-level packages.
Need to split off last component, tested with uasyncio.websocket.server.
2018-02-02 20:19:18 +02:00
Paul Sokolovsky bf8eef9d9e uasyncio.websocket.server: Add echo server example. 2018-02-02 01:35:11 +02:00
Paul Sokolovsky 1e2c8d9ce9 argparse: Release 0.4. 2018-02-02 01:22:59 +02:00
stijn 08b522abac argparse: Implement parse_known_args
This is convenient when components need only to parse a subset of an
application's arguments, and can be implemented with minor changes to
_parse_args: basically just add unknown arguments to a list instead of
raising an exception.
2018-02-02 01:21:32 +02:00
Paul Sokolovsky 4c6e7f7107 uasyncio.websocket.server: Websocket server implementation for uasyncio.
During development, following questions were posed, and subsequently,
answered:

Q #1: Should this be in uasyncio package at all? Upstream doesn't have
this. Pro: will be easier for people do discover (see e.g.
https://github.com/micropython/micropython-lib/issues/148)

A: uasyncio diverges more and more from asyncio, so if something is
convinient for uasyncio, there's no need to look back at asyncio.

Q #2: This provides implements 2 ways to create a WS connections:
1) using start_ws_server(); 2) using wrapping existing StreamReader
and StreamWriter. History: initial prototype of course used 2). But
the idea was "it should be like the official start_server()!!1". But
then I though how to integrate it e.g. with Picoweb, and became clear
that 2) is the most flixble way. So, 1) is intended to be removed.

A: 1) was removed and is not part of the merged version of the patch.

Q #3: Uses native websocket module for read path, but has own
write path due to https://github.com/micropython/micropython/issues/3396

A: So far, so good.

Q #4: Requires https://github.com/micropython/micropython-lib/pull/227
due to https://github.com/micropython/micropython/issues/3394 .

A: The prerequisite was merged.
2018-02-02 01:14:47 +02:00
Paul Sokolovsky 0c45f9f666 upip: Release 1.2.3. 2018-01-27 13:22:59 +02:00
Paul Sokolovsky 559d51c0ee upip: Be sure to create socket with params returned by getaddrinfo().
To use address as returned by getaddrinfo(), we should create a socket
compatible with address family, etc., returned by the same call alongside
the address itself.
2018-01-27 13:22:37 +02:00
Paul Sokolovsky f2114d889d uasyncio: Release 1.4.1. 2018-01-23 23:23:19 +02:00
Paul Sokolovsky 147085d0f7 uasyncio: Be sure to create socket with params returned by getaddrinfo(). 2018-01-23 23:22:37 +02:00
Paul Sokolovsky 63b3d75af2 urllib.urequest: Release 0.6. 2018-01-23 00:27:06 +02:00
Paul Sokolovsky a2647e316e urllib.urequest: Be sure to create socket with params returned by getaddrinfo().
To use address as returned by getaddrinfo(), we should create a socket
compatible with address family, etc., returned by the same call alongside
the address itself.
2018-01-23 00:26:38 +02:00
Paul Sokolovsky 2e4a29defc urequests: Release 0.6. 2018-01-23 00:25:30 +02:00
Paul Sokolovsky 829f53dc9e urequests: Be sure to create socket with params returned by getaddrinfo().
To use address as returned by getaddrinfo(), we should create a socket
compatible with address family, etc., returned by the same call alongside
the address itself.
2018-01-23 00:24:53 +02:00