Skip to content

Commit 446169e

Browse files
authored
Merge pull request #4720 from tannewt/merge_1.13
Merge in MicroPython 1.13
2 parents 9f3ae54 + 5c73683 commit 446169e

File tree

573 files changed

+13453
-5707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+13453
-5707
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,27 +71,18 @@ jobs:
7171
run: make -C mpy-cross -j2
7272
- name: Build unix port
7373
run: |
74-
make -C ports/unix deplibs -j2
75-
make -C ports/unix -j2
76-
make -C ports/unix coverage -j2
74+
make -C ports/unix VARIANT=coverage -j2
7775
- name: Test all
78-
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1
76+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1
7977
working-directory: tests
80-
- name: Print failure info
81-
run: |
82-
shopt -s nullglob;
83-
for exp in *.exp;
84-
do testbase=$(basename $exp .exp);
85-
echo -e "\nFAILURE $testbase";
86-
diff -u $testbase.exp $testbase.out;
87-
done
88-
working-directory: tests
89-
if: failure()
9078
- name: Native Tests
91-
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native
79+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1 --emit native
9280
working-directory: tests
9381
- name: mpy Tests
94-
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
82+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy -d basics float micropython
83+
working-directory: tests
84+
- name: Native mpy Tests
85+
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests -j1 --mpy-cross-flags='-mcache-lookup-bc' --via-mpy --emit native -d basics float micropython
9586
working-directory: tests
9687
- name: Build mpy-cross.static-aarch64
9788
run: make -C mpy-cross -j2 -f Makefile.static-aarch64

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ build-*/
3737

3838
# Test failure outputs
3939
######################
40-
tests/*.exp
41-
tests/*.out
40+
tests/results/*
4241

4342
# Python cache files
4443
######################

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013-2019 Damien P. George
3+
Copyright (c) 2013-2020 Damien P. George
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# You can set these variables from the command line.
99
PYTHON = python3
10-
SPHINXOPTS =
10+
SPHINXOPTS = -W --keep-going
1111
SPHINXBUILD = sphinx-build
1212
PAPER =
1313
# path to build the generated docs
@@ -223,7 +223,7 @@ pseudoxml:
223223
all-source:
224224

225225
locale/circuitpython.pot: all-source
226-
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o - | sed -e '/"POT-Creation-Date: /d' > $@
226+
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o - | sed -e '/"POT-Creation-Date: /d' > $@
227227

228228
# Historically, `make translate` updated the .pot file and ran msgmerge.
229229
# However, this was a frequent source of merge conflicts. Weblate can perform
@@ -248,7 +248,7 @@ merge-translate:
248248

249249
.PHONY: check-translate
250250
check-translate:
251-
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot.tmp -p locale
251+
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate --keyword=MP_ERROR_TEXT -o circuitpython.pot.tmp -p locale
252252
$(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status
253253

254254
stubs:

conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import urllib.parse
2626
import time
2727

28-
import recommonmark
2928
from sphinx.transforms import SphinxTransform
3029
from docutils import nodes
3130
from sphinx import addnodes
@@ -68,8 +67,9 @@
6867
'sphinx.ext.intersphinx',
6968
'sphinx.ext.todo',
7069
'sphinx.ext.coverage',
70+
'sphinx_search.extension',
7171
'rstjinja',
72-
'recommonmark',
72+
'myst_parser',
7373
]
7474

7575
# Add any paths that contain templates here, relative to this directory.

docs/design_guide.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -587,10 +587,10 @@ object instead of the pins themselves. This allows the calling code to provide
587587
any object with the appropriate methods such as an I2C expansion board.
588588

589589
Another example is to expect a :py:class:`~digitalio.DigitalInOut` for a pin to
590-
toggle instead of a :py:class:`~microcontroller.Pin` from `board`. Taking in the
591-
:py:class:`~microcontroller.Pin` object alone would limit the driver to pins on
592-
the actual microcontroller instead of pins provided by another driver such as an
593-
IO expander.
590+
toggle instead of a :py:class:`~microcontroller.Pin` from :py:mod:`board`.
591+
Taking in the :py:class:`~microcontroller.Pin` object alone would limit the
592+
driver to pins on the actual microcontroller instead of pins provided by another
593+
driver such as an IO expander.
594594

595595
Lots of small modules
596596
--------------------------------------------------------------------------------

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ Full Table of Contents
3636
:caption: MicroPython specific
3737

3838
library/index.rst
39+
reference/glossary.rst
3940

4041
.. toctree::
4142
:maxdepth: 1

docs/library/btree.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Example::
7878
Functions
7979
---------
8080

81-
.. function:: open(stream, \*, flags=0, pagesize=0, cachesize=0, minkeypage=0)
81+
.. function:: open(stream, *, flags=0, pagesize=0, cachesize=0, minkeypage=0)
8282

8383
Open a database from a random-access ``stream`` (like an open file). All
8484
other parameters are optional and keyword-only, and allow to tweak advanced
@@ -118,7 +118,7 @@ Methods
118118
Flush any data in cache to the underlying stream.
119119

120120
.. method:: btree.__getitem__(key)
121-
btree.get(key, default=None)
121+
btree.get(key, default=None, /)
122122
btree.__setitem__(key, val)
123123
btree.__detitem__(key)
124124
btree.__contains__(key)

docs/library/errno.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@
77
|see_cpython_module| :mod:`cpython:errno`.
88

99
This module provides access to symbolic error codes for `OSError` exception.
10+
A particular inventory of codes depends on :term:`MicroPython port`.
1011

1112
Constants
1213
---------
1314

1415
.. data:: EEXIST, EAGAIN, etc.
1516

1617
Error codes, based on ANSI C/POSIX standard. All error codes start with
17-
"E". Errors are usually accessible as ``exc.args[0]``
18+
"E". As mentioned above, inventory of the codes depends on
19+
:term:`MicroPython port`. Errors are usually accessible as ``exc.args[0]``
1820
where ``exc`` is an instance of `OSError`. Usage example::
1921

2022
try:
@@ -28,5 +30,5 @@ Constants
2830
Dictionary mapping numeric error codes to strings with symbolic error
2931
code (see above)::
3032

31-
>>> print(errno.errorcode[uerrno.EEXIST])
33+
>>> print(errno.errorcode[errno.EEXIST])
3234
EEXIST

docs/library/framebuf.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:mod:`framebuf` --- Frame buffer manipulation
1+
:mod:`framebuf` --- frame buffer manipulation
22
=============================================
33

44
.. include:: ../templates/unsupported_in_circuitpython.inc
@@ -30,7 +30,7 @@ For example::
3030
Constructors
3131
------------
3232

33-
.. class:: FrameBuffer(buffer, width, height, format, stride=width)
33+
.. class:: FrameBuffer(buffer, width, height, format, stride=width, /)
3434

3535
Construct a FrameBuffer object. The parameters are:
3636

@@ -132,7 +132,7 @@ Constants
132132

133133
Monochrome (1-bit) color format
134134
This defines a mapping where the bits in a byte are horizontally mapped.
135-
Each byte occupies 8 horizontal pixels with bit 0 being the leftmost.
135+
Each byte occupies 8 horizontal pixels with bit 7 being the leftmost.
136136
Subsequent bytes appear at successive horizontal locations until the
137137
rightmost edge is reached. Further bytes are rendered on the next row, one
138138
pixel lower.
@@ -141,7 +141,7 @@ Constants
141141

142142
Monochrome (1-bit) color format
143143
This defines a mapping where the bits in a byte are horizontally mapped.
144-
Each byte occupies 8 horizontal pixels with bit 7 being the leftmost.
144+
Each byte occupies 8 horizontal pixels with bit 0 being the leftmost.
145145
Subsequent bytes appear at successive horizontal locations until the
146146
rightmost edge is reached. Further bytes are rendered on the next row, one
147147
pixel lower.

0 commit comments

Comments
 (0)