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

[UPD] Ran copier template update to fix workflow crash #140

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

ozoromo
Copy link

@ozoromo ozoromo commented Dec 28, 2023

The current github workflow crashes with this error:

Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/bin/flake8", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/main/cli.py", line 22, in main
    app.run(argv)
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 350, in _run
    self.initialize(argv)
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 330, in initialize
    self.find_plugins(config_finder)
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/main/application.py", line 153, in find_plugins
    self.check_plugins = plugin_manager.Checkers(local_plugins.extension)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 356, in __init__
    self.manager = PluginManager(
                   ^^^^^^^^^^^^^^
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 238, in __init__
    self._load_entrypoint_plugins()
  File "/home/runner/.cache/pre-commit/repo_hocecq5/py_env-python3/lib/python3.12/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins
    eps = importlib_metadata.entry_points().get(self.namespace, ())
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'EntryPoints' object has no attribute 'get'

It seems this is due to importlib_metadata version 5.0 implementing a breaking change, so the solution is to pin its version to < 5.0

@pedrobaeza
Copy link
Member

Instead of this, you should update the copier template.

@ozoromo ozoromo force-pushed the issue-flake8-crash branch from bf97d5f to 108cfc2 Compare January 20, 2024 19:26
@ozoromo ozoromo changed the title [UPD] Pinned importlib_metadata to <5.0 to fix workflow crash [UPD] Ran copier template update to fix workflow crash Jan 20, 2024
@ozoromo
Copy link
Author

ozoromo commented Jan 20, 2024

Instead of this, you should update the copier template.

Did that now, thanks for the tip!

@jans23
Copy link

jans23 commented Jan 30, 2024

@pedrobaeza Could this be merged, please?

@pedrobaeza pedrobaeza added this to the 15.0 milestone Jan 30, 2024
@pedrobaeza pedrobaeza merged commit 0e768bd into OCA:15.0 Jan 30, 2024
7 checks passed
@ozoromo ozoromo deleted the issue-flake8-crash branch February 27, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants