prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Testing against Python 3.6 and 3.7
  https://github.com/pyinstaller/pyinstaller#main-advantages says that pyinstaller supports these versions of Python but https://github.com/iterative/dvc/blob/master/.travis.yml#L9 says the opposite.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `dvc/remote/base.py`
  Content:
  ```
  1 import os
  2 import re
  3 
  4 from dvc.config import Config
  5 from dvc.logger import Logger
  6 from dvc.exceptions import DvcException
  7 
  8 
  9 STATUS_OK = 1
  10 STATUS_NEW = 3
  11 STATUS_DELETED = 4
  12 
  13 
  14 STATUS_MAP = {
  15     # (local_exists, remote_exists)
  16     (True, True): STATUS_OK,
  17     (False, False): STATUS_OK,
  18     (True, False): STATUS_NEW,
  19     (False, True): STATUS_DELETED,
  20 }
  21 
  22 
  23 class DataCloudError(DvcException):
  24     """ Data Cloud exception """
  25     def __init__(self, msg):
  26         super(DataCloudError, self).__init__('Data sync error: {}'.format(msg))
  27 
  28 
  29 class RemoteBase(object):
  30     REGEX = None
  31     REQUIRES = {}
  32 
  33     def __init__(self, project, config):
  34         pass
  35 
  36     @classmethod
  37     def supported(cls, config):
  38         url = config[Config.SECTION_REMOTE_URL]
  39         url_ok = cls.match(url)
  40         deps_ok = all(cls.REQUIRES.values())
  41         if url_ok and not deps_ok:
  42             missing = [k for k, v in cls.REQUIRES.items() if v is None]
  43             msg = "URL \'{}\' is supported but requires " \
  44                   "these missing dependencies: {}"
  45             Logger.warn(msg.format(url, str(missing)))
  46         return url_ok and deps_ok
  47 
  48     @classmethod
  49     def match(cls, url):
  50         return re.match(cls.REGEX, url)
  51 
  52     def group(self, name):
  53         m = self.match(self.url)
  54         if not m:
  55             return None
  56         return m.group(name)
  57 
  58     @staticmethod
  59     def tmp_file(fname):
  60         """ Temporary name for a partial download """
  61         # FIXME probably better use uuid()
  62         return fname + '.part'
  63 
  64     def save_info(self, path_info):
  65         raise NotImplementedError
  66 
  67     def save(self, path_info):
  68         raise NotImplementedError
  69 
  70     def checkout(self, path_info, checksum_info):
  71         raise NotImplementedError
  72 
  73     def download(self, from_infos, to_infos, no_progress_bar=False, name=None):
  74         raise NotImplementedError
  75 
  76     def upload(self, from_infos, to_infos, path_info, name=None):
  77         raise NotImplementedError
  78 
  79     def remove(self, path_info):
  80         raise NotImplementedError
  81 
  82     def move(self, path_info):
  83         raise NotImplementedError
  84 
  85     def _makedirs(self, fname):
  86         dname = os.path.dirname(fname)
  87         try:
  88             os.makedirs(dname)
  89         except OSError as e:
  90             if e.errno != os.errno.EEXIST:
  91                 raise
  92 
  93     def md5s_to_path_infos(self, md5s):
  94         raise NotImplementedError
  95 
  96     def exists(self, path_infos):
  97         raise NotImplementedError
  98 
  99     @classmethod
  100     def _verify_path_args(cls, from_infos, to_infos, names=None):
  101         assert isinstance(from_infos, list)
  102         assert isinstance(to_infos, list)
  103         assert len(from_infos) == len(to_infos)
  104 
  105         if not names:
  106             names = len(to_infos) * [None]
  107         else:
  108             assert isinstance(names, list)
  109             assert len(names) == len(to_infos)
  110 
  111         return names
  112
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/dvc/remote/base.py b/dvc/remote/base.py
  --- a/dvc/remote/base.py
  +++ b/dvc/remote/base.py
  @@ -1,5 +1,6 @@
   import os
   import re
  +import errno
   
   from dvc.config import Config
   from dvc.logger import Logger
  @@ -84,10 +85,11 @@
   
       def _makedirs(self, fname):
           dname = os.path.dirname(fname)
  +
           try:
               os.makedirs(dname)
           except OSError as e:
  -            if e.errno != os.errno.EEXIST:
  +            if e.errno != errno.EEXIST:
                   raise
   
       def md5s_to_path_infos(self, md5s):
  
verification_info: {"golden_diff": "diff --git a/dvc/remote/base.py b/dvc/remote/base.py\n--- a/dvc/remote/base.py\n+++ b/dvc/remote/base.py\n@@ -1,5 +1,6 @@\n import os\n import re\n+import errno\n \n from dvc.config import Config\n from dvc.logger import Logger\n@@ -84,10 +85,11 @@\n \n     def _makedirs(self, fname):\n         dname = os.path.dirname(fname)\n+\n         try:\n             os.makedirs(dname)\n         except OSError as e:\n-            if e.errno != os.errno.EEXIST:\n+            if e.errno != errno.EEXIST:\n                 raise\n \n     def md5s_to_path_infos(self, md5s):\n", "issue": "Testing against Python 3.6 and 3.7\nhttps://github.com/pyinstaller/pyinstaller#main-advantages says that pyinstaller supports these versions of Python but https://github.com/iterative/dvc/blob/master/.travis.yml#L9 says the opposite.\n", "before_files": [{"content": "import os\nimport re\n\nfrom dvc.config import Config\nfrom dvc.logger import Logger\nfrom dvc.exceptions import DvcException\n\n\nSTATUS_OK = 1\nSTATUS_NEW = 3\nSTATUS_DELETED = 4\n\n\nSTATUS_MAP = {\n    # (local_exists, remote_exists)\n    (True, True): STATUS_OK,\n    (False, False): STATUS_OK,\n    (True, False): STATUS_NEW,\n    (False, True): STATUS_DELETED,\n}\n\n\nclass DataCloudError(DvcException):\n    \"\"\" Data Cloud exception \"\"\"\n    def __init__(self, msg):\n        super(DataCloudError, self).__init__('Data sync error: {}'.format(msg))\n\n\nclass RemoteBase(object):\n    REGEX = None\n    REQUIRES = {}\n\n    def __init__(self, project, config):\n        pass\n\n    @classmethod\n    def supported(cls, config):\n        url = config[Config.SECTION_REMOTE_URL]\n        url_ok = cls.match(url)\n        deps_ok = all(cls.REQUIRES.values())\n        if url_ok and not deps_ok:\n            missing = [k for k, v in cls.REQUIRES.items() if v is None]\n            msg = \"URL \\'{}\\' is supported but requires \" \\\n                  \"these missing dependencies: {}\"\n            Logger.warn(msg.format(url, str(missing)))\n        return url_ok and deps_ok\n\n    @classmethod\n    def match(cls, url):\n        return re.match(cls.REGEX, url)\n\n    def group(self, name):\n        m = self.match(self.url)\n        if not m:\n            return None\n        return m.group(name)\n\n    @staticmethod\n    def tmp_file(fname):\n        \"\"\" Temporary name for a partial download \"\"\"\n        # FIXME probably better use uuid()\n        return fname + '.part'\n\n    def save_info(self, path_info):\n        raise NotImplementedError\n\n    def save(self, path_info):\n        raise NotImplementedError\n\n    def checkout(self, path_info, checksum_info):\n        raise NotImplementedError\n\n    def download(self, from_infos, to_infos, no_progress_bar=False, name=None):\n        raise NotImplementedError\n\n    def upload(self, from_infos, to_infos, path_info, name=None):\n        raise NotImplementedError\n\n    def remove(self, path_info):\n        raise NotImplementedError\n\n    def move(self, path_info):\n        raise NotImplementedError\n\n    def _makedirs(self, fname):\n        dname = os.path.dirname(fname)\n        try:\n            os.makedirs(dname)\n        except OSError as e:\n            if e.errno != os.errno.EEXIST:\n                raise\n\n    def md5s_to_path_infos(self, md5s):\n        raise NotImplementedError\n\n    def exists(self, path_infos):\n        raise NotImplementedError\n\n    @classmethod\n    def _verify_path_args(cls, from_infos, to_infos, names=None):\n        assert isinstance(from_infos, list)\n        assert isinstance(to_infos, list)\n        assert len(from_infos) == len(to_infos)\n\n        if not names:\n            names = len(to_infos) * [None]\n        else:\n            assert isinstance(names, list)\n            assert len(names) == len(to_infos)\n\n        return names\n", "path": "dvc/remote/base.py"}], "after_files": [{"content": "import os\nimport re\nimport errno\n\nfrom dvc.config import Config\nfrom dvc.logger import Logger\nfrom dvc.exceptions import DvcException\n\n\nSTATUS_OK = 1\nSTATUS_NEW = 3\nSTATUS_DELETED = 4\n\n\nSTATUS_MAP = {\n    # (local_exists, remote_exists)\n    (True, True): STATUS_OK,\n    (False, False): STATUS_OK,\n    (True, False): STATUS_NEW,\n    (False, True): STATUS_DELETED,\n}\n\n\nclass DataCloudError(DvcException):\n    \"\"\" Data Cloud exception \"\"\"\n    def __init__(self, msg):\n        super(DataCloudError, self).__init__('Data sync error: {}'.format(msg))\n\n\nclass RemoteBase(object):\n    REGEX = None\n    REQUIRES = {}\n\n    def __init__(self, project, config):\n        pass\n\n    @classmethod\n    def supported(cls, config):\n        url = config[Config.SECTION_REMOTE_URL]\n        url_ok = cls.match(url)\n        deps_ok = all(cls.REQUIRES.values())\n        if url_ok and not deps_ok:\n            missing = [k for k, v in cls.REQUIRES.items() if v is None]\n            msg = \"URL \\'{}\\' is supported but requires \" \\\n                  \"these missing dependencies: {}\"\n            Logger.warn(msg.format(url, str(missing)))\n        return url_ok and deps_ok\n\n    @classmethod\n    def match(cls, url):\n        return re.match(cls.REGEX, url)\n\n    def group(self, name):\n        m = self.match(self.url)\n        if not m:\n            return None\n        return m.group(name)\n\n    @staticmethod\n    def tmp_file(fname):\n        \"\"\" Temporary name for a partial download \"\"\"\n        # FIXME probably better use uuid()\n        return fname + '.part'\n\n    def save_info(self, path_info):\n        raise NotImplementedError\n\n    def save(self, path_info):\n        raise NotImplementedError\n\n    def checkout(self, path_info, checksum_info):\n        raise NotImplementedError\n\n    def download(self, from_infos, to_infos, no_progress_bar=False, name=None):\n        raise NotImplementedError\n\n    def upload(self, from_infos, to_infos, path_info, name=None):\n        raise NotImplementedError\n\n    def remove(self, path_info):\n        raise NotImplementedError\n\n    def move(self, path_info):\n        raise NotImplementedError\n\n    def _makedirs(self, fname):\n        dname = os.path.dirname(fname)\n\n        try:\n            os.makedirs(dname)\n        except OSError as e:\n            if e.errno != errno.EEXIST:\n                raise\n\n    def md5s_to_path_infos(self, md5s):\n        raise NotImplementedError\n\n    def exists(self, path_infos):\n        raise NotImplementedError\n\n    @classmethod\n    def _verify_path_args(cls, from_infos, to_infos, names=None):\n        assert isinstance(from_infos, list)\n        assert isinstance(to_infos, list)\n        assert len(from_infos) == len(to_infos)\n\n        if not names:\n            names = len(to_infos) * [None]\n        else:\n            assert isinstance(names, list)\n            assert len(names) == len(to_infos)\n\n        return names\n", "path": "dvc/remote/base.py"}]}