Skip to content

Commit 25c0a0a

Browse files
authored
Merge branch 'adafruit:main' into picow-ap
2 parents 7a50beb + d90bc17 commit 25c0a0a

File tree

197 files changed

+5665
-2286
lines changed

Some content is hidden

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

197 files changed

+5665
-2286
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Python 3
3838
uses: actions/setup-python@v4
3939
with:
40-
python-version: "3.x"
40+
python-version: "3.10"
4141
- name: Get CP deps
4242
run: python tools/ci_fetch_deps.py test ${{ github.sha }}
4343
- name: CircuitPython version
@@ -156,7 +156,7 @@ jobs:
156156
- name: Set up Python 3
157157
uses: actions/setup-python@v4
158158
with:
159-
python-version: "3.x"
159+
python-version: "3.10"
160160
- name: Get CP deps
161161
run: python tools/ci_fetch_deps.py mpy-cross-mac ${{ github.sha }}
162162
- name: CircuitPython version
@@ -220,7 +220,7 @@ jobs:
220220
- name: Set up Python 3
221221
uses: actions/setup-python@v4
222222
with:
223-
python-version: "3.x"
223+
python-version: "3.10"
224224
- name: Install dependencies
225225
run: |
226226
sudo apt-get update
@@ -278,7 +278,7 @@ jobs:
278278
- name: Set up Python 3
279279
uses: actions/setup-python@v4
280280
with:
281-
python-version: "3.x"
281+
python-version: "3.10"
282282
- uses: actions/checkout@v3
283283
with:
284284
submodules: false
@@ -331,7 +331,7 @@ jobs:
331331
- name: Set up Python 3
332332
uses: actions/setup-python@v4
333333
with:
334-
python-version: "3.x"
334+
python-version: "3.10"
335335
- uses: actions/checkout@v3
336336
with:
337337
submodules: false
@@ -384,7 +384,7 @@ jobs:
384384
id: py3
385385
uses: actions/setup-python@v4
386386
with:
387-
python-version: "3.x"
387+
python-version: "3.10"
388388
- uses: actions/checkout@v3
389389
with:
390390
submodules: false
@@ -473,7 +473,7 @@ jobs:
473473
- name: Set up Python 3
474474
uses: actions/setup-python@v4
475475
with:
476-
python-version: "3.x"
476+
python-version: "3.10"
477477
- uses: actions/checkout@v3
478478
with:
479479
submodules: false

.github/workflows/create_website_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Python 3
2424
uses: actions/setup-python@v4
2525
with:
26-
python-version: "3.x"
26+
python-version: "3.10"
2727
- name: Get CP deps
2828
run: python tools/ci_fetch_deps.py website ${{ github.sha }}
2929
- name: Install deps

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python 3
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: "3.x"
23+
python-version: "3.10"
2424
- name: Install deps
2525
run: |
2626
sudo apt-get install -y gettext uncrustify

BUILDING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ Failing to install these will prevent from properly building.
3535

3636
pip3 install -r requirements-dev.txt
3737

38+
If you run into an error installing minify_html, you may need to install `rust`.
39+
3840
### mpy-cross
3941

4042
As part of the build process, mpy-cross is needed to compile .py files into .mpy files.

docs/library/builtins.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,10 +200,6 @@ Exceptions
200200

201201
.. exception:: MemoryError
202202

203-
.. exception:: MpyError
204-
205-
Not a part of the CPython standard library
206-
207203
.. exception:: NameError
208204

209205
.. exception:: NotImplementedError

extmod/moduasyncio.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,18 @@ STATIC mp_obj_t task_getiter(mp_obj_t self_in, mp_obj_iter_buf_t *iter_buf);
7373
#define _TICKS_PERIOD (1lu << 29)
7474
#define _TICKS_MAX (_TICKS_PERIOD - 1)
7575
#define _TICKS_HALFPERIOD (_TICKS_PERIOD >> 1)
76-
76+
#if !CIRCUITPY || (defined(__unix__) || defined(__APPLE__))
7777
STATIC mp_obj_t ticks(void) {
7878
return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_ms() & _TICKS_MAX);
7979
}
80+
#else
81+
// We don't share the implementation above because our supervisor_ticks_ms
82+
// starts the epoch about 65 seconds before the first overflow (see
83+
// shared-bindings/supervisor/__init__.c). We assume/require that
84+
// supervisor.ticks_ms is picked as the ticks implementation under
85+
// CircuitPython for the Python-coded bits of asyncio.
86+
#define ticks() supervisor_ticks_ms()
87+
#endif
8088

8189
STATIC mp_int_t ticks_diff(mp_obj_t t1_in, mp_obj_t t0_in) {
8290
mp_uint_t t0 = MP_OBJ_SMALL_INT_VALUE(t0_in);

extmod/moduselect.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "py/stream.h"
1717
#include "py/mperrno.h"
1818
#include "py/mphal.h"
19+
#include "shared/runtime/interrupt_char.h"
1920

2021
// Flags for poll()
2122
#define FLAG_ONESHOT (1)
@@ -230,6 +231,9 @@ STATIC mp_uint_t poll_poll_internal(uint n_args, const mp_obj_t *args) {
230231
break;
231232
}
232233
RUN_BACKGROUND_TASKS;
234+
if (mp_hal_is_interrupted()) {
235+
return 0;
236+
}
233237
}
234238

235239
return n_ready;

0 commit comments

Comments
 (0)