Skip to content

Version inconsistency? python 3.8 vs 3.9? #2797

Closed
@th3w1zard1

Description

@th3w1zard1

Describe the bug

pre-commit is failing with the following error:

(.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

however toga documentation clearly states it should support 3.8?
image
https://github.com/beeware/toga#minimum-requirements

Expected behavior

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??

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions