Skip to content

Commit

Permalink
🍪 💚 Fix flakehell error: flake8 4.0.0 compatibility issues
Browse files Browse the repository at this point in the history
see: flakehell/flakehell#19

Error log:
```
[INFO] Installing environment for https://github.com/flakehell/flakehell.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/bin/python', '-mpip', 'install', '.')
return code: 1
expected return code: 0
stdout:
    Processing /home/runner/.cache/pre-commit/repon2u8h4ar
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Installing backend dependencies: started
      Installing backend dependencies: finished with status 'done'
        Preparing wheel metadata: started
        Preparing wheel metadata: finished with status 'error'

stderr:
      DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
       pip 21.3 will remove support for this functionality. You can find discussion regarding this at pypa/pip#7555.
        ERROR: Command errored out with exit status 1:
         command: /home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/bin/python /home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp6kspbrcm
             cwd: /tmp/pip-req-build-7fx4ywsx
        Complete output (36 lines):
        Traceback (most recent call last):
          File "/home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
            main()
          File "/home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
          File "/home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 151, in prepare_metadata_for_build_wheel
            return hook(metadata_directory, config_settings)
          File "/tmp/pip-build-env-0s2_gtp1/overlay/lib/python3.9/site-packages/flit_core/buildapi.py", line 49, in prepare_metadata_for_build_wheel
            metadata = make_metadata(module, ini_info)
          File "/tmp/pip-build-env-0s2_gtp1/overlay/lib/python3.9/site-packages/flit_core/common.py", line 392, in make_metadata
            md_dict.update(get_info_from_module(module, ini_info.dynamic_metadata))
          File "/tmp/pip-build-env-0s2_gtp1/overlay/lib/python3.9/site-packages/flit_core/common.py", line 189, in get_info_from_module
            docstring, version = get_docstring_and_version_via_import(target)
          File "/tmp/pip-build-env-0s2_gtp1/overlay/lib/python3.9/site-packages/flit_core/common.py", line 165, in get_docstring_and_version_via_import
            m = sl.load_module()
          File "<frozen importlib._bootstrap_external>", line 529, in _check_name_wrapper
          File "<frozen importlib._bootstrap_external>", line 1029, in load_module
          File "<frozen importlib._bootstrap_external>", line 854, in load_module
          File "<frozen importlib._bootstrap>", line 274, in _load_module_shim
          File "<frozen importlib._bootstrap>", line 711, in _load
          File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
          File "<frozen importlib._bootstrap_external>", line 850, in exec_module
          File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
          File "/tmp/pip-req-build-7fx4ywsx/flakehell/__init__.py", line 5, in <module>
            from ._cli import entrypoint, flake8_entrypoint
          File "/tmp/pip-req-build-7fx4ywsx/flakehell/_cli.py", line 9, in <module>
            from .commands import COMMANDS
          File "/tmp/pip-req-build-7fx4ywsx/flakehell/commands/__init__.py", line 5, in <module>
            from ._baseline import baseline_command
          File "/tmp/pip-req-build-7fx4ywsx/flakehell/commands/_baseline.py", line 6, in <module>
            from .._patched import FlakeHellApplication
          File "/tmp/pip-req-build-7fx4ywsx/flakehell/_patched/__init__.py", line 2, in <module>
            from ._app import FlakeHellApplication
          File "/tmp/pip-req-build-7fx4ywsx/flakehell/_patched/_app.py", line 10, in <module>
            from flake8.options.config import MergedConfigParser, get_local_plugins
        ImportError: cannot import name 'MergedConfigParser' from 'flake8.options.config' (/tmp/pip-build-env-0s2_gtp1/normal/lib/python3.9/site-packages/flake8/options/config.py)
        ----------------------------------------
    WARNING: Discarding file:///home/runner/.cache/pre-commit/repon2u8h4ar. Command errored out with exit status 1: /home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/bin/python /home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp6kspbrcm Check the logs for full command output.
    ERROR: Command errored out with exit status 1: /home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/bin/python /home/runner/.cache/pre-commit/repon2u8h4ar/py_env-python3.9/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp6kspbrcm Check the logs for full command output.

Check the log at /home/runner/.cache/pre-commit/pre-commit.log
ERROR: InvocationError for command /home/runner/work/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd/.tox/precommit/bin/pre-commit run -vv --all-files --color always (exited with code 3)
___________________________________ summary ____________________________________
ERROR:   precommit: commands failed
```

Original-Commit: TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd@cf124b2
  • Loading branch information
TeoZosa authored and actions-user committed Oct 11, 2021
1 parent 49ca1df commit 900ce03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd",
"commit": "13195c3d726d236de1b82ece42955e74ca7b8711",
"commit": "cf124b23166a3314f1181e99d02166044f2c327b",
"checkout": "master",
"context": {
"cookiecutter": {
Expand Down

0 comments on commit 900ce03

Please sign in to comment.