Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing deprecated 'pkg_resources' with 'importlib.resources' #479

Merged
merged 1 commit into from Apr 17, 2024

Conversation

lpascal-ledger
Copy link
Contributor

@lpascal-ledger lpascal-ledger commented Apr 17, 2024

This was the cause of these annoying yellow warnings when running tests with Ragger or Speculos:

============================================================================ warnings summary =============================================================================
../../../.virtualenvs/ragger/lib/python3.10/site-packages/speculos/api/api.py:3
  /home/lpascal/.virtualenvs/ragger/lib/python3.10/site-packages/speculos/api/api.py:3: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

../../../.virtualenvs/ragger/lib/python3.10/site-packages/pkg_resources/__init__.py:2832
  /home/lpascal/.virtualenvs/ragger/lib/python3.10/site-packages/pkg_resources/__init__.py:2832: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('google')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=============================================================== 1 passed, 6 deselected, 2 warnings in 2.97s ===============================================================

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 80.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 52.12%. Comparing base (a5db170) to head (826f066).

Files Patch % Lines
speculos/main.py 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #479      +/-   ##
==========================================
- Coverage   52.12%   52.12%   -0.01%     
==========================================
  Files         120      120              
  Lines       12028    12026       -2     
  Branches      964      964              
==========================================
- Hits         6270     6268       -2     
  Misses       5423     5423              
  Partials      335      335              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lpascal-ledger lpascal-ledger merged commit 5139c2b into master Apr 17, 2024
29 checks passed
@lpascal-ledger lpascal-ledger deleted the fix/deprecated_dpkg_resources branch April 17, 2024 15:49
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.

None yet

3 participants