Skip to content

Commit e5e9c5c

Browse files
authored
Merge pull request #9469 from dhalbert/merge-from-micropython-v1.22.2
Merge from micropython v1.22.2
2 parents dfc3e99 + 450cb49 commit e5e9c5c

File tree

392 files changed

+4992
-4674
lines changed

Some content is hidden

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

392 files changed

+4992
-4674
lines changed

.codespell/exclude-file.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ USB_PRODUCT = "BLOK"
55
print(binascii.b2a_base64(b"fo"))
66
# again, neither will "there" or "wither", since they have "the"
77
i1Qb$TE"rl
8+
ZEN = "the zen of python beautiful is better than ugly explicit is better than implicit simple is better than complex complex is better than complicated flat is better than nested sparse is better than dense readability counts special cases arent special enough to break the rules although practicality beats purity errors should never pass silently unless explicitly silenced in the face of ambiguity refuse the temptation to guess there should be one and preferably only one obvious way to do it although that way may not be obvious at first unless youre dutch now is better than never although never is often better than right now if the implementation is hard to explain its a bad idea if the implementation is easy to explain it may be a good idea namespaces are one honking great idea lets do more of those"
9+
"arent",
10+
"youre",

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# all: Update Python formatting to ruff-format.
2+
bbd8760bd9a2302e5abee29db279102bb11d7732
3+
14
# all: Fix various spelling mistakes found by codespell 2.2.6.
25
cf490a70917a1b2d38ba9b58e763e0837d0f7ca7
36

.gitattributes

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
*.props text eol=crlf
1111
*.bat text eol=crlf
1212

13+
# CIRCUITPY-CHANGE: add some more binary types.
1314
# These are binary so should never be modified by git.
1415
*.a binary
16+
*.ico binary
1517
*.png binary
1618
*.jpg binary
1719
*.dxf binary
1820
*.mpy binary
21+
*.der binary
1922
*.deb binary
2023
*.zip binary
2124
*.pdf binary
@@ -24,11 +27,4 @@
2427
# These should also not be modified by git.
2528
tests/basics/string_cr_conversion.py -text
2629
tests/basics/string_crlf_conversion.py -text
27-
ports/stm32/pybcdc.inf_template -text
28-
ports/stm32/usbhost/** -text
29-
ports/cc3200/hal/aes.c -text
30-
ports/cc3200/hal/aes.h -text
31-
ports/cc3200/hal/des.c -text
32-
ports/cc3200/hal/i2s.c -text
33-
ports/cc3200/hal/i2s.h -text
34-
ports/cc3200/version.h -text
30+
# CIRCUITPY-CHANGE: remove non-CircuitPython tests

.github/workflows/run-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ on:
99

1010
jobs:
1111
run:
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
strategy:
1414
fail-fast: false
1515
matrix:
1616
test: [all, mpy, native, native_mpy]
1717
env:
1818
CP_VERSION: ${{ inputs.cp-version }}
19-
MICROPY_CPYTHON3: python3.8
19+
MICROPY_CPYTHON3: python3.12
2020
MICROPY_MICROPYTHON: ../ports/unix/build-coverage/micropython
2121
TEST_all:
2222
TEST_mpy: --via-mpy -d basics float micropython
@@ -32,7 +32,7 @@ jobs:
3232
- name: Set up python
3333
uses: actions/setup-python@v5
3434
with:
35-
python-version: 3.8
35+
python-version: 3.12
3636
- name: Set up submodules
3737
uses: ./.github/actions/deps/submodules
3838
with:

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
# SPDX-License-Identifier: MIT
44

5+
# CIRCUITPY-CHANGES: many additions
6+
57
# Compiled Sources
68
###################
79
*.o

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#
33
# SPDX-License-Identifier: Unlicense
44

5+
# CIRCUITPY-CHANGE: CircuitPython-specific.
6+
57
repos:
68
- repo: https://github.com/pre-commit/pre-commit-hooks
79
rev: v4.0.1

LICENSE

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,15 @@ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
22+
23+
--------------------------------------------------------------------------------
24+
25+
#CIRCUITPY-CHANGE:
26+
27+
Unless specified otherwise (see below), the above license and copyright applies
28+
to all files derived from MicroPython in this repository.
29+
30+
Individual files may include additional copyright holders and specify other licenses.
31+
See the comments and SPDX headers.

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ check-stubs: stubs
282282
@(cd $(STUBDIR) && set -- */__init__.pyi && mypy "$${@%/*}")
283283
@tools/test-stubs.sh
284284

285+
.PHONY: update-frozen-libraries
285286
update-frozen-libraries:
286287
@echo "Updating all frozen libraries to latest tagged version."
287288
cd frozen; for library in *; do cd $$library; ../../tools/git-checkout-latest-tag.sh; cd ..; done
@@ -350,3 +351,16 @@ remove-all-submodules:
350351
.PHONY: fetch-tags
351352
fetch-tags:
352353
git fetch --tags --recurse-submodules=no --shallow-since="2023-02-01" https://github.com/adafruit/circuitpython HEAD
354+
355+
.PHONY: coverage
356+
coverage:
357+
make -j -C ports/unix VARIANT=coverage
358+
359+
.PHONY: coverage-clean
360+
coverage-fresh:
361+
make -C ports/unix VARIANT=coverage clean
362+
make -j -C ports/unix VARIANT=coverage
363+
364+
.PHONY: run-tests
365+
run-tests:
366+
cd tests; MICROPY_MICROPYTHON=../ports/unix/build-coverage/micropython ./run-tests.py

docs/library/sys.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Constants
6666
.. data:: maxsize
6767

6868
Maximum value which a native integer type can hold on the current platform,
69-
or maximum value representable by CircuitPython integer type, if it's smaller
69+
or maximum value representable by the CircuitPython integer type, if it's smaller
7070
than platform max value (that is the case for CircuitPython ports without
7171
long int support).
7272

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import os
22

33
# Directory that the project lives in, aka ../..
4-
SITE_ROOT = '/'.join(os.path.dirname(__file__).split('/')[0:-2])
4+
SITE_ROOT = "/".join(os.path.dirname(__file__).split("/")[0:-2])
55

66
TEMPLATE_DIRS = (
7-
"%s/templates/" % SITE_ROOT, # Your custom template directory, before the RTD one to override it.
8-
"%s/readthedocs/templates/" % SITE_ROOT, # Default RTD template dir
7+
"%s/templates/"
8+
% SITE_ROOT, # Your custom template directory, before the RTD one to override it.
9+
"%s/readthedocs/templates/" % SITE_ROOT, # Default RTD template dir
910
)

0 commit comments

Comments
 (0)