circup 2.4.0__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {circup-2.4.0/circup.egg-info → circup-3.0.0}/PKG-INFO +2 -2
- {circup-2.4.0 → circup-3.0.0}/circup/backends.py +6 -7
- {circup-2.4.0 → circup-3.0.0}/circup/bundle.py +1 -1
- {circup-2.4.0 → circup-3.0.0}/circup/command_utils.py +5 -5
- {circup-2.4.0 → circup-3.0.0}/circup/commands.py +14 -18
- {circup-2.4.0 → circup-3.0.0}/circup/lazy_metadata.py +2 -1
- {circup-2.4.0 → circup-3.0.0}/circup/shared.py +1 -1
- {circup-2.4.0 → circup-3.0.0}/circup/wwshell/commands.py +2 -2
- {circup-2.4.0 → circup-3.0.0/circup.egg-info}/PKG-INFO +2 -2
- {circup-2.4.0 → circup-3.0.0}/pyproject.toml +1 -1
- {circup-2.4.0 → circup-3.0.0}/tests/test_circup.py +3 -3
- {circup-2.4.0 → circup-3.0.0}/.github/ISSUE_TEMPLATE.md +0 -0
- {circup-2.4.0 → circup-3.0.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {circup-2.4.0 → circup-3.0.0}/.github/workflows/build.yml +0 -0
- {circup-2.4.0 → circup-3.0.0}/.github/workflows/release.yml +0 -0
- {circup-2.4.0 → circup-3.0.0}/.gitignore +0 -0
- {circup-2.4.0 → circup-3.0.0}/.isort.cfg +0 -0
- {circup-2.4.0 → circup-3.0.0}/.pre-commit-config.yaml +0 -0
- {circup-2.4.0 → circup-3.0.0}/.pylintrc +0 -0
- {circup-2.4.0 → circup-3.0.0}/CODE_OF_CONDUCT.rst +0 -0
- {circup-2.4.0 → circup-3.0.0}/CODE_OF_CONDUCT.rst.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/CONTRIBUTING.rst +0 -0
- {circup-2.4.0 → circup-3.0.0}/CONTRIBUTING.rst.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/LICENSE +0 -0
- {circup-2.4.0 → circup-3.0.0}/LICENSES/CC-BY-4.0.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/LICENSES/MIT.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/LICENSES/Unlicense.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/README.rst +0 -0
- {circup-2.4.0 → circup-3.0.0}/README.rst.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/__init__.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/config/bundle_config.json +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/config/bundle_config.json.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/logging.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/module.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/wwshell/README.rst +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/wwshell/README.rst.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup/wwshell/__init__.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup.egg-info/SOURCES.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup.egg-info/dependency_links.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup.egg-info/entry_points.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup.egg-info/requires.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/circup.egg-info/top_level.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/docs/_static/favicon.ico +0 -0
- {circup-2.4.0 → circup-3.0.0}/docs/_static/favicon.ico.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/docs/conf.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/docs/index.rst +0 -0
- {circup-2.4.0 → circup-3.0.0}/docs/index.rst.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/docs/logo.png +0 -0
- {circup-2.4.0 → circup-3.0.0}/docs/logo.png.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/optional_requirements.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/optional_requirements.txt.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/readthedocs.yml +0 -0
- {circup-2.4.0 → circup-3.0.0}/requirements.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/requirements.txt.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/setup.cfg +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/__init__.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/bad_module/__init__.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/bad_module/my_module.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/bad_python.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/bundle.json +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/bundle.json.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/device.json +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/device.json.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/dir_module/__init__.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/dir_module/my_module.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/import_styles.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/local_module.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/local_module_cp7.mpy +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/local_module_cp7.mpy.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device/apps/test_app/import_styles.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device/apps/test_app/import_styles_sub.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device/boot_out.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device/boot_out.txt.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device/import_styles.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device/import_styles_sub.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device/lib/adafruit_waveform/.gitkeep +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device_2/.gitignore +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device_2/boot_out.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device_2/boot_out.txt.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device_2/code.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device_2/import_styles_sub.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device_2/package/__init__.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mock_device_2/package/other.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mount_exists.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mount_exists.txt.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mount_missing.txt +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/mount_missing.txt.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/remote_module.py +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/test_bundle_config.json +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/test_bundle_config.json.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/test_bundle_config_local.json +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/test_bundle_config_local.json.license +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/test_module.mpy +0 -0
- {circup-2.4.0 → circup-3.0.0}/tests/test_module.mpy.license +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: circup
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: A tool to manage/update libraries on CircuitPython devices.
|
|
5
5
|
Author-email: Adafruit Industries <circuitpython@adafruit.com>
|
|
6
6
|
License: MIT License
|
|
@@ -42,7 +42,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
42
42
|
Classifier: Topic :: Education
|
|
43
43
|
Classifier: Topic :: Software Development :: Embedded Systems
|
|
44
44
|
Classifier: Topic :: System :: Software Distribution
|
|
45
|
-
Requires-Python: >=3.
|
|
45
|
+
Requires-Python: >=3.10
|
|
46
46
|
Description-Content-Type: text/x-rst
|
|
47
47
|
License-File: LICENSE
|
|
48
48
|
Requires-Dist: appdirs
|
|
@@ -139,7 +139,7 @@ class Backend:
|
|
|
139
139
|
if name in device_modules:
|
|
140
140
|
if not upgrade:
|
|
141
141
|
# skip already installed modules if no -upgrade flag
|
|
142
|
-
click.echo("'{}' is already installed."
|
|
142
|
+
click.echo(f"'{name}' is already installed.")
|
|
143
143
|
return
|
|
144
144
|
|
|
145
145
|
# uninstall the module before installing
|
|
@@ -207,9 +207,9 @@ class Backend:
|
|
|
207
207
|
self.install_module_mpy(bundle, metadata)
|
|
208
208
|
else:
|
|
209
209
|
self.copy_file(metadata["path"], "lib")
|
|
210
|
-
click.echo("Installed '{}'."
|
|
210
|
+
click.echo(f"Installed '{name}'.")
|
|
211
211
|
else:
|
|
212
|
-
click.echo("Unknown module named, '{}'."
|
|
212
|
+
click.echo(f"Unknown module named, '{name}'.")
|
|
213
213
|
|
|
214
214
|
# def libraries_from_imports(self, code_py, mod_names):
|
|
215
215
|
# """
|
|
@@ -305,7 +305,7 @@ class WebBackend(Backend):
|
|
|
305
305
|
socket.getaddrinfo(host, 80, proto=socket.IPPROTO_TCP)
|
|
306
306
|
except socket.gaierror as exc:
|
|
307
307
|
raise RuntimeError(
|
|
308
|
-
"Invalid host: {}."
|
|
308
|
+
f"Invalid host: {host}." + " You should remove the 'http://'"
|
|
309
309
|
if "http://" in host or "https://" in host
|
|
310
310
|
else "Could not find or connect to specified device"
|
|
311
311
|
) from exc
|
|
@@ -659,7 +659,7 @@ class WebBackend(Backend):
|
|
|
659
659
|
self.install_file_http(bundle_path)
|
|
660
660
|
|
|
661
661
|
else:
|
|
662
|
-
raise
|
|
662
|
+
raise OSError("Cannot find compiled version of module.")
|
|
663
663
|
|
|
664
664
|
# pylint: enable=too-many-locals,too-many-branches
|
|
665
665
|
def install_module_py(self, metadata, location=None):
|
|
@@ -862,7 +862,6 @@ class DiskBackend(Backend):
|
|
|
862
862
|
try:
|
|
863
863
|
with open(
|
|
864
864
|
os.path.join(self.device_location, "boot_out.txt"),
|
|
865
|
-
"r",
|
|
866
865
|
encoding="utf-8",
|
|
867
866
|
) as boot:
|
|
868
867
|
boot_out_contents = boot.read()
|
|
@@ -934,7 +933,7 @@ class DiskBackend(Backend):
|
|
|
934
933
|
# Copy file.
|
|
935
934
|
shutil.copyfile(bundle_path, target_path)
|
|
936
935
|
else:
|
|
937
|
-
raise
|
|
936
|
+
raise OSError("Cannot find compiled version of module.")
|
|
938
937
|
|
|
939
938
|
# pylint: enable=too-many-locals,too-many-branches
|
|
940
939
|
def install_module_py(self, metadata, location=None):
|
|
@@ -109,7 +109,7 @@ class Bundle: # pylint: disable=too-many-instance-attributes
|
|
|
109
109
|
"requirements.txt" if not toml_file else "pyproject.toml",
|
|
110
110
|
)
|
|
111
111
|
if os.path.isfile(found_file):
|
|
112
|
-
with open(found_file,
|
|
112
|
+
with open(found_file, encoding="utf-8") as read_this:
|
|
113
113
|
return read_this.read()
|
|
114
114
|
return None
|
|
115
115
|
|
|
@@ -329,7 +329,7 @@ def find_device():
|
|
|
329
329
|
old_mode = ctypes.windll.kernel32.SetErrorMode(1)
|
|
330
330
|
try:
|
|
331
331
|
for disk in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
|
|
332
|
-
path = "{}:\\"
|
|
332
|
+
path = f"{disk}:\\"
|
|
333
333
|
if os.path.exists(path) and get_volume_name(path) == "CIRCUITPY":
|
|
334
334
|
device_dir = path
|
|
335
335
|
# Report only the FIRST device found.
|
|
@@ -338,7 +338,7 @@ def find_device():
|
|
|
338
338
|
ctypes.windll.kernel32.SetErrorMode(old_mode)
|
|
339
339
|
else:
|
|
340
340
|
# No support for unknown operating systems.
|
|
341
|
-
raise NotImplementedError('OS "{}" not supported.'
|
|
341
|
+
raise NotImplementedError(f'OS "{os.name}" not supported.')
|
|
342
342
|
logger.info("Found device: %s", device_dir)
|
|
343
343
|
return device_dir
|
|
344
344
|
|
|
@@ -392,7 +392,7 @@ def find_modules(backend, bundles_list):
|
|
|
392
392
|
# If it's not possible to get the device and bundle metadata, bail out
|
|
393
393
|
# with a friendly message and indication of what's gone wrong.
|
|
394
394
|
logger.exception(ex)
|
|
395
|
-
click.echo("There was a problem: {}"
|
|
395
|
+
click.echo(f"There was a problem: {ex}")
|
|
396
396
|
sys.exit(1)
|
|
397
397
|
# pylint: enable=broad-except,too-many-locals
|
|
398
398
|
|
|
@@ -454,7 +454,7 @@ def get_bundle_examples(bundles_list, avoid_download=False):
|
|
|
454
454
|
path = bundle.examples_dir(source=True)
|
|
455
455
|
meta_saved = os.path.join(path, "../bundle_examples.json")
|
|
456
456
|
if os.path.exists(meta_saved):
|
|
457
|
-
with open(meta_saved,
|
|
457
|
+
with open(meta_saved, encoding="utf-8") as f:
|
|
458
458
|
bundle_examples = json.load(f)
|
|
459
459
|
all_the_examples.update(bundle_examples)
|
|
460
460
|
bundle_examples.clear()
|
|
@@ -929,7 +929,7 @@ def libraries_from_auto_file(backend, auto_file, mod_names):
|
|
|
929
929
|
# pass a local file with "./" or "../"
|
|
930
930
|
is_relative = auto_file.split(os.sep)[0] in [os.path.curdir, os.path.pardir]
|
|
931
931
|
if os.path.isabs(auto_file) or is_relative:
|
|
932
|
-
with open(auto_file,
|
|
932
|
+
with open(auto_file, encoding="UTF8") as fp:
|
|
933
933
|
auto_file_content = fp.read()
|
|
934
934
|
else:
|
|
935
935
|
auto_file_content = backend.get_file_content(auto_file)
|
|
@@ -196,7 +196,7 @@ def main( # pylint: disable=too-many-locals
|
|
|
196
196
|
verbose_handler.setLevel(logging.INFO)
|
|
197
197
|
verbose_handler.setFormatter(log_formatter)
|
|
198
198
|
logger.addHandler(verbose_handler)
|
|
199
|
-
click.echo("Logging to {}\n"
|
|
199
|
+
click.echo(f"Logging to {LOGFILE}\n")
|
|
200
200
|
else:
|
|
201
201
|
ctx.obj["verbose"] = False
|
|
202
202
|
|
|
@@ -253,7 +253,7 @@ def main( # pylint: disable=too-many-locals
|
|
|
253
253
|
url_download = f"https://circuitpython.org/board/{board_id}"
|
|
254
254
|
else:
|
|
255
255
|
url_download = "https://circuitpython.org/downloads"
|
|
256
|
-
click.secho("Get it here: {}"
|
|
256
|
+
click.secho(f"Get it here: {url_download}", fg="green")
|
|
257
257
|
except ValueError as ex:
|
|
258
258
|
logger.warning("CircuitPython has incorrect semver value.")
|
|
259
259
|
logger.warning(ex)
|
|
@@ -291,7 +291,7 @@ def freeze(ctx, requirement): # pragma: no cover
|
|
|
291
291
|
if modules:
|
|
292
292
|
output = []
|
|
293
293
|
for module in modules:
|
|
294
|
-
output.append("{}=={
|
|
294
|
+
output.append(f"{module.name}=={module.device_version}")
|
|
295
295
|
for module in output:
|
|
296
296
|
click.echo(module)
|
|
297
297
|
logger.info(module)
|
|
@@ -350,7 +350,7 @@ def list_cli(ctx): # pragma: no cover
|
|
|
350
350
|
for row in data:
|
|
351
351
|
for i, word in enumerate(row):
|
|
352
352
|
col_width[i] = max(len(word) + 2, col_width[i])
|
|
353
|
-
dashes = tuple(
|
|
353
|
+
dashes = tuple("-" * (width - 1) for width in col_width)
|
|
354
354
|
data.insert(1, dashes)
|
|
355
355
|
click.echo(
|
|
356
356
|
"The following modules are out of date or probably need an update.\n"
|
|
@@ -424,7 +424,7 @@ def install(
|
|
|
424
424
|
for module, metadata in available_modules.items():
|
|
425
425
|
mod_names[module.replace(".py", "").lower()] = metadata
|
|
426
426
|
if requirement:
|
|
427
|
-
with open(requirement,
|
|
427
|
+
with open(requirement, encoding="utf-8") as rfile:
|
|
428
428
|
requirements_txt = rfile.read()
|
|
429
429
|
requested_installs = libraries_from_requirements(requirements_txt)
|
|
430
430
|
elif auto or auto_file:
|
|
@@ -585,9 +585,7 @@ def show(ctx, match): # pragma: no cover
|
|
|
585
585
|
module_names = [m for m in module_names if match in m]
|
|
586
586
|
click.echo("\n".join(module_names))
|
|
587
587
|
|
|
588
|
-
click.echo(
|
|
589
|
-
"{} shown of {} packages.".format(len(module_names), len(available_modules))
|
|
590
|
-
)
|
|
588
|
+
click.echo(f"{len(module_names)} shown of {len(available_modules)} packages.")
|
|
591
589
|
|
|
592
590
|
|
|
593
591
|
@main.command()
|
|
@@ -611,9 +609,9 @@ def uninstall(ctx, module): # pragma: no cover
|
|
|
611
609
|
metadata = mod_names[name]
|
|
612
610
|
module_path = metadata["path"]
|
|
613
611
|
ctx.obj["backend"].uninstall(device_path, module_path)
|
|
614
|
-
click.echo("Uninstalled '{}'."
|
|
612
|
+
click.echo(f"Uninstalled '{name}'.")
|
|
615
613
|
else:
|
|
616
|
-
click.echo("Module '{}' not found on device."
|
|
614
|
+
click.echo(f"Module '{name}' not found on device.")
|
|
617
615
|
continue
|
|
618
616
|
|
|
619
617
|
|
|
@@ -653,7 +651,7 @@ def update(ctx, update_all): # pragma: no cover
|
|
|
653
651
|
|
|
654
652
|
# Process out of date modules
|
|
655
653
|
updated_modules = []
|
|
656
|
-
click.echo("Found {} module[s] needing update."
|
|
654
|
+
click.echo(f"Found {len(modules_to_update)} module[s] needing update.")
|
|
657
655
|
if not update_all:
|
|
658
656
|
click.echo("Please indicate which module[s] you wish to update:\n")
|
|
659
657
|
for module in modules_to_update:
|
|
@@ -692,22 +690,20 @@ def update(ctx, update_all): # pragma: no cover
|
|
|
692
690
|
update_flag = click.confirm("Do you want to update?")
|
|
693
691
|
elif module.major_update:
|
|
694
692
|
update_flag = click.confirm(
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
"changes. Do you want to update?".format(module.name)
|
|
698
|
-
)
|
|
693
|
+
"'{}' is a Major Version update and may contain breaking "
|
|
694
|
+
"changes. Do you want to update?".format(module.name)
|
|
699
695
|
)
|
|
700
696
|
else:
|
|
701
|
-
update_flag = click.confirm("Update '{}'?"
|
|
697
|
+
update_flag = click.confirm(f"Update '{module.name}'?")
|
|
702
698
|
if update_flag:
|
|
703
699
|
# pylint: disable=broad-except
|
|
704
700
|
try:
|
|
705
701
|
ctx.obj["backend"].update(module)
|
|
706
702
|
updated_modules.append(module.name)
|
|
707
|
-
click.echo("Updated {
|
|
703
|
+
click.echo(f"Updated {module.name}")
|
|
708
704
|
except Exception as ex:
|
|
709
705
|
logger.exception(ex)
|
|
710
|
-
click.echo("Something went wrong, {} (check the logs)"
|
|
706
|
+
click.echo(f"Something went wrong, {str(ex)} (check the logs)")
|
|
711
707
|
# pylint: enable=broad-except
|
|
712
708
|
|
|
713
709
|
if not updated_modules:
|
|
@@ -134,7 +134,7 @@ def extract_metadata(path, logger):
|
|
|
134
134
|
logger.info("%s", path)
|
|
135
135
|
if path.endswith(".py"):
|
|
136
136
|
result["mpy"] = False
|
|
137
|
-
with open(path,
|
|
137
|
+
with open(path, encoding="utf-8") as source_file:
|
|
138
138
|
content = source_file.read()
|
|
139
139
|
#: The regex used to extract ``__version__`` and ``__repo__`` assignments.
|
|
140
140
|
dunder_key_val = r"""(__\w+__)(?:\s*:\s*\w+)?\s*=\s*(?:['"]|\(\s)(.+)['"]"""
|
|
@@ -115,7 +115,7 @@ def main( # pylint: disable=too-many-locals
|
|
|
115
115
|
verbose_handler.setLevel(logging.INFO)
|
|
116
116
|
verbose_handler.setFormatter(log_formatter)
|
|
117
117
|
logger.addHandler(verbose_handler)
|
|
118
|
-
click.echo("Logging to {}\n"
|
|
118
|
+
click.echo(f"Logging to {LOGFILE}\n")
|
|
119
119
|
else:
|
|
120
120
|
ctx.obj["verbose"] = False
|
|
121
121
|
|
|
@@ -137,7 +137,7 @@ def main( # pylint: disable=too-many-locals
|
|
|
137
137
|
click.secho("Could not find a connected CircuitPython device.", fg="red")
|
|
138
138
|
sys.exit(1)
|
|
139
139
|
else:
|
|
140
|
-
click.echo("Found device at {}."
|
|
140
|
+
click.echo(f"Found device at {device_path}.")
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
@main.command("ls")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: circup
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: A tool to manage/update libraries on CircuitPython devices.
|
|
5
5
|
Author-email: Adafruit Industries <circuitpython@adafruit.com>
|
|
6
6
|
License: MIT License
|
|
@@ -42,7 +42,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
42
42
|
Classifier: Topic :: Education
|
|
43
43
|
Classifier: Topic :: Software Development :: Embedded Systems
|
|
44
44
|
Classifier: Topic :: System :: Software Distribution
|
|
45
|
-
Requires-Python: >=3.
|
|
45
|
+
Requires-Python: >=3.10
|
|
46
46
|
Description-Content-Type: text/x-rst
|
|
47
47
|
License-File: LICENSE
|
|
48
48
|
Requires-Dist: appdirs
|
|
@@ -680,7 +680,7 @@ def test_extract_metadata_python():
|
|
|
680
680
|
"builtins.open", mock.mock_open(read_data=code)
|
|
681
681
|
) as mock_open, mock.patch("circup.logger.warning") as mock_logger:
|
|
682
682
|
result = circup.extract_metadata(path, mock_logger)
|
|
683
|
-
mock_open.assert_called_once_with(path,
|
|
683
|
+
mock_open.assert_called_once_with(path, encoding="utf-8")
|
|
684
684
|
assert len(result) == 3
|
|
685
685
|
assert result["__version__"] == "1.1.4"
|
|
686
686
|
assert result["__repo__"] == "https://github.com/adafruit/SomeLibrary.git"
|
|
@@ -1209,7 +1209,7 @@ def test_show_match_py_command():
|
|
|
1209
1209
|
def test_imports_from_code():
|
|
1210
1210
|
"""Ensure that various styles of import all work"""
|
|
1211
1211
|
test_file = str(pathlib.Path(__file__).parent / "import_styles.py")
|
|
1212
|
-
with open(test_file,
|
|
1212
|
+
with open(test_file, encoding="utf8") as fp:
|
|
1213
1213
|
test_data = fp.read()
|
|
1214
1214
|
|
|
1215
1215
|
result = imports_from_code(test_data)
|
|
@@ -1256,7 +1256,7 @@ def test_get_all_imports():
|
|
|
1256
1256
|
backend = DiskBackend(tests_dir / "mock_device", mock_logger)
|
|
1257
1257
|
|
|
1258
1258
|
test_file = str(tests_dir / "import_styles.py")
|
|
1259
|
-
with open(test_file,
|
|
1259
|
+
with open(test_file, encoding="utf8") as fp:
|
|
1260
1260
|
test_data = fp.read()
|
|
1261
1261
|
|
|
1262
1262
|
result = get_all_imports(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|