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
I am, unfortunately, working on a system that is stuck on 2.7 (specifically it's stuck on using jython, which is itself stuck on 2.7).
I wanted to get a code formatter for VSCode that could help, found this GitHub issue: microsoft/vscode-python#21991 and tried doing method 1 there, but I could not install 1.7.0 due to a dependency on pycodestyle 2.9.1, which doesn't support Python 2.7
While I'd like for this to result in some minimal work to make 1.7.0 use a 2.7 compliant version of pycodestyle, I'd expect it'd be simpler to declare 1.7.0 as not supporting 2.7 (which would make the solution where I'm using autopep8 extension for VSCode break, since the extension requires autopep8>=1.7.0 for the autopep8 version if using an external file)
Command Line
$ ./python -m pip install autopep8==1.7.0DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.Collecting autopep8==1.7.0 Downloading autopep8-1.7.0-py2.py3-none-any.whl (45 kB)Collecting toml Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)ERROR: Could not find a version that satisfies the requirement pycodestyle>=2.9.1 (from autopep8==1.7.0) (from versions: 1.8.0.dev0, 2.0.0a1, 2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.4.0, 2.5.0, 2.6.0a1, 2.6.0, 2.7.0, 2.8.0)ERROR: No matching distribution found for pycodestyle>=2.9.1 (from autopep8==1.7.0)
Your Environment
Python version: 2.7.18
autopep8 version: 1.7.0
Platform: windows 11
The text was updated successfully, but these errors were encountered:
I also tried hacking around the version requirement by editing the source of pycodestyle so it declared support for 2.7, but that broke because pycodestyle 2.9.1 uses f-string syntax which is unavailable when built for 2.7.
On the other hand, autopep8 1.7.0 using pycodestyle 2.8.0 succesfully parses, but fails at runtime due to a unicode-string error (so it is very likely 1.7.0 shouldn't even declare support for python 2.7)
I also had to change a line of code in the VSCode extension so it could read stderr and not stdout, because apparently autopep8 1.7.0 emits --version info to stderr instead of stdout for some reason.
I am, unfortunately, working on a system that is stuck on 2.7 (specifically it's stuck on using jython, which is itself stuck on 2.7).
I wanted to get a code formatter for VSCode that could help, found this GitHub issue: microsoft/vscode-python#21991 and tried doing method 1 there, but I could not install 1.7.0 due to a dependency on pycodestyle 2.9.1, which doesn't support Python 2.7
While I'd like for this to result in some minimal work to make 1.7.0 use a 2.7 compliant version of pycodestyle, I'd expect it'd be simpler to declare 1.7.0 as not supporting 2.7 (which would make the solution where I'm using autopep8 extension for VSCode break, since the extension requires autopep8>=1.7.0 for the autopep8 version if using an external file)
Command Line
Your Environment
The text was updated successfully, but these errors were encountered: