Skip to content

Commit 9c05ad8

Browse files
authored
Merge pull request #242 from dhalbert/drop-8.x-bundles
drop 8.x bundle support
2 parents 1ea6cd2 + b281067 commit 9c05ad8

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
run: echo "$GITHUB_CONTEXT"
1717
- name: Translate Repo Name For Build Tools filename_prefix
1818
id: repo-name
19-
run: echo ::set-output name=repo-name::circup
19+
run: echo "repo-name=circup" >> $GITHUB_OUTPUT
2020
- name: Set up Python 3.11
2121
uses: actions/setup-python@v1
2222
with:

circup/shared.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
DATA_DIR = appdirs.user_data_dir(appname="circup", appauthor="adafruit")
2222

2323
#: Module formats list (and the other form used in github files)
24-
PLATFORMS = {"py": "py", "8mpy": "8.x-mpy", "9mpy": "9.x-mpy"}
24+
PLATFORMS = {"py": "py", "9mpy": "9.x-mpy"}
2525

2626
#: Timeout for requests calls like get()
2727
REQUESTS_TIMEOUT = 30

tests/mock_device/boot_out.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Adafruit CircuitPython 8.1.0 on 2019-08-02; Adafruit CircuitPlayground Express with samd21g18
1+
Adafruit CircuitPython 9.0.0 on 2019-08-02; Adafruit CircuitPlayground Express with samd21g18
22
Board ID:this_is_a_board
33
UID:AAAABBBBCCCC

tests/test_circup.py

+18-6
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ def test_Bundle_lib_dir():
9494
"adafruit/adafruit-circuitpython-bundle-py/"
9595
"adafruit-circuitpython-bundle-py-TESTTAG/lib"
9696
)
97-
assert bundle.lib_dir("8mpy") == (
97+
assert bundle.lib_dir("9mpy") == (
9898
circup.shared.DATA_DIR + "/"
99-
"adafruit/adafruit-circuitpython-bundle-8mpy/"
100-
"adafruit-circuitpython-bundle-8.x-mpy-TESTTAG/lib"
99+
"adafruit/adafruit-circuitpython-bundle-9mpy/"
100+
"adafruit-circuitpython-bundle-9.x-mpy-TESTTAG/lib"
101101
)
102102

103103

@@ -378,6 +378,16 @@ def test_Module_mpy_mismatch():
378378
assert m2.outofdate is False
379379
assert m3.mpy_mismatch is True
380380
assert m3.outofdate is True
381+
with mock.patch(
382+
"circup.backends.DiskBackend.get_circuitpython_version",
383+
return_value=("9.0.0", ""),
384+
):
385+
assert m1.mpy_mismatch is False
386+
assert m1.outofdate is False
387+
assert m2.mpy_mismatch is True
388+
assert m2.outofdate is True
389+
assert m3.mpy_mismatch is True
390+
assert m3.outofdate is True
381391

382392

383393
def test_Module_major_update_bad_versions():
@@ -419,14 +429,16 @@ def test_Module_row():
419429
repo = "https://github.com/adafruit/SomeLibrary.git"
420430
with mock.patch("circup.os.path.isfile", return_value=True), mock.patch(
421431
"circup.backends.DiskBackend.get_circuitpython_version",
422-
return_value=("8.0.0", ""),
432+
return_value=("9.0.0", ""),
423433
), mock.patch("circup.logger.warning") as mock_logger:
424434
backend = DiskBackend("mock_device", mock_logger)
425435
m = Module(name, backend, repo, "1.2.3", None, False, bundle, (None, None))
426436
assert m.row == ("module", "1.2.3", "unknown", "Major Version")
427437
m = Module(name, backend, repo, "1.2.3", "1.3.4", False, bundle, (None, None))
428438
assert m.row == ("module", "1.2.3", "1.3.4", "Minor Version")
429-
m = Module(name, backend, repo, "1.2.3", "1.2.3", True, bundle, ("9.0.0", None))
439+
m = Module(
440+
name, backend, repo, "1.2.3", "1.2.3", True, bundle, ("8.0.0", "9.0.0")
441+
)
430442
assert m.row == ("module", "1.2.3", "1.2.3", "MPY Format")
431443

432444

@@ -806,7 +818,7 @@ def test_get_circuitpython_version():
806818
with mock.patch("circup.logger.warning") as mock_logger:
807819
backend = DiskBackend("tests/mock_device", mock_logger)
808820
assert backend.get_circuitpython_version() == (
809-
"8.1.0",
821+
"9.0.0",
810822
"this_is_a_board",
811823
)
812824

0 commit comments

Comments
 (0)