From 900ce03b5645c7dcf4cc52baeaa32df146f6ad84 Mon Sep 17 00:00:00 2001 From: Teo Zosa Date: Mon, 11 Oct 2021 12:58:40 -0700 Subject: [PATCH] :cookie: :green_heart: Fix `flakehell` error: `flake8` `4.0.0` compatibility issues 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 https://github.com/pypa/pip/issues/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 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 "", line 529, in _check_name_wrapper File "", line 1029, in load_module File "", line 854, in load_module File "", line 274, in _load_module_shim File "", line 711, in _load File "", line 680, in _load_unlocked File "", line 850, in exec_module File "", line 228, in _call_with_frames_removed File "/tmp/pip-req-build-7fx4ywsx/flakehell/__init__.py", line 5, in from ._cli import entrypoint, flake8_entrypoint File "/tmp/pip-req-build-7fx4ywsx/flakehell/_cli.py", line 9, in from .commands import COMMANDS File "/tmp/pip-req-build-7fx4ywsx/flakehell/commands/__init__.py", line 5, in from ._baseline import baseline_command File "/tmp/pip-req-build-7fx4ywsx/flakehell/commands/_baseline.py", line 6, in from .._patched import FlakeHellApplication File "/tmp/pip-req-build-7fx4ywsx/flakehell/_patched/__init__.py", line 2, in from ._app import FlakeHellApplication File "/tmp/pip-req-build-7fx4ywsx/flakehell/_patched/_app.py", line 10, in 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 --- .cruft.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cruft.json b/.cruft.json index 4dee76a408..7e3b7647ae 100644 --- a/.cruft.json +++ b/.cruft.json @@ -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": {