Skip to content

semver package breaking change: isvalid() -> is_valid() #193

@aricooperdavis

Description

@aricooperdavis

Hi circup developers!

When the python-semver dependency updated to version 3.x.x this included the breaking change of renaming the isvalid() method to is_valid().

This breaks __init__.py line 1517 which refers to the old method.

I'll submit a PR with the fix and reference this issue.

Many thanks for your hard work!
Ari


  • Platform/operating system (i.e. Raspberry Pi with Raspbian operating system,
    Windows 32-bit, Windows 64-bit, Mac OSX 64-bit, etc.):

Fedora 39

  • Python version (run python -version or python3 -version):

Python 3.12.0

  • Error message you are receiving, including any Python exception traces:
Traceback (most recent call last):
  File "/home/ari/.local/bin/circup", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ari/.local/lib/python3.12/site-packages/circup/__init__.py", line 1517, in update
    if isinstance(module.bundle_version, str) and not VersionInfo.isvalid(
                                                      ^^^^^^^^^^^^^^^^^^^
AttributeError: type object 'Version' has no attribute 'isvalid'. Did you mean: 'is_valid'?
  • List the steps to reproduce the problem below (if possible attach code or commands
    to run):
$ circup --path /run/media/ari/MERLYN_FS_1 update
Found device at /run/media/ari/MERLYN_FS_1, running CircuitPython 8.2.7.
A newer version of CircuitPython (8.2.8) is available.
Get it here: https://circuitpython.org/board/feather_bluefruit_sense
Found 15 module[s] needing update.
Please indicate which modules you wish to update:

Traceback (most recent call last): [...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions