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

from pkg_resources to importlib_resources #3748

Closed
wants to merge 6 commits into from
Closed

from pkg_resources to importlib_resources #3748

wants to merge 6 commits into from

Conversation

fondbcn
Copy link
Contributor

@fondbcn fondbcn commented Jan 23, 2024

Pull Request Checklist

  • I’ve read the guidelines for contributing.
  • I updated AUTHORS.txt and CHANGES.txt (if the change is non-trivial) and documentation (if applicable).
  • I tested my changes.

Description

Trying to replace the old pkg_resources with importlib_resources

@felixfontein
Copy link
Contributor

@fondbcn please check out your PR's changes. You added a LOT of files to this PR that don't belong here. Please rebase your PR to remove these files.

Copy link
Member

@Kwpolska Kwpolska left a comment

Choose a reason for hiding this comment

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

Please remove the demo site and Pipfile stuff.

nikola/nikola.py Outdated
@@ -1031,7 +1031,7 @@ def init_plugins(self, commands_only=False, load_all=False):
extra_plugins_dirs = self.config['EXTRA_PLUGINS_DIRS']
self._loading_commands_only = commands_only
self._plugin_places = [
resource_filename('nikola', 'plugins'),
importlib_resources('nikola') / 'plugins',
Copy link
Member

Choose a reason for hiding this comment

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

  1. You can’t call a module like that, this code couldn’t have worked.
  2. We want to use the standard library importlib.resources.

@fondbcn
Copy link
Contributor Author

fondbcn commented Jan 24, 2024

Sorry for that,
pytest (success):
...
TOTAL 10648 3692 65%
==...=== 507 passed, 16 skipped, 5 xfailed, 1 warning in 199.56s (0:03:19) ===...==

@fondbcn fondbcn closed this Jan 24, 2024
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