Repository: tox-dev/tox

Issue:
[BUG] 3.8.0 broke something about specifying deps with -rfilename.txt
This is broken on the mypy project (https://github.com/python/mypy) right now.

An example failure is: https://ci.appveyor.com/project/gvanrossum/mypy/builds/23408864

Discussion:

Patch:
diff --git a/docs/changelog/1207.bugfix.rst b/docs/changelog/1207.bugfix.rst
new file mode 100644
index 00000000..4b2a9e8e
--- /dev/null
+++ b/docs/changelog/1207.bugfix.rst
@@ -0,0 +1,2 @@
+Isolated build environment dependency overrides were not taken in consideration (and such it inherited the deps
+from the testenv section) - by :user:`gaborbernat`
diff --git a/src/tox/config/__init__.py b/src/tox/config/__init__.py
index d894beba..5380814c 100644
--- a/src/tox/config/__init__.py
+++ b/src/tox/config/__init__.py
@@ -1130,14 +1130,13 @@ class ParseIni(object):
         config.isolated_build_env = reader.getstring("isolated_build_env", ".package")
         if config.isolated_build is True:
             name = config.isolated_build_env
-            if name not in config.envconfigs:
-                section_name = "testenv:{}".format(name)
-                if name not in self._cfg.sections:
-                    self._cfg.sections[section_name] = {}
-                self._cfg.sections[section_name]["description"] = "isolated packaging environment"
-                config.envconfigs[name] = self.make_envconfig(
-                    name, "{}{}".format(testenvprefix, name), reader._subs, config
-                )
+            section_name = "testenv:{}".format(name)
+            if section_name not in self._cfg.sections:
+                self._cfg.sections[section_name] = {}
+            self._cfg.sections[section_name]["description"] = "isolated packaging environment"
+            config.envconfigs[name] = self.make_envconfig(
+                name, "{}{}".format(testenvprefix, name), reader._subs, config
+            )
 
     def _list_section_factors(self, section):
         factors = set()


Test patch:
diff --git a/tests/unit/config/test_config.py b/tests/unit/config/test_config.py
index 22fd6e93..d717a7bb 100644
--- a/tests/unit/config/test_config.py
+++ b/tests/unit/config/test_config.py
@@ -2930,6 +2930,22 @@ def test_isolated_build_env_cannot_be_in_envlist(newconfig, capsys):
     assert not out
 
 
+def test_isolated_build_overrides(newconfig, capsys):
+    inisource = """
+            [tox]
+            isolated_build = True
+
+            [testenv]
+            deps = something crazy here
+
+            [testenv:.package]
+            deps =
+        """
+    config = newconfig([], inisource)
+    deps = config.envconfigs.get(".package").deps
+    assert deps == []
+
+
 def test_config_via_pyproject_legacy(initproj):
     initproj(
         "config_via_pyproject_legacy-0.5",