Wykres commitów

1220 Commity (829f53dc9ea633f3a906cc078027fe7c5248b04e)

Autor SHA1 Wiadomość Data
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
Paul Sokolovsky f6555bae97 uasyncio: On scheduling ready coro, unmark it as I/O-waiting.
Coros which are passed to .add_reader()/.add_writer() are marked as
I/O-bound using .pend_throw(False). Before scheduling it for normal
execution again, we need to unmark it with .pend_throw(None).
2017-12-14 19:14:42 +02:00
Paul Sokolovsky 203cc489c6 uasyncio.core: wait_for: Add support for cancelling I/O-bound coros.
Coros which removed from normal scheduling queue (and possibly put into
another queue, like I/O queue here) are marked with .pend_throw(False).
If wait_for() cancels such a coro, it is explicitly scheduled for execution,
so they actually could process pending exception (coro's exception handler
should take care of removing it from another queue and related clean up).
2017-12-14 19:09:02 +02:00
Paul Sokolovsky 0137449f1f math: Add placeholder module. 2017-12-14 09:46:45 +02:00
Paul Sokolovsky c327850c3e sdist_upip.py: Replacement for optimize_upip.py.
Unlike optimize_upip, which instantiates a separate distutils/setuptools
command to run after "sdist", sdist_upip overrides "sdist" implementation,
so it simplifies publishing workflow (no need to run adhoc commands).

Besides what optimize_upip did (post-porocessing to remove superfluous
files and recompressing with gzip 4K dictionary), sdist_upip also
adds pre-processing step of generation resource module (R.py) from
resource files.

So, now there's a single (and standard) command to generate a distrubution
package for MicroPython.
2017-12-12 23:24:37 +02:00
Paul Sokolovsky 82bb7607f3 dis: Add placeholder module. 2017-12-12 12:17:00 +02:00
Paul Sokolovsky 86f1db5f2c uasyncio.synchro: Release 0.1.1. 2017-12-12 12:12:17 +02:00
Paul Sokolovsky 340b3772a7 uasyncio.synchro: Update for cur_coro -> cur_task rename in uasyncio.core. 2017-12-12 12:10:54 +02:00
Paul Sokolovsky c279a8195f dummy_threading: Add placeholder module. 2017-12-10 17:28:52 +02:00
Paul Sokolovsky 6add549fd0 array: Add placeholder module. 2017-12-10 17:27:59 +02:00
Paul Sokolovsky f1fa3a7ff1 uasyncio: Release 1.3. 2017-12-09 18:08:50 +02:00
Paul Sokolovsky 04c0110319 uasyncio: open_connection: Initial hackish SSL support.
It performs handshake in blocking manner, hopes that writes
work without short writes, and hopes that non-blocking read
is implemented properly by ussl module (there're known issues
with axTLS module for example).
2017-12-09 18:07:32 +02:00