Repository: facebookresearch/hydra

Issue:
Fix CI testing of Python 2.7 on Windows
https://circleci.com/docs/2.0/hello-world-windows/


Discussion:
work in progress in [windows-ci2](https://github.com/facebookresearch/hydra/tree/windows-ci2) branch.

This is blocked on nox not detecting installed python version on Windows in conda because the name is python and not python2 or python3.


Resolving patch:
diff --git a/hydra/_internal/config_loader.py b/hydra/_internal/config_loader.py
--- a/hydra/_internal/config_loader.py
+++ b/hydra/_internal/config_loader.py
@@ -72,6 +72,7 @@ def _find_config(self, filepath, including_config_dir):
             else:
                 config_file = os.path.join(path, filepath)
 
+            config_file = config_file.replace("\\", "/")
             if self._exists(is_pkg, config_file):
                 return prefix + config_file
         return None
@@ -190,7 +191,7 @@ def _load_config_impl(self, input_file, including_config_dir):
         loaded_cfg = None
         filename = self._find_config(input_file, including_config_dir)
         if filename is None:
-            self.all_config_checked.append((input_file, False))
+            self.all_config_checked.append((input_file.replace("\\", "/"), False))
         else:
             is_pkg = filename.startswith("pkg://")
             if is_pkg:
diff --git a/hydra/plugins/common/utils.py b/hydra/plugins/common/utils.py
--- a/hydra/plugins/common/utils.py
+++ b/hydra/plugins/common/utils.py
@@ -44,7 +44,7 @@ def save_config(cfg, filename):
 def get_overrides_dirname(lst, exclude_keys=[]):
     lst = [x for x in lst if x not in exclude_keys]
     lst.sort()
-    return re.sub(pattern="[=]", repl=":", string=",".join(lst))
+    return re.sub(pattern="[=]", repl="=", string=",".join(lst))
 
 
 def filter_overrides(overrides):


Test patch:
diff --git a/hydra/test_utils/test_utils.py b/hydra/test_utils/test_utils.py
--- a/hydra/test_utils/test_utils.py
+++ b/hydra/test_utils/test_utils.py
@@ -76,6 +76,8 @@ def __enter__(self):
             return self
 
         def __exit__(self, exc_type, exc_val, exc_tb):
+            # release log file handles
+            logging.shutdown()
             shutil.rmtree(self.temp_dir)
 
     def _(conf_dir, conf_filename=None, overrides=None, strict=False):
diff --git a/tests/test_demos.py b/tests/test_demos.py
--- a/tests/test_demos.py
+++ b/tests/test_demos.py
@@ -134,7 +134,7 @@ def test_demo_1_workdir(tmpdir):
         "hydra.run.dir=" + str(tmpdir),
     ]
     result = subprocess.check_output(cmd)
-    assert result.decode("utf-8") == "Working directory : {}\n".format(tmpdir)
+    assert result.decode("utf-8").rstrip() == "Working directory : {}".format(tmpdir)
 
 
 @pytest.mark.parametrize(
diff --git a/tests/test_integration.py b/tests/test_integration.py
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -174,7 +174,7 @@ def test_custom_task_name(
             ),
             {},
             ["a=1", "b=2"],
-            "foo-a:1,b:2",
+            "foo-a=1,b=2",
         ),
     ],
 )
@@ -294,7 +294,7 @@ def test_custom_local_run_workdir(
             },
             {},
             ["a=1", "b=2"],
-            "hydra_cfg/a:1,b:2",
+            "hydra_cfg/a=1,b=2",
         ),
     ],
 )