Wykres commitów

1231 Commity (bf8eef9d9e7fc0f08a11f3792c233babbdbb7c29)

Autor SHA1 Wiadomość Data
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
Paul Sokolovsky 8392bd8ea5 pickle: Release 0.1. 2018-01-21 14:51:45 +02:00
Paul Sokolovsky 1c30e28c40 pickle: test_pickle.py: Update for bytes being returned/consumed. 2018-01-21 14:50:37 +02:00
Paul Sokolovsky 22527a6ebd pickle: Module produces and consumes bytes.
So, dumps() should return bytes, dump() should be passed binary file, etc.
2018-01-21 14:49:24 +02:00
Paul Sokolovsky 66f147a761 pickle: test_pickle.py: Turn into real test, add more cases.
Including a test for arbitrary statement execution.
2018-01-21 14:45:12 +02:00
Paul Sokolovsky 4328dde8f8 pickle: Replace exec() with eval(), smaller surface for security issues. 2018-01-21 14:42:49 +02:00
Paul Sokolovsky 73bd871268 hashlib: Release 2.4.0-4. 2018-01-20 11:51:02 +02:00
Paul Sokolovsky 175634b3cd hashlib: Reuse classes available in ushashlib, extend tests. 2018-01-20 11:50:59 +02:00
Paul Sokolovsky f8ee045adb hashlib: Rename submodules to avoid naming conflicts.
Both submodules and classes are named like "sha256", this may lead to
issues when loading just specific items from modules.
2018-01-20 11:36:23 +02:00
Paul Sokolovsky c94c6e0d45 uaiohttpclient: Release 0.5.1. 2018-01-14 11:51:59 +02:00
Paul Sokolovsky f29477fea5 uaiohttpclient: Support HTTP reply lines without textual description.
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space
after the numeric code, but it was reported that some software sends
lines like above nonetheless.

Ref: https://github.com/micropython/micropython-lib/issues/247
2018-01-14 11:50:32 +02:00
Paul Sokolovsky 23ac9e5821 urllib.urequest: Release 0.5.1. 2018-01-14 11:41:14 +02:00
Paul Sokolovsky 469e029dd2 urllib.urequest: Support HTTP reply lines without textual description.
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space
after the numeric code, but it was reported that some software sends
lines like above nonetheless.

Ref: https://github.com/micropython/micropython-lib/issues/247
2018-01-14 11:40:11 +02:00
Paul Sokolovsky cdea2d94cc urequests: Release 0.5.2. 2018-01-14 11:34:44 +02:00
Paul Sokolovsky 4d46561a5b urequests: Support HTTP reply lines without textual description.
E.g. "HTTP/1.1 500". RFC7230 seems to formally require at least a space
after the numeric code, but it was reported that some software sends
lines like above nonetheless.

Ref: https://github.com/micropython/micropython-lib/issues/247
2018-01-14 11:21:23 +02:00
Paul Sokolovsky 4c2c940c13 ssl: Release 0.1. 2018-01-10 00:13:04 +02:00
Alex Robbins d76ecc4fb7 ssl: Wrap ussl.wrap_socket().
Arguments whose values are the default are not passed to ussl, because
many arguments are not accepted by current ussl implementations, even
if the desired behavior is the same as when they are omitted.
2018-01-10 00:11:37 +02:00
Alex Robbins a4a524e4ac ssl: Add more constants.
Beyond imported from ussl.
2018-01-10 00:11:17 +02:00
Paul Sokolovsky 157e3b5d61 make_metadata: Use more specific 'micropython-lib Developers'. 2018-01-07 16:27:47 +02:00
Paul Sokolovsky 94af1328c1 upip: Add copyright header. 2018-01-07 16:17:17 +02:00
Paul Sokolovsky f0ed97ad23 README: Mention that some modules may require pfalcon's fork. 2018-01-07 16:04:59 +02:00
Paul Sokolovsky 9ff3beabd1 uasyncio.core: Release 1.7.1. 2018-01-07 10:44:13 +02:00
Paul Sokolovsky 06a2abae56 uasyncio.core: Add test for cancel(coro) function. 2018-01-07 10:43:15 +02:00
Paul Sokolovsky 17a432c1a3 uasyncio.core: Add cancel(coro) function.
This also adds CancelledError exception and makes TimeoutError be a
subclass of it. As well as adds default exception handler for it in
the eventloop (which just skips re-adding this coro to the scheduling
queue, as expected).
2018-01-07 10:41:51 +02:00
Paul Sokolovsky c59c5c6ef8 datetime: Release 3.3.3-1. 2017-12-21 18:54:16 +02:00
Paul Sokolovsky 107c17591a datetime: test_datetime: Skip some tests for MicroPython.
Otherwise, runs completely (with object.__new__ patch).
2017-12-20 13:55:45 +02:00
Paul Sokolovsky 45fffed699 datetime: Replace '"%c" % char' with '"%s" % char'.
MicroPython may have issues with unicode chars.
2017-12-19 09:09:49 +02:00
Paul Sokolovsky fe2b6d473a datetime: Avoid float.as_integer_ratio().
MicroPython doesn't have it, so implement equivalent (+/- rounding errors)
arithmetics.
2017-12-18 00:39:01 +02:00
Paul Sokolovsky 1bde1058ce udnspkt: Release 0.1. 2017-12-17 20:56:13 +02:00
Paul Sokolovsky 1d1caa29c3 udnspkt: Add example. 2017-12-17 16:48:11 +02:00
Paul Sokolovsky 7e334411c2 udnspkt: A module to create/parse DNS packets to resolve hostnames.
This module implements "Sans I/O" approach, where packets are created/
parsed using BytesIO objects, and all networking happens outside the
module.

The module implements enough functionality to resolve a domain name
into IP address, for both IPv4 and IPv6.

Other DNS functionality is outside the scope of this module, that's
why it's called *u*dnspkt.

The API is experimental and subject to change.

This module requires .readbin()/.writebin() methods on a stream.
2017-12-17 16:27:46 +02:00
Paul Sokolovsky 7e643f6365 uasyncio.udp: Release 0.1. 2017-12-16 00:41:17 +02:00
Paul Sokolovsky eb7d34d127 uasyncio.udp: Add example interacting with dnsmasq DNS. 2017-12-16 00:40:35 +02:00
Paul Sokolovsky 916e15ed35 uasyncio.udp: New functional API, mimicking socket module.
Don't have any wrapper classes for UDP socket, instead just have top-level
coroutines, taking raw socket as an argument:

s.recv(1500) => await uasyncio.udp.recv(s, 1500)
2017-12-16 00:40:03 +02:00
Paul Sokolovsky 057b0ba4c4 uasyncio: Release 1.4. 2017-12-15 20:25:35 +02:00
Paul Sokolovsky fede052d48 uasyncio.core: Release 1.7. 2017-12-15 20:24:40 +02:00
Paul Sokolovsky ac1d0391d8 sdist_upip: Don't treat files at the toplevel dir as resources.
E.g. README. Resources should be inside a package.
2017-12-15 00:20:59 +02:00
Paul Sokolovsky 223d91dc82 sdist_upip: Need to override setuptools' "sdist" command, not distutils'.
Without setuptools, there will be no goodies like dependencies, etc.
2017-12-15 00:08:31 +02:00
Paul Sokolovsky f6c00613db uasyncio.core: Add test for wait_for() call. 2017-12-14 19:38:49 +02:00