IamTheFij / release-gitter

https://git.iamthefij.com/iamthefij/release-gitter
MIT License
1 stars 2 forks source link

release-gitter wheel fails to build when running on Python version 3.8 or earlier #1

Closed rocode closed 2 years ago

rocode commented 2 years ago

release-gitter wheel fails to build when running on Python version 3.8 or earlier.

Error Log:

          × Getting requirements to build wheel did not run successfully.
          │ exit code: 1
          ╰─> [22 lines of output]
              Traceback (most recent call last):
                File "/pc/clone/QS-gDmx1QpG9ZloEk2_gYA/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
                  main()
                File "/pc/clone/QS-gDmx1QpG9ZloEk2_gYA/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
                  json_out['return_val'] = hook(**hook_input['kwargs'])
                File "/pc/clone/QS-gDmx1QpG9ZloEk2_gYA/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 124, in get_requires_for_build_wheel
                  backend = _build_backend()
                File "/pc/clone/QS-gDmx1QpG9ZloEk2_gYA/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 89, in _build_backend
                  obj = import_module(mod_path)
                File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
                  return _bootstrap._gcd_import(name[level:], package, level)
                File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
                File "<frozen importlib._bootstrap>", line 991, in _find_and_load
                File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
                File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
                File "<frozen importlib._bootstrap_external>", line 848, in exec_module
                File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
                File "/tmp/pip-build-env-ihs83g49/overlay/lib/python3.8/site-packages/pseudo_builder.py", line 11, in <module>
                  import release_gitter as rg
                File "/tmp/pip-build-env-ihs83g49/overlay/lib/python3.8/site-packages/release_gitter.py", line 140, in <module>
                  ) -> dict[Any, Any]:
              TypeError: 'type' object is not subscriptable
              [end of output]

This issue appears to be because of this line in release_gitter.py.

REF: https://github.com/pre-commit-ci/issues/issues/132#issuecomment-1170598329

IamTheFij commented 2 years ago

Resolved in v1.1.1 via https://github.com/IamTheFij/release-gitter/commit/3f23ddd3cce8dce523fdf89e97b72b055b1954bb

rocode commented 2 years ago

Forward progress:

Error Log:

          × Preparing metadata (pyproject.toml) did not run successfully.
          │ exit code: 1
          ╰─> [11 lines of output]
              Prepare meta /tmp/pip-modern-metadata-30zfphkh None
              Traceback (most recent call last):
                File "/pc/clone/QS-gDmx1QpG9ZloEk2_gYA/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
                  main()
                File "/pc/clone/QS-gDmx1QpG9ZloEk2_gYA/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
                  json_out['return_val'] = hook(**hook_input['kwargs'])
                File "/pc/clone/QS-gDmx1QpG9ZloEk2_gYA/py_env-python3/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
                  return hook(metadata_directory, config_settings)
                File "/tmp/pip-build-env-edq6mpyj/overlay/lib/python3.8/site-packages/pseudo_builder.py", line 74, in prepare_metadata_for_build_wheel
                  version = metadata.version.removeprefix("v")
              AttributeError: 'str' object has no attribute 'removeprefix'
              [end of output]

Looks like "removeprefix" was added in 3.9 as well.

IamTheFij commented 2 years ago

Thanks! I got it in the main file but not in the pseudo builder. I'll push 1.1.2 soon.

IamTheFij commented 2 years ago

Pushed. Should be live soon.

IamTheFij commented 2 years ago

Update is live now. 👍