Angus Gratton
3ec8b9a77c
all: Replace legacy name with MicroPython and MPy as applicable.
...
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c6) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, true, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, true, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Debug, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x64, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, dev, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, dev, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, standard, 2017, [15, 16)) (push) Has been cancelled
windows port / build-vs (Release, true, x86, standard, 2019, [16, 17)) (push) Has been cancelled
windows port / build-vs (Release, x64, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
With the aim of getting consistency, and removing the need to learn an
additional term, replace uses of uPy/uPython with MPy/MicroPython.
Rule of thumb was to use "MPy" abbreviation where "CPy" is used nearby, but
the full word MicroPython otherwise.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au >
2025-10-04 00:19:40 +10:00
Phil Howard
dda9b9c6da
all: Prune trailing whitespace.
...
Prune trailing whitespace across the whole project (almost), done
automatically with:
grep -IUrl --color "[[:blank:]]$" --exclude-dir=.git --exclude=*.exp |\
xargs sed -i 's/[[:space:]]*$//'
Exceptions:
- Skip third-party code in lib/ and drivers/cc3100/
- Skip generated code in bluetooth_init_cc2564C_1.5.c
- Preserve command output whitespace in docs, eg:
docs/esp8266/tutorial/repl.rst
Signed-off-by: Phil Howard <phil@gadgetoid.com >
2024-03-07 16:25:17 +11:00
stephanelsmith
db06041d59
extmod/vfs_posix_file: Implement sys.std*.buffer objects.
...
Add the buffer attribute to sys.stdin, sys.stdout and sys.stderr. This
provides raw access to underlying stdio streams for the unix port (and
others that use VfsPosix).
Signed-off-by: stephanelsmith <stephane.smith@titansensor.com >
2023-09-01 17:39:38 +10:00
Jim Mussared
4216bc7d13
tests: Replace umodule with module everywhere.
...
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com >
2023-06-08 17:54:24 +10:00
Jim Mussared
17127bbee5
tests/run-tests.py: Ensure correct cwd for mpy tests.
...
Previously when using --via-mpy, the file was compiled to tests/<tmp>.mpy
and then run using `micropython -m <tmp>` in the current cwd
(usually tests/). This meant that an import in the test would be resolved
relative to tests/.
This is different to regular (non-via-mpy) tests, where we run (for
example) `micropython basics/test.py` which means that an import would be
resolved relative to basics/.
Now --via-mpy matches the .py behavior. This is important because:
a) It makes it so import tests do the right thing.
b) There are directory names in tests/ that match built-in module names.
Furthermore, it always ensures the cwd (for both micropython and cpython)
is the test directory (e.g. basics/) rather than being left unset. This
also makes it clearer inside the test that e.g. file access is relative to
the Python file.
Updated tests with file paths to match.
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com >
2023-05-18 13:48:21 +10:00
Jim Mussared
cc23e99f32
py/modio: Remove io.resource_stream function.
...
This feature is not enabled on any port, it's not in CPython's io module,
and functionality is better suited to the micropython-lib implementation of
pkg_resources.
2021-12-17 23:53:44 +11:00
Damien George
26b4ef4c46
extmod/vfs_posix_file: Allow closing an already closed file.
...
Signed-off-by: Damien George <damien@micropython.org >
2021-02-11 22:54:41 +11:00
stijn
40ad8f1666
all: Rename "sys" module to "usys".
...
This is consistent with the other 'micro' modules and allows implementing
additional features in Python via e.g. micropython-lib's sys.
Note this is a breaking change (not backwards compatible) for ports which
do not enable weak links, as "import sys" must now be replaced with
"import usys".
2020-09-04 00:10:24 +10:00
David Lechner
3dc324d3f1
tests: Format all Python code with black, except tests in basics subdir.
...
This adds the Python files in the tests/ directory to be formatted with
./tools/codeformat.py. The basics/ subdirectory is excluded for now so we
aren't changing too much at once.
In a few places `# fmt: off`/`# fmt: on` was used where the code had
special formatting for readability or where the test was actually testing
the specific formatting.
2020-03-30 13:21:58 +11:00
Paul Sokolovsky
5c34c2ff7f
tests/io: Update tests to use uos.remove() instead of uos.unlink().
...
After Unix port switches from one to another, to be consistent with
baremetal ports.
2018-11-26 23:27:28 +11:00
Damien George
726804ea40
tests: Move non-filesystem io tests to basics dir with io_ prefix.
2018-06-27 16:55:05 +10:00
Damien George
b92a8adbfa
tests: Add tests using "file" argument in print and sys.print_exception.
2018-06-20 16:08:25 +10:00
Damien George
9144b1f10c
tests/io: Add simple IOBase test.
2018-06-12 12:29:26 +10:00
Mike Wadsten
9f1eafc380
tests/io/bytesio_ext2: Remove dependency on specific EINVAL value
...
If MICROPY_USE_INTERNAL_ERRNO is disabled, MP_EINVAL is not guaranteed
to have the value 22, so we cannot depend on OSError(22,).
Instead, to support any given port's errno values, without relying
on uerrno, we just check that the args[0] is positive.
2018-05-01 15:48:43 +10:00
Paul Sokolovsky
e3383e9352
py/stream: seek: Consistently handle negative offset for SEEK_SET.
...
Per POSIX, this is EINVAL, so raises OSError(EINVAL).
2017-08-20 22:02:41 +03:00
Alexander Steffen
55f33240f3
all: Use the name MicroPython consistently in comments
...
There were several different spellings of MicroPython present in comments,
when there should be only one.
2017-07-31 18:35:40 +10:00
Paul Sokolovsky
85d809d1f4
tests: Convert remaining "sys.exit()" to "raise SystemExit".
2017-06-10 20:34:38 +03:00
Paul Sokolovsky
07241cd37a
py/objstringio: If created from immutable object, follow copy on write policy.
...
Don't create copy of immutable object's contents until .write() is called
on BytesIO.
2017-06-09 17:33:01 +03:00
Tom Collins
162a0f942b
tests/io/bytesio_ext: Test read() after seek() past end of BytesIO object.
2017-05-15 23:58:06 +03:00
Paul Sokolovsky
4a4490ffcc
py/modio: resource_stream: Implement "package" param handling.
2017-05-06 18:42:35 +03:00
Paul Sokolovsky
7d4ba9d257
tests/io/resource_stream: Add test for uio.resource_stream().
2017-05-03 01:47:14 +03:00
Rami Ali
cba723fc8c
tests/io: Improve test coverage of io.BufferedWriter.
2017-01-17 13:27:02 +11:00
Paul Sokolovsky
8212773adb
tests: Use read() instead of readall().
2016-11-14 00:27:35 +03:00
Paul Sokolovsky
3dabaae47d
tests/io/bytesio_ext: Add test for readinto().
2016-10-09 12:01:02 +03:00
Paul Sokolovsky
49e140488d
tests/io/write_ext: Add description comment.
2016-10-09 11:55:28 +03:00
Paul Sokolovsky
abd5a57ea1
tests/io/bytesio_ext: Test for .seek()/.flush() on BytesIO.
2016-07-29 23:00:25 +03:00
Paul Sokolovsky
0b52228739
tests: Add test for extended arguments to stream .write() method.
2016-07-14 11:48:15 +03:00
Paul Sokolovsky
566d8f1d7e
tests: Make "io" modules fixes for CPython compatibility.
...
Previously, "import _io" worked on both CPython and MicroPython (essentially
by a chance on CPython, as there's not guarantee that its contents will stay
the same across versions), but as the module was renamed to uio, need to use
more robust import sequence for compatibility.
2016-05-02 14:38:07 +03:00
Paul Sokolovsky
8c35f3979c
tests: Update for _io/_collections module having been renamed.
2016-05-02 14:15:11 +03:00
Paul Sokolovsky
88f60de914
tests: Add test for io.BufferedWriter.
2016-03-25 15:01:19 +02:00
Damien George
99146ea444
tests/io: Remove "testfile" at end of open_plus test.
2016-03-17 20:09:33 +00:00
Paul Sokolovsky
5bf6eba845
tests/open_plus: Add tests for "r+", "w+" open modes.
2016-02-06 21:59:54 +02:00
Damien George
117158fcd5
tests: Add tests for stream IO errors.
2015-12-23 22:37:02 +00:00
Paul Sokolovsky
a6eff059b9
unix: Rename "_os" module to "uos" for consistency with baremetal ports.
2015-12-12 00:04:35 +02:00
Damien George
d292a81e95
tests: Make io test cleanup after itself by removing 'testfile'.
2015-08-21 08:45:52 +01:00
blmorris
bdd78c31b6
py: Add stream_tell method, and use for unix and stmhal file tell.
2015-08-13 22:56:32 +01:00
Paul Sokolovsky
a06c38b486
tests: Add testcase for open(..., "a").
2015-06-21 00:05:09 +03:00
Damien George
9dd3640464
tests: Add missing tests for builtins, and many other things.
2015-04-04 22:05:30 +01:00
Damien George
92ab95f215
tests: Add some tests to improve coverage.
2015-01-29 14:56:09 +00:00
Paul Sokolovsky
66b060f3e6
tests: Fix typo in file_long_read3.py.
2015-01-23 19:00:02 +02:00
Paul Sokolovsky
1f04336b23
tests: Add extra test for reading multiple of internal chunk size.
2015-01-23 18:18:11 +02:00
Paul Sokolovsky
220d21e1bf
tests: Add testcase for reading amounts bigger than buffer/chunk size.
2015-01-23 16:42:02 +02:00
stijn
bf19541f46
py: Prevent segfault for operations on closed StringIO.
...
Addresses issue #1067 .
2015-01-20 23:50:43 +00:00
Damien George
5694cc5490
py: Make stream seek correctly check for ioctl fn; add seek for textio.
2014-11-16 23:56:37 +00:00
Paul Sokolovsky
c7d5500142
tests: Add test for file.seek().
2014-11-17 00:16:14 +02:00
Paul Sokolovsky
e2f8d98525
stream: Add optional 2nd "length" arg to .readinto() - extension to CPython.
...
While extension to file.readinto() definition of CPython, the additional arg
is similar to what in CPython available in socket.recv_into().
2014-10-23 21:43:59 +03:00
stijn
a3efe04dce
Use mode/encoding kwargs in io and unicode tests
...
mode argument is used to assert it works
encoding argument is used to make sure CPython uses the correct encoding
as it does not automatically use utf-8
2014-10-21 22:10:38 +03:00
Paul Sokolovsky
1a55b6a787
unix, stmhal: Implement file.readinto() method.
...
Also, usocket.readinto(). Known issue is that .readinto() should be available
only for binary files, but micropython uses single method table for both
binary and text files.
2014-10-18 22:44:07 +03:00
Paul Sokolovsky
512465bc66
tests: Add testcase for read by length past EOF.
...
Currently broken for unicode input streams.
2014-07-22 00:11:37 +03:00
Damien George
539681fffd
tests: Rename test scripts, changing - to _ for consistency.
...
From now on, all new tests must use underscore.
Addresses issue #727 .
2014-07-05 06:14:29 +01:00