Closed rvodden closed 10 months ago
I've fixed the original linting issue (was a missing blank line). I'm seeing a few strange issues which appear to be caused by the ecosystem. Right now I'm bumping up against this issue:
https://github.com/psf/black/issues/3447
Which appears to be because there isn't a version of black which works with 3.10 and 3.11. I'm reading around the issue now.
The python 3,12 issue is because of the removal of distutils from the standard library, which has been deprecated since 3.10. I'll look at that when I've resolved the issue with black.
Great- that's resolved everything except the 3.12 build. Am looking at that now.
I have at least managed to replicate it locally:
[rvodden:~/Source/maaspower]└2 [maaspower] fix_linting(+3/-1)+* 2s ± pipenv install --python 3.12 --dev --skip-lock
The flag --skip-lock has been reintroduced (but is not recommended). Without the lock resolver it is difficult to manage multiple package indexes, and
hash checking is not provided. However it can help manage installs with current deficiencies in locking across platforms.
Creating a virtualenv for this project...
Pipfile: /home/rvodden/Source/maaspower/Pipfile
Using /home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/bin/python3 (3.12.0) to create virtualenv...
⠼ Creating virtual environment...created virtual environment CPython3.12.0.final.0-64 in 353ms
creator CPython3Posix(dest=/home/rvodden/.local/share/virtualenvs/maaspower-Z0oYyxSK, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, via=copy, app_data_dir=/home/rvodden/.local/share/virtualenv)
added seed packages: pip==23.3.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment!
Virtualenv location: /home/rvodden/.local/share/virtualenvs/maaspower-Z0oYyxSK
Installing dependencies from Pipfile...
[pipenv.exceptions.InstallError]: Obtaining file:///home/rvodden/Source/maaspower (from -r /tmp/pipenv-hflwope7-requirements/pipenv-uo28p775-reqs.txt (line 1))
[pipenv.exceptions.InstallError]: Installing build dependencies: started
[pipenv.exceptions.InstallError]: Installing build dependencies: finished with status 'done'
[pipenv.exceptions.InstallError]: Checking if build backend supports build_editable: started
[pipenv.exceptions.InstallError]: Checking if build backend supports build_editable: finished with status 'done'
[pipenv.exceptions.InstallError]: ERROR: Exception:
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
[pipenv.exceptions.InstallError]: status = run_func(*args)
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/cli/req_command.py", line 245, in wrapper
[pipenv.exceptions.InstallError]: return func(self, options, args)
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/commands/install.py", line 377, in run
[pipenv.exceptions.InstallError]: requirement_set = resolver.resolve(
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/resolver.py", line 76, in resolve
[pipenv.exceptions.InstallError]: collected = self.factory.collect_root_requirements(root_reqs)
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/factory.py", line 513, in collect_root_requirements
[pipenv.exceptions.InstallError]: reqs = list(
[pipenv.exceptions.InstallError]: ^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/factory.py", line 474, in _make_requirements_from_install_req
[pipenv.exceptions.InstallError]: cand = self._make_candidate_from_link(
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/factory.py", line 190, in _make_candidate_from_link
[pipenv.exceptions.InstallError]: self._editable_candidate_cache[link] = EditableCandidate(
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 322, in __init__
[pipenv.exceptions.InstallError]: super().__init__(
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 157, in __init__
[pipenv.exceptions.InstallError]: self.dist = self._prepare()
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 226, in _prepare
[pipenv.exceptions.InstallError]: dist = self._prepare_distribution()
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/resolution/resolvelib/candidates.py", line 332, in _prepare_distribution
[pipenv.exceptions.InstallError]: return self._factory.preparer.prepare_editable_requirement(self._ireq)
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/operations/prepare.py", line 696, in prepare_editable_requirement
[pipenv.exceptions.InstallError]: dist = _get_prepared_distribution(
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/operations/prepare.py", line 71, in _get_prepared_distribution
[pipenv.exceptions.InstallError]: abstract_dist.prepare_distribution_metadata(
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/distributions/sdist.py", line 52, in prepare_distribution_metadata
[pipenv.exceptions.InstallError]: self.req.isolated_editable_sanity_check()
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/req/req_install.py", line 544, in isolated_editable_sanity_check
[pipenv.exceptions.InstallError]: and not self.supports_pyproject_editable()
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_internal/req/req_install.py", line 247, in supports_pyproject_editable
[pipenv.exceptions.InstallError]: return "build_editable" in self.pep517_backend._supported_features()
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_vendor/pyproject_hooks/_impl.py", line 153, in _supported_features
[pipenv.exceptions.InstallError]: return self._call_hook('_supported_features', {})
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_vendor/pyproject_hooks/_impl.py", line 321, in _call_hook
[pipenv.exceptions.InstallError]: raise BackendUnavailable(data.get('traceback', ''))
[pipenv.exceptions.InstallError]: pipenv.patched.pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/envs/maaspower/lib/python3.12/site-packages/pipenv/patched/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
[pipenv.exceptions.InstallError]: obj = import_module(mod_path)
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "/home/rvodden/.pyenv/versions/3.12.0/lib/python3.12/importlib/__init__.py", line 90, in import_module
[pipenv.exceptions.InstallError]: return _bootstrap._gcd_import(name[level:], package, level)
[pipenv.exceptions.InstallError]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 1304, in _find_and_load_unlocked
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap_external>", line 994, in exec_module
[pipenv.exceptions.InstallError]: File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
[pipenv.exceptions.InstallError]: File "/tmp/pip-build-env-wdxmwq35/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 10, in <module>
[pipenv.exceptions.InstallError]: import distutils.core
[pipenv.exceptions.InstallError]: ModuleNotFoundError: No module named 'distutils'
ERROR: Couldn't install package: {}
OK something odd is going on with pipenv and Python 3.12. I've raised this with pipenv: https://github.com/pypa/setuptools/issues/3661 and temporarily removed 3.12 from the build matrix (our code works under 3.12, so I've not removed it from setup). I'll keep an eye on that bug and raise a new PR when its resolved.
@gilesknap over to you - comments, as always, more than welcome.
(as the 3.12 action is no longer running this will no longer succeed, so that check will always show as failed - you'll need to force merge it if you're happy
Thanks @rvodden. Since creating this project the 'skeleton' framework it is based on has moved on from pipenv which is a bit dead now. We just use pip these days.
So I'll take an action to get this project updated to the latest skeleton framework. I'm really embedded in another project right now so will get to this in a few weeks.
Great stuff. I've got some ideas about future enhancements , and I've got a few engineers I can potentially enlist for a bit of help. How would you like to discuss these? If you don't have an existing pattern, I suggest that I open a GitHub discussion and we can noodle around on that ahead of opening issues?
Sure. Let's use this https://github.com/gilesknap/maaspower/discussions/18
Codecov Report
86.11% <100.00%> (ø)
100.00% <100.00%> (ø)
56.41% <100.00%> (ø)
63.63% <100.00%> (+1.13%)
36.53% <100.00%> (ø)
87.20% <100.00%> (+0.15%)