Skip to content

Commit de7a9c3

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into add-os-utime-function
2 parents 4cd370e + 1569c7e commit de7a9c3

Some content is hidden

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

81 files changed

+1025
-279
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
env:
3131
GITHUB_CONTEXT: ${{ toJson(github) }}
3232
run: echo "$GITHUB_CONTEXT"
33-
- uses: actions/checkout@v2.2.0
33+
- uses: actions/checkout@v3
3434
with:
3535
submodules: false
3636
fetch-depth: 1
3737
- name: Set up Python 3
38-
uses: actions/setup-python@v2
38+
uses: actions/setup-python@v4
3939
with:
4040
python-version: "3.x"
4141
- name: Get CP deps
@@ -92,25 +92,25 @@ jobs:
9292
working-directory: tests
9393
- name: Build mpy-cross.static-aarch64
9494
run: make -C mpy-cross -j2 -f Makefile.static-aarch64
95-
- uses: actions/upload-artifact@v2
95+
- uses: actions/upload-artifact@v3
9696
with:
9797
name: mpy-cross.static-aarch64
9898
path: mpy-cross/mpy-cross.static-aarch64
9999
- name: Build mpy-cross.static-raspbian
100100
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
101-
- uses: actions/upload-artifact@v2
101+
- uses: actions/upload-artifact@v3
102102
with:
103103
name: mpy-cross.static-raspbian
104104
path: mpy-cross/mpy-cross.static-raspbian
105105
- name: Build mpy-cross.static
106106
run: make -C mpy-cross -j2 -f Makefile.static
107-
- uses: actions/upload-artifact@v2
107+
- uses: actions/upload-artifact@v3
108108
with:
109109
name: mpy-cross.static-amd64-linux
110110
path: mpy-cross/mpy-cross.static
111111
- name: Build mpy-cross.static-mingw
112112
run: make -C mpy-cross -j2 -f Makefile.static-mingw
113-
- uses: actions/upload-artifact@v2
113+
- uses: actions/upload-artifact@v3
114114
with:
115115
name: mpy-cross.static-x64-windows
116116
path: mpy-cross/mpy-cross.static.exe
@@ -149,12 +149,12 @@ jobs:
149149
env:
150150
GITHUB_CONTEXT: ${{ toJson(github) }}
151151
run: echo "$GITHUB_CONTEXT"
152-
- uses: actions/checkout@v2.2.0
152+
- uses: actions/checkout@v3
153153
with:
154154
submodules: false
155155
fetch-depth: 1
156156
- name: Set up Python 3
157-
uses: actions/setup-python@v2
157+
uses: actions/setup-python@v4
158158
with:
159159
python-version: "3.x"
160160
- name: Get CP deps
@@ -174,19 +174,19 @@ jobs:
174174
msgfmt --version
175175
- name: Build mpy-cross
176176
run: make -C mpy-cross -j2
177-
- uses: actions/upload-artifact@v2
177+
- uses: actions/upload-artifact@v3
178178
with:
179179
name: mpy-cross-macos-11-x64
180180
path: mpy-cross/mpy-cross
181181
- name: Build mpy-cross (arm64)
182182
run: make -C mpy-cross -j2 -f Makefile.m1 V=2
183-
- uses: actions/upload-artifact@v2
183+
- uses: actions/upload-artifact@v3
184184
with:
185185
name: mpy-cross-macos-11-arm64
186186
path: mpy-cross/mpy-cross-arm64
187187
- name: Make universal binary
188188
run: lipo -create -output mpy-cross-macos-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
189-
- uses: actions/upload-artifact@v2
189+
- uses: actions/upload-artifact@v3
190190
with:
191191
name: mpy-cross-macos-11-universal
192192
path: mpy-cross-macos-universal
@@ -207,7 +207,7 @@ jobs:
207207
needs: test
208208
if: ${{ needs.test.outputs.build-doc == 'True' }}
209209
steps:
210-
- uses: actions/checkout@v2.2.0
210+
- uses: actions/checkout@v3
211211
with:
212212
submodules: false
213213
fetch-depth: 1
@@ -218,7 +218,7 @@ jobs:
218218
tools/describe || git log --parents HEAD~4..
219219
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
220220
- name: Set up Python 3
221-
uses: actions/setup-python@v2
221+
uses: actions/setup-python@v4
222222
with:
223223
python-version: "3.x"
224224
- name: Install dependencies
@@ -229,20 +229,20 @@ jobs:
229229
pip install -r requirements-ci.txt -r requirements-doc.txt
230230
- name: Build and Validate Stubs
231231
run: make check-stubs -j2
232-
- uses: actions/upload-artifact@v2
232+
- uses: actions/upload-artifact@v3
233233
with:
234234
name: stubs
235235
path: circuitpython-stubs/dist/*
236236
- name: Test Documentation Build (HTML)
237237
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
238-
- uses: actions/upload-artifact@v2
238+
- uses: actions/upload-artifact@v3
239239
with:
240240
name: docs
241241
path: _build/html
242242
- name: Test Documentation Build (LaTeX/PDF)
243243
run: |
244244
make latexpdf
245-
- uses: actions/upload-artifact@v2
245+
- uses: actions/upload-artifact@v3
246246
with:
247247
name: docs
248248
path: _build/latex
@@ -276,10 +276,10 @@ jobs:
276276
if: ${{ needs.test.outputs.boards-arm != '[]' }}
277277
steps:
278278
- name: Set up Python 3
279-
uses: actions/setup-python@v2
279+
uses: actions/setup-python@v4
280280
with:
281281
python-version: "3.x"
282-
- uses: actions/checkout@v2.2.0
282+
- uses: actions/checkout@v3
283283
with:
284284
submodules: false
285285
fetch-depth: 1
@@ -306,7 +306,7 @@ jobs:
306306
working-directory: tools
307307
env:
308308
BOARDS: ${{ matrix.board }}
309-
- uses: actions/upload-artifact@v2
309+
- uses: actions/upload-artifact@v3
310310
with:
311311
name: ${{ matrix.board }}
312312
path: bin/${{ matrix.board }}
@@ -329,10 +329,10 @@ jobs:
329329
if: ${{ needs.test.outputs.boards-riscv != '[]' }}
330330
steps:
331331
- name: Set up Python 3
332-
uses: actions/setup-python@v2
332+
uses: actions/setup-python@v4
333333
with:
334334
python-version: "3.x"
335-
- uses: actions/checkout@v2.2.0
335+
- uses: actions/checkout@v3
336336
with:
337337
submodules: false
338338
fetch-depth: 1
@@ -358,7 +358,7 @@ jobs:
358358
working-directory: tools
359359
env:
360360
BOARDS: ${{ matrix.board }}
361-
- uses: actions/upload-artifact@v2
361+
- uses: actions/upload-artifact@v3
362362
with:
363363
name: ${{ matrix.board }}
364364
path: bin/${{ matrix.board }}
@@ -385,7 +385,7 @@ jobs:
385385
uses: actions/setup-python@v4
386386
with:
387387
python-version: "3.x"
388-
- uses: actions/checkout@v2.2.0
388+
- uses: actions/checkout@v3
389389
with:
390390
submodules: false
391391
fetch-depth: 1
@@ -395,7 +395,7 @@ jobs:
395395
run: |
396396
tools/describe || git log --parents HEAD~4..
397397
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
398-
- uses: actions/cache@v2
398+
- uses: actions/cache@v3
399399
name: Fetch IDF tool cache
400400
id: idf-cache
401401
with:
@@ -449,7 +449,7 @@ jobs:
449449
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
450450
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
451451
BOARDS: ${{ matrix.board }}
452-
- uses: actions/upload-artifact@v2
452+
- uses: actions/upload-artifact@v3
453453
with:
454454
name: ${{ matrix.board }}
455455
path: bin/${{ matrix.board }}
@@ -471,10 +471,10 @@ jobs:
471471
if: ${{ needs.test.outputs.boards-aarch != '[]' }}
472472
steps:
473473
- name: Set up Python 3
474-
uses: actions/setup-python@v2
474+
uses: actions/setup-python@v4
475475
with:
476476
python-version: "3.x"
477-
- uses: actions/checkout@v2.2.0
477+
- uses: actions/checkout@v3
478478
with:
479479
submodules: false
480480
fetch-depth: 1
@@ -514,7 +514,7 @@ jobs:
514514
working-directory: tools
515515
env:
516516
BOARDS: ${{ matrix.board }}
517-
- uses: actions/upload-artifact@v2
517+
- uses: actions/upload-artifact@v3
518518
with:
519519
name: ${{ matrix.board }}
520520
path: bin/${{ matrix.board }}

.github/workflows/create_website_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
env:
1717
GITHUB_CONTEXT: ${{ toJson(github) }}
1818
run: echo "$GITHUB_CONTEXT"
19-
- uses: actions/checkout@v2.2.0
19+
- uses: actions/checkout@v3
2020
with:
2121
submodules: false
2222
fetch-depth: 1
2323
- name: Set up Python 3
24-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v4
2525
with:
2626
python-version: "3.x"
2727
- name: Get CP deps

.github/workflows/ports_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
which python; python --version; python -c "import cascadetoml"
7272
which python3; python3 --version; python3 -c "import cascadetoml"
7373
74-
- uses: actions/checkout@v2.2.0
74+
- uses: actions/checkout@v3
7575
with:
7676
submodules: false
7777
fetch-depth: 1

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
pre-commit:
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- uses: actions/checkout@v2.2.0
19+
- uses: actions/checkout@v3
2020
- name: Set up Python 3
21-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v4
2222
with:
2323
python-version: "3.x"
2424
- name: Install deps
@@ -29,17 +29,17 @@ jobs:
2929
run: git submodule update --init extmod/ulab
3030
- name: Set PY
3131
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
32-
- uses: actions/cache@v2
32+
- uses: actions/cache@v3
3333
with:
3434
path: ~/.cache/pre-commit
3535
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
36-
- uses: pre-commit/action@v1.1.0
36+
- uses: pre-commit/action@v3.0.0
3737
- name: Make patch
3838
if: failure()
3939
run: git diff > ~/pre-commit.patch
4040
- name: Upload patch
4141
if: failure()
42-
uses: actions/upload-artifact@v2
42+
uses: actions/upload-artifact@v3
4343
with:
4444
name: patch
4545
path: ~/pre-commit.patch

extmod/vfs_fat.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -225,22 +225,7 @@ STATIC mp_obj_t fat_vfs_rename(mp_obj_t vfs_in, mp_obj_t path_in, mp_obj_t path_
225225
const char *old_path = mp_obj_str_get_str(path_in);
226226
const char *new_path = mp_obj_str_get_str(path_out);
227227

228-
// Check to see if we're moving a directory into itself. This occurs when we're moving a
229-
// directory where the old path is a prefix of the new and the next character is a "/" and thus
230-
// preserves the original directory name.
231-
FILINFO fno;
232-
FRESULT res = f_stat(&self->fatfs, old_path, &fno);
233-
if (res != FR_OK) {
234-
mp_raise_OSError_fresult(res);
235-
}
236-
if ((fno.fattrib & AM_DIR) != 0 &&
237-
strlen(new_path) > strlen(old_path) &&
238-
new_path[strlen(old_path)] == '/' &&
239-
strncmp(old_path, new_path, strlen(old_path)) == 0) {
240-
mp_raise_OSError(MP_EINVAL);
241-
}
242-
243-
res = f_rename(&self->fatfs, old_path, new_path);
228+
FRESULT res = f_rename(&self->fatfs, old_path, new_path);
244229
if (res == FR_EXIST) {
245230
// if new_path exists then try removing it (but only if it's a file)
246231
fat_vfs_remove_internal(vfs_in, path_out, 0); // 0 == file attribute

lib/oofatfs/ff.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4816,6 +4816,21 @@ FRESULT f_rename (
48164816
DEF_NAMBUF
48174817

48184818

4819+
// Check to see if we're moving a directory into itself. This occurs when we're moving a
4820+
// directory where the old path is a prefix of the new and the next character is a "/" and thus
4821+
// preserves the original directory name.
4822+
FILINFO fno;
4823+
res = f_stat(fs, path_old, &fno);
4824+
if (res != FR_OK) {
4825+
return res;
4826+
}
4827+
if ((fno.fattrib & AM_DIR) != 0 &&
4828+
strlen(path_new) > strlen(path_old) &&
4829+
path_new[strlen(path_old)] == '/' &&
4830+
strncmp(path_old, path_new, strlen(path_old)) == 0) {
4831+
return FR_INVALID_NAME;
4832+
}
4833+
48194834
res = find_volume(fs, FA_WRITE); /* Get logical drive of the old object */
48204835
if (res == FR_OK) {
48214836
djo.obj.fs = fs;

locale/ID.po

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ msgstr "output:\n"
6565
msgid "%%c requires int or char"
6666
msgstr "%%c harus int atau char"
6767

68+
#: main.c
69+
#, c-format
70+
msgid "%02X"
71+
msgstr ""
72+
6873
#: shared-bindings/rgbmatrix/RGBMatrix.c
6974
#, c-format
7075
msgid ""
@@ -2106,6 +2111,10 @@ msgstr ""
21062111
msgid "UART write"
21072112
msgstr ""
21082113

2114+
#: main.c
2115+
msgid "UID:"
2116+
msgstr ""
2117+
21092118
#: shared-module/usb_hid/Device.c
21102119
msgid "USB busy"
21112120
msgstr ""

locale/circuitpython.pot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ msgstr ""
117117
msgid "%q init failed"
118118
msgstr ""
119119

120+
#: shared-bindings/dualbank/__init__.c
121+
msgid "%q is %q"
122+
msgstr ""
123+
120124
#: py/argcheck.c
121125
msgid "%q length must be %d"
122126
msgstr ""
@@ -211,7 +215,7 @@ msgstr ""
211215
msgid "%q, %q, and %q must all be the same length"
212216
msgstr ""
213217

214-
#: py/objint.c
218+
#: py/objint.c shared-bindings/storage/__init__.c
215219
msgid "%q=%q"
216220
msgstr ""
217221

locale/cs.po

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ msgstr " výstup:\n"
6767
msgid "%%c requires int or char"
6868
msgstr "%%c vyžaduje int nebo char"
6969

70+
#: main.c
71+
#, c-format
72+
msgid "%02X"
73+
msgstr ""
74+
7075
#: shared-bindings/rgbmatrix/RGBMatrix.c
7176
#, c-format
7277
msgid ""
@@ -2095,6 +2100,10 @@ msgstr ""
20952100
msgid "UART write"
20962101
msgstr ""
20972102

2103+
#: main.c
2104+
msgid "UID:"
2105+
msgstr ""
2106+
20982107
#: shared-module/usb_hid/Device.c
20992108
msgid "USB busy"
21002109
msgstr ""

0 commit comments

Comments
 (0)