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

Remove importlib deprecated methods #4437

Merged
merged 1 commit into from Feb 27, 2023
Merged

Conversation

alanmcruickshank
Copy link
Member

Jinja tests have been throwing three warnings:

  • <frozen importlib._bootstrap_external>:629: DeprecationWarning: find_module() is deprecated and slated for removal in Python 3.12; use find_spec() instead
  • <frozen importlib._bootstrap_external>:1591: DeprecationWarning: FileFinder.find_loader() is deprecated and slated for removal in Python 3.12; use find_spec() instead
  • <frozen importlib._bootstrap>:283: DeprecationWarning: the load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead

This follows the docs at https://docs.python.org/3/library/importlib.html#approximating-importlib-import-module (which weren't super helpful tbh - had to do some other fiddling), to get things to work without those methods.

Warnings are now gone 👍

@coveralls
Copy link

Pull Request Test Coverage Report for Build 4285245214

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 4276895084: 0.0%
Covered Lines: 17242
Relevant Lines: 17242

💛 - Coveralls

@codecov
Copy link

codecov bot commented Feb 27, 2023

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (a7c3bff) compared to base (fa498f2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #4437   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          206       206           
  Lines        15403     15408    +5     
=========================================
+ Hits         15403     15408    +5     
Impacted Files Coverage Δ
src/sqlfluff/core/templaters/jinja.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@WittierDinosaur WittierDinosaur left a comment

Choose a reason for hiding this comment

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

Doesn't look as clean, but 🤷 LGTM

@alanmcruickshank alanmcruickshank merged commit b600627 into main Feb 27, 2023
@alanmcruickshank alanmcruickshank deleted the ac/importlib_deprecation branch February 27, 2023 18:14
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