Skip to content

fix: address deprecation warnings#1

Merged
matt-loft merged 2 commits intoloft-masterfrom
fix/deprecation-warnings
Sep 14, 2023
Merged

fix: address deprecation warnings#1
matt-loft merged 2 commits intoloft-masterfrom
fix/deprecation-warnings

Conversation

@matt-loft
Copy link
Collaborator

The following warnings were output when running the tests:

venv/lib/python3.8/site-packages/nose/importer.py:12
  /home/matt.hanley/github/loft-orbital/python-vxi11/venv/lib/python3.8/site-packages/nose/importer.py:12: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    from imp import find_module, load_module, acquire_lock, release_lock

vxi11/vxi11.py:134
  /home/matt.hanley/github/loft-orbital/python-vxi11/vxi11/vxi11.py:134: DeprecationWarning: invalid escape sequence \d
    m = re.match('^(?P<prefix>(?P<type>TCPIP)\d*)(::(?P<arg1>[^\s:]+))'

vxi11/vxi11.py:135
  /home/matt.hanley/github/loft-orbital/python-vxi11/vxi11/vxi11.py:135: DeprecationWarning: invalid escape sequence \s
    '(::(?P<arg2>[^\s:]+(\[.+\])?))?(::(?P<suffix>INSTR))$',

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

This fixes them by updating the regex string and removing the dependency on nose in favor of simply assert

@matt-loft matt-loft self-assigned this Sep 14, 2023
Copy link

@superlevure superlevure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking care of this one!

@matt-loft matt-loft merged commit eabc4de into loft-master Sep 14, 2023
@lucas-bremond lucas-bremond deleted the fix/deprecation-warnings branch September 14, 2023 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants