Is this package incompatibility a bug in the requierements?

63 Views Asked by At

After creating a clean environment with mamba pinning the python version and installing pylint, I get an apparent incompatibility between the pylint and python versions. Is this a bug in the package requierements?

In Linux, I have created a mamba environment with:

mamba create -n py_36_dev_generic python=3.6
mamba activate py_36_dev_generic
mamba install pylint pycodestyle pydocstyle

Then when I run pylint:

python -m pylint

I get the following error:

Traceback (most recent call last):
  File "/home/johndoe/mambaforge/envs/py_36_dev_generic/bin/pylint", line 10, in <module>
    sys.exit(run_pylint())
  File "/home/johndoe/mambaforge/envs/py_36_dev_generic/lib/python3.6/site-packages/pylint/__init__.py", line 21, in run_pylint
    from pylint.lint import Run as PylintRun
  File "/home/johndoe/mambaforge/envs/py_36_dev_generic/lib/python3.6/site-packages/pylint/lint/__init__.py", line 76, in <module>
    from pylint.lint.parallel import check_parallel
  File "/home/johndoe/mambaforge/envs/py_36_dev_generic/lib/python3.6/site-packages/pylint/lint/parallel.py", line 9, in <module>
    from pylint.lint.utils import _patch_sys_path
  File "/home/johndoe/mambaforge/envs/py_36_dev_generic/lib/python3.6/site-packages/pylint/lint/utils.py", line 10, in <module>
    from pylint.config import PYLINT_HOME
  File "/home/johndoe/mambaforge/envs/py_36_dev_generic/lib/python3.6/site-packages/pylint/config/__init__.py", line 43, in <module>
    import platformdirs
  File "/home/johndoe/mambaforge/envs/py_36_dev_generic/lib/python3.6/site-packages/platformdirs/__init__.py", line 5
    from __future__ import annotations
    ^
SyntaxError: future feature annotations is not defined

Other SA similar questions seem to point to the fact that python 3.6 is not compatible with __future__. However this incompatibility does not seem to be reflected in the conda-forge package requirements:

  • According to mamba list | grep pylint, the installed version of pylint 2.11.1
  • According to mamba info pylint=2.11.1, pylint depends on platformdirs >=2.2.0
  • According to mamba list | grep platformdirs , the installed version of platformdirs is2.5.1
  • According to mamba info platformdirs=2.5.1 | grep python, the requiered python is python >=3.6

Does this mean this is a bug in the conda-forge's platformdirs package requirements?

Is there any easy workaround or fix inside mamba (without needing to manually install a package from git or switching to pip)?

0

There are 0 best solutions below