You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(.venv) PS C:\GitHub\toga> pre-commit run
[INFO] Installing environment for https://github.com/asottile/pyupgrade.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('C:\\Users\\boden\\.cache\\pre-commit\\repo3thdqgvs\\py_env-python3.8\\Scripts\\python.EXE', '-mpip', 'install', '.')
return code: 1
stdout:
Processing c:\users\boden\.cache\pre-commit\repo3thdqgvs
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting tokenize-rt>=5.2.0 (from pyupgrade==3.17.0)
Using cached tokenize_rt-6.0.0-py2.py3-none-any.whl.metadata (4.1 kB)
INFO: pip is looking at multiple versions of pyupgrade to determine which version is compatible with other requirements. This could take a while.
stderr:
ERROR: Package 'pyupgrade' requires a different Python: 3.8.10 not in '>=3.9'
Check the log at C:\Users\boden\.cache\pre-commit\pre-commit.log
pre-commit runs successfully, without complaining about my python version
Environment
Windows 10 x64
Python version: Python 3.8.10 (also happens on 3.8.18)
Software versions:
Toga: master
Logs
(.venv) PS C:\GitHub\toga> pre-commit run
[INFO] Installing environment for https://github.com/asottile/pyupgrade.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('C:\\Users\\boden\\.cache\\pre-commit\\repo3thdqgvs\\py_env-python3.8\\Scripts\\python.EXE', '-mpip', 'install', '.')
return code: 1
stdout:
Processing c:\users\boden\.cache\pre-commit\repo3thdqgvs
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting tokenize-rt>=5.2.0 (from pyupgrade==3.17.0)
Using cached tokenize_rt-6.0.0-py2.py3-none-any.whl.metadata (4.1 kB)
INFO: pip is looking at multiple versions of pyupgrade to determine which version is compatible with other requirements. This could take a while.
stderr:
ERROR: Package 'pyupgrade' requires a different Python: 3.8.10 not in '>=3.9'
Check the log at C:\Users\boden\.cache\pre-commit\pre-commit.log
Additional context
Putting all this information together I'm understanding that Toga contributors are required to have python 3.9, however if I'm testing and working around python 3.8 limitations, am I expected to test in 3.8, and then test again in 3.9, running pre-commit, before contributing a solution??
The text was updated successfully, but these errors were encountered:
Thanks for the report, and apologies for the confusion around this.
Right now, Toga needs to be tested on Python 3.8; but that doesn't mean pre-commit needs to be run on Python 3.8. It looks like one of the recent releases of pre-commit has dropped Python 3.8 support; as a result, the pre-commit checks can't currently be run in a Python 3.8 environment
So - at least for the moment, the virtual environment where you perform your commits (or run pre-commit) needs to be Python 3.9 or later. However, you can use this Python3.9 environment to run tox -e py38, which will peform tests in the 3.8 environment.
That said - Toga's support for Python 3.8 support in Toga is not long for this world - we'll be dropping it before the end of October when 3.8 hits EOL.
I'll leave this ticket open as a guide for others; the "fix" is to finalise the deprecation of Python 3.8 in Toga.
Describe the bug
pre-commit is failing with the following error:
however toga documentation clearly states it should support 3.8?
https://github.com/beeware/toga#minimum-requirements
Expected behavior
pre-commit runs successfully, without complaining about my python version
Environment
master
Logs
Additional context
Putting all this information together I'm understanding that Toga contributors are required to have python 3.9, however if I'm testing and working around python 3.8 limitations, am I expected to test in 3.8, and then test again in 3.9, running pre-commit, before contributing a solution??
The text was updated successfully, but these errors were encountered: