Closed petrosschilling closed 2 months ago
This is by design. We don't support out of service versions of python. If you can update please update your python. Python 3.6 has been out of support for 2 years, and python 3.7 is out of support for about 9 months. Python 3.8 will be out of service in October. see https://devguide.python.org/versions/#versions
Hey @karthiknadig thanks for the reply. I know 3.6 has been out of support for a while.
I can't upgrade to a newer version for the current project I'm working on unfortunately.
What I don't understand is why drop the support for python 3.6? Shouldn't I be able to just use and older version of Flake8 that works with the current Python version I'm using?
Maybe dropping the support is a requirement for reasons I don't understand. But it just feels wrong as some projects can't be upgraded that easily to a newer python version.
According to the link you mentioned: " end-of-life: release cycle is frozen; no further changes can be pushed to it. " As the quote says, no further changes can be pushed to it. Not "Drop support for tools that should be working with that current python version"
Looks like the check for version is there for no reason whatsoever than to force people to upgrade. because if I change the export const PYTHON_MINOR = 8;
to export const PYTHON_MINOR = 6;
it works just fine.
If is not to force the developer to upgrade, what is this version check here for?
export function checkVersion(resolved: ResolvedEnvironment | undefined): boolean {
const version = resolved?.version;
if (version?.major === PYTHON_MAJOR && version?.minor >= PYTHON_MINOR) {
return true;
}
traceError(`Python version ${version?.major}.${version?.minor} is not supported.`);
traceError(`Selected python path: ${resolved?.executable.uri?.fsPath}`);
traceError(`Supported versions are ${PYTHON_VERSION} and above.`);
return false;
}
I hope you can clarify these questions.. I'm sure the maintainers team have their reasons to have added a check for the python version.
This extension depends on packages that dropped support of Python 3.6, this happened when they migrated to support Python 3.11 and 3.12. See for example this package we depend on: https://pypi.org/project/cattrs
You have two options:
”flake8.path”: ["<path-to-flake8-bin>”]
(. this would be your flake8 installed in Python 3.6 env), and you can point ”flake8.interpreter": ["<python-3.8-path>”]
. This way the extension will use newer Python, but will still pose older flake8.I see, thanks for the clarification.
Managed to get this working by downgrading the extension.
I will close this issue then.
Thanks again.
Diagnostic Data
Behaviour
Expected Behavior
I have the extension installed in the vscode I have flake8 installed in my virtual environment I have the python interpreter set to my virtual environment.
when I start the flake8 server It should not fail due to python version.
Actual Behavior
when I start the flake8 server It fails due to python version.
Reproduction Steps:
Install pyenv install python 3.6.15 using pyenv set global version to 3.6.15 create new project create virtual environment using python 3.6.15 install flake8 (any version supported by python 3.6.15) See server require python 3.8
Logs:
Steps to set log level to trace and view:
Outcome When Attempting Debugging Steps:
Did running it from the command line work? Yes
Extra Details
settings.json: