Tox with Windows, WSL2, Visual Studio code and devcontainer

I’m developing my first integration and I’m stuck with tox.
I have Windows 2004 with WSL2, docker, git, Visual Studio Code and VSC extension Remote – Containers. I’ve used devcontainers to develop a pypi component.
I followed the procedure below to test tox with a clean clone so I’m sure that passes before starting with my own integration.
fork home-assistant/core in github
git clone https://github.com/ArdescoConsulting/core.git
cd core
git remote add upstream https://github.com/home-assistant/core.git
Open folder core in container in VS Code
In VS Code terminal:
script/setup
source venv/bin/activate
tox
I get a whole bunch of errors (see below) and I have no idea on how to solve them.
Some test do work e.g. mypy…Passed
I would really appreciate if someone could point me in the right direction so I continue my work on my first integration. I can’t do a PR if I can’t get this to work

(venv) root@f84cf6ce9349:/workspaces/core# tox
/workspaces/core/venv/lib/python3.8/site-packages/tox/config/__init__.py:613: UserWarning: conflicting basepython version (set 3.8, should be 3.7) for env 'py37';resolve conflict or set ignore_basepython_conflict
  warnings.warn(
/workspaces/core/venv/lib/python3.8/site-packages/tox/config/__init__.py:613: UserWarning: conflicting basepython version (set 3.8, should be 3.6) for env 'py36';resolve conflict or set ignore_basepython_conflict
  warnings.warn(
GLOB sdist-make: /workspaces/core/setup.py
py36 create: /workspaces/core/.tox/py36
py36 installdeps: -r/workspaces/core/requirements_test_all.txt, -c/workspaces/core/homeassistant/package_constraints.txt
py36 inst: /workspaces/core/.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
ERROR: invocation failed (exit code 1), logfile: /workspaces/core/.tox/py36/log/py36-2.log
========================================================= log start ==========================================================
Processing ./.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /workspaces/core/.tox/py36/bin/python /workspaces/core/.tox/py36/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-mt5_iaf5/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (44 lines):
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
      return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
      exec(code, run_globals)
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/__main__.py", line 26, in <module>
      sys.exit(_main())
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
      command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
      module = importlib.import_module(module_path)
    File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 783, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in <module>
      from pip._internal.cli.req_command import RequirementCommand, with_cleanup
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 16, in <module>
      from pip._internal.index.package_finder import PackageFinder
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 21, in <module>
      from pip._internal.index.collector import parse_links
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 14, in <module>
      from pip._vendor import html5lib, requests
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_vendor/requests/__init__.py", line 114, in <module>
      from . import utils
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
      from . import certs
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_vendor/requests/certs.py", line 15, in <module>
      from pip._vendor.certifi import where
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_vendor/certifi/__init__.py", line 1, in <module>
      from .core import contents, where
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/pip/_vendor/certifi/core.py", line 12, in <module>
      from importlib.resources import read_text
    File "/usr/local/lib/python3.8/importlib/resources.py", line 11, in <module>
      from typing import Iterable, Iterator, Optional, Set, Union   # noqa: F401
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/typing.py", line 1357, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "/workspaces/core/.tox/py36/lib/python3.8/site-packages/typing.py", line 1005, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /workspaces/core/.tox/py36/bin/python /workspaces/core/.tox/py36/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-mt5_iaf5/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

========================================================== log end ===========================================================
py37 create: /workspaces/core/.tox/py37
py37 installdeps: -r/workspaces/core/requirements_test_all.txt, -c/workspaces/core/homeassistant/package_constraints.txt
py37 inst: /workspaces/core/.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
ERROR: invocation failed (exit code 1), logfile: /workspaces/core/.tox/py37/log/py37-2.log
========================================================= log start ==========================================================
Processing ./.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /workspaces/core/.tox/py37/bin/python /workspaces/core/.tox/py37/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bm6_uae9/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (44 lines):
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
      return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
      exec(code, run_globals)
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/__main__.py", line 26, in <module>
      sys.exit(_main())
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
      command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
      module = importlib.import_module(module_path)
    File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 783, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in <module>
      from pip._internal.cli.req_command import RequirementCommand, with_cleanup
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 16, in <module>
      from pip._internal.index.package_finder import PackageFinder
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 21, in <module>
      from pip._internal.index.collector import parse_links
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 14, in <module>
      from pip._vendor import html5lib, requests
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_vendor/requests/__init__.py", line 114, in <module>
      from . import utils
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
      from . import certs
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_vendor/requests/certs.py", line 15, in <module>
      from pip._vendor.certifi import where
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_vendor/certifi/__init__.py", line 1, in <module>
      from .core import contents, where
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/pip/_vendor/certifi/core.py", line 12, in <module>
      from importlib.resources import read_text
    File "/usr/local/lib/python3.8/importlib/resources.py", line 11, in <module>
      from typing import Iterable, Iterator, Optional, Set, Union   # noqa: F401
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/typing.py", line 1357, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "/workspaces/core/.tox/py37/lib/python3.8/site-packages/typing.py", line 1005, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /workspaces/core/.tox/py37/bin/python /workspaces/core/.tox/py37/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bm6_uae9/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

========================================================== log end ===========================================================
py38 create: /workspaces/core/.tox/py38
py38 installdeps: -r/workspaces/core/requirements_test_all.txt, -c/workspaces/core/homeassistant/package_constraints.txt
py38 inst: /workspaces/core/.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
ERROR: invocation failed (exit code 1), logfile: /workspaces/core/.tox/py38/log/py38-2.log
========================================================= log start ==========================================================
Processing ./.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /workspaces/core/.tox/py38/bin/python /workspaces/core/.tox/py38/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-2kmi5yf_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (44 lines):
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
      return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
      exec(code, run_globals)
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/__main__.py", line 26, in <module>
      sys.exit(_main())
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
      command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
      module = importlib.import_module(module_path)
    File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 783, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in <module>
      from pip._internal.cli.req_command import RequirementCommand, with_cleanup
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 16, in <module>
      from pip._internal.index.package_finder import PackageFinder
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 21, in <module>
      from pip._internal.index.collector import parse_links
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 14, in <module>
      from pip._vendor import html5lib, requests
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_vendor/requests/__init__.py", line 114, in <module>
      from . import utils
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
      from . import certs
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_vendor/requests/certs.py", line 15, in <module>
      from pip._vendor.certifi import where
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_vendor/certifi/__init__.py", line 1, in <module>
      from .core import contents, where
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/pip/_vendor/certifi/core.py", line 12, in <module>
      from importlib.resources import read_text
    File "/usr/local/lib/python3.8/importlib/resources.py", line 11, in <module>
      from typing import Iterable, Iterator, Optional, Set, Union   # noqa: F401
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/typing.py", line 1357, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "/workspaces/core/.tox/py38/lib/python3.8/site-packages/typing.py", line 1005, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /workspaces/core/.tox/py38/bin/python /workspaces/core/.tox/py38/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-2kmi5yf_/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

========================================================== log end ===========================================================
lint create: /workspaces/core/.tox/lint
lint installdeps: -r/workspaces/core/requirements_test.txt, -c/workspaces/core/homeassistant/package_constraints.txt
lint inst: /workspaces/core/.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
lint installed: aiohttp==3.6.1,apipkg==1.5,appdirs==1.4.4,astral==1.10.1,astroid==2.3.3,async-timeout==3.0.1,asynctest==0.13.0,attrs==19.3.0,bandit==1.6.2,bcrypt==3.1.7,black==19.10b0,certifi==2020.6.20,cffi==1.14.0,cfgv==3.1.0,chardet==3.0.4,ciso8601==2.1.3,click==7.1.2,codecov==2.1.0,codespell==1.16.0,coverage==5.2,cryptography==2.9.2,distlib==0.3.1,execnet==1.7.1,filelock==3.0.12,flake8==3.8.3,flake8-docstrings==1.5.0,gitdb==4.0.5,GitPython==3.1.3,homeassistant @ file:///workspaces/core/.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip,identify==1.4.21,idna==2.10,isort==4.3.21,Jinja2==2.11.2,lazy-object-proxy==1.4.3,MarkupSafe==1.1.1,mccabe==0.6.1,mock-open==1.4.0,more-itertools==8.4.0,multidict==4.7.6,mypy==0.780,mypy-extensions==0.4.3,nodeenv==1.4.0,packaging==20.4,pathspec==0.8.0,pbr==5.4.5,pluggy==0.13.1,pre-commit==2.6.0,py==1.9.0,pycodestyle==2.6.0,pycparser==2.20,pydocstyle==5.0.2,pyflakes==2.2.0,PyJWT==1.7.1,pylint==2.4.4,pylint-strict-informational==0.1,pyparsing==2.4.7,pytest==5.4.3,pytest-aiohttp==0.3.0,pytest-cov==2.10.0,pytest-forked==1.2.0,pytest-sugar==0.9.3,pytest-test-groups==1.0.3,pytest-timeout==1.3.4,pytest-xdist==1.32.0,python-slugify==4.0.0,pytz==2020.1,pyupgrade==2.3.0,PyYAML==5.3.1,regex==2020.6.8,requests==2.24.0,requests-mock==1.8.0,responses==0.10.6,ruamel.yaml==0.15.100,six==1.15.0,smmap==3.0.4,snowballstemmer==2.0.0,stevedore==2.0.1,termcolor==1.1.0,text-unidecode==1.3,tokenize-rt==4.0.0,toml==0.10.1,typed-ast==1.4.1,typing-extensions==3.7.4.2,urllib3==1.25.9,virtualenv==20.0.26,voluptuous==0.11.7,voluptuous-serialize==2.4.0,wcwidth==0.2.5,wrapt==1.11.2,yamllint==1.23.0,yarl==1.4.2
lint run-test-pre: PYTHONHASHSEED='1703868118'
lint run-test: commands[0] | python -m script.gen_requirements_all validate
lint run-test: commands[1] | python -m script.hassfest --action validate
Validating json... done in 0.00s
Validating codeowners... done in 0.00s
Validating config_flow... done in 0.77s
Validating dependencies... done in 23.87s
Validating manifest... done in 0.03s
Validating services... done in 19.37s
Validating ssdp... done in 0.00s
Validating translations... done in 8.04s
Validating zeroconf... done in 0.00s
Validating coverage... done in 1.52s

Integrations: 939
Invalid integrations: 0

lint run-test: commands[2] | pre-commit run codespell --all-files
[INFO] Initializing environment for https://github.com/asottile/pyupgrade.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/codespell-project/codespell.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8.
[INFO] Initializing environment for https://gitlab.com/pycqa/flake8:flake8-docstrings==1.5.0,pydocstyle==5.0.2.
[INFO] Initializing environment for https://github.com/PyCQA/bandit.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-isort.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/adrienverge/yamllint.git.
[INFO] Initializing environment for https://github.com/prettier/prettier.
[INFO] Installing environment for https://github.com/codespell-project/codespell.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
codespell................................................................Passed
lint run-test: commands[3] | pre-commit run flake8 --all-files
[INFO] Installing environment for https://gitlab.com/pycqa/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
flake8...................................................................Passed
lint run-test: commands[4] | pre-commit run bandit --all-files
[INFO] Installing environment for https://github.com/PyCQA/bandit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
bandit...................................................................Passed
pylint create: /workspaces/core/.tox/pylint
pylint installdeps: -r/workspaces/core/requirements_all.txt, -r/workspaces/core/requirements_test.txt, -c/workspaces/core/homeassistant/package_constraints.txt
pylint inst: /workspaces/core/.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
ERROR: invocation failed (exit code 1), logfile: /workspaces/core/.tox/pylint/log/pylint-2.log
=================================================================================== log start ====================================================================================
Processing ./.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /workspaces/core/.tox/pylint/bin/python /workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-u50ghyx8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (44 lines):
  Traceback (most recent call last):
    File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
      return _run_code(code, main_globals, None,
    File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
      exec(code, run_globals)
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/__main__.py", line 26, in <module>
      sys.exit(_main())
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 73, in main
      command = create_command(cmd_name, isolated=("--isolated" in cmd_args))
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_internal/commands/__init__.py", line 104, in create_command
      module = importlib.import_module(module_path)
    File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 783, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 24, in <module>
      from pip._internal.cli.req_command import RequirementCommand, with_cleanup
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 16, in <module>
      from pip._internal.index.package_finder import PackageFinder
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 21, in <module>
      from pip._internal.index.collector import parse_links
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_internal/index/collector.py", line 14, in <module>
      from pip._vendor import html5lib, requests
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_vendor/requests/__init__.py", line 114, in <module>
      from . import utils
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_vendor/requests/utils.py", line 25, in <module>
      from . import certs
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_vendor/requests/certs.py", line 15, in <module>
      from pip._vendor.certifi import where
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_vendor/certifi/__init__.py", line 1, in <module>
      from .core import contents, where
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip/_vendor/certifi/core.py", line 12, in <module>
      from importlib.resources import read_text
    File "/usr/local/lib/python3.8/importlib/resources.py", line 11, in <module>
      from typing import Iterable, Iterator, Optional, Set, Union   # noqa: F401
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/typing.py", line 1357, in <module>
      class Callable(extra=collections_abc.Callable, metaclass=CallableMeta):
    File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/typing.py", line 1005, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /workspaces/core/.tox/pylint/bin/python /workspaces/core/.tox/pylint/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-u50ghyx8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

==================================================================================== log end =====================================================================================

The tox.ini files contains

[tox]
envlist = py36, py37, py38, lint, pylint, typing, cov
...
[testenv]
basepython = {env:PYTHON3_PATH:python3}
...

python3.6 is no longer supported by Home Assistant and there are some components only available for python>=3.6 so that environment can be removed to make a full tox run shorter

basepython is automatically set for py36, py37 in the envlist
documentation:

pyNM : configures basepython = pythonN.M

basepython = {env:PYTHON3_PATH:python3}
PYTHON3_PATH is not available in de .devcontainer enviroment. Maybay in some other environment it is set for a purpose?
So it uses the fallback option pyhton3. Depending on the system, this can be python3.6, python3.7, python3.8,… which does not always correspond to the python version in the envlist.
hence errors

/workspaces/core/venv/lib/python3.8/site-packages/tox/config/__init__.py:613: UserWarning: conflicting basepython version (set 3.8, should be 3.7) for env 'py37';resolve conflict or set ignore_basepython_conflict
  warnings.warn(
/workspaces/core/venv/lib/python3.8/site-packages/tox/config/__init__.py:613: UserWarning: conflicting basepython version (set 3.8, should be 3.6) for env 'py36';resolve conflict or set ignore_basepython_conflict
  warnings.warn(

I removed basepython

The the updated tox.in looks like

[tox]
envlist = py37, py38, lint, pylint, typing, cov
...
[testenv]
...

The use of the pypi typing library causes problems setting up home assistant in tox

pylint inst: /workspaces/core/.tox/.tmp/package/1/homeassistant-0.113.0.dev0.zip

File "/workspaces/core/.tox/pylint/lib/python3.8/site-packages/typing.py", line 1005, in __new__
      self._abc_registry = extra._abc_registry
  AttributeError: type object 'Callable' has no attribute '_abc_registry'

The requirements causing problems

pipdeptree -r -p typing  

typing==3.7.4.1
  - foobot-async==0.3.1 [requires: typing>=3,<4]
  - pyHS100==0.3.5 [requires: typing]

In Python 3.5 and later, the typing module lives in the stdlib so is not required from pypi any more

As I’m typing this, @balloob is upgrading the above requirements to pypi typing free dependencies


foobot-async==0.3.2
install pyHS100==0.3.5.1

The PR below is to avoid pypi typing in the future