We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Issue with dvc push to AWS s3 remote
**Please provide information about your setup**
DVC version(i.e. `dvc --version`), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))

DVC: 0.62.1
Mac: Mojave 10.13
Install with pip

issue with `dvc push`


![image](https://user-images.githubusercontent.com/8621935/66682880-fc77c500-ec2a-11e9-9c37-6e276bca005a.png)


--- 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/progress.py`
Content:
```
1 """Manages progress bars for dvc repo."""
2 from __future__ import print_function
3 import logging
4 from tqdm import tqdm
5 from concurrent.futures import ThreadPoolExecutor
6 from funcy import merge
7 
8 logger = logging.getLogger(__name__)
9 
10 
11 class TqdmThreadPoolExecutor(ThreadPoolExecutor):
12     """
13     Ensure worker progressbars are cleared away properly.
14     """
15 
16     def __enter__(self):
17         """
18         Creates a blank initial dummy progress bar if needed so that workers
19         are forced to create "nested" bars.
20         """
21         blank_bar = Tqdm(bar_format="Multi-Threaded:", leave=False)
22         if blank_bar.pos > 0:
23             # already nested - don't need a placeholder bar
24             blank_bar.close()
25         self.bar = blank_bar
26         return super(TqdmThreadPoolExecutor, self).__enter__()
27 
28     def __exit__(self, *a, **k):
29         super(TqdmThreadPoolExecutor, self).__exit__(*a, **k)
30         self.bar.close()
31 
32 
33 class Tqdm(tqdm):
34     """
35     maximum-compatibility tqdm-based progressbars
36     """
37 
38     BAR_FMT_DEFAULT = (
39         "{percentage:3.0f}%|{bar:10}|"
40         "{desc:{ncols_desc}.{ncols_desc}}{n}/{total}"
41         " [{elapsed}<{remaining}, {rate_fmt:>11}{postfix}]"
42     )
43     BAR_FMT_NOTOTAL = (
44         "{desc:{ncols_desc}.{ncols_desc}}{n}"
45         " [{elapsed}<??:??, {rate_fmt:>11}{postfix}]"
46     )
47 
48     def __init__(
49         self,
50         iterable=None,
51         disable=None,
52         level=logging.ERROR,
53         desc=None,
54         leave=False,
55         bar_format=None,
56         bytes=False,  # pylint: disable=W0622
57         **kwargs
58     ):
59         """
60         bytes   : shortcut for
61             `unit='B', unit_scale=True, unit_divisor=1024, miniters=1`
62         desc  : persists after `close()`
63         level  : effective logging level for determining `disable`;
64             used only if `disable` is unspecified
65         kwargs  : anything accepted by `tqdm.tqdm()`
66         """
67         kwargs = kwargs.copy()
68         kwargs.setdefault("unit_scale", True)
69         if bytes:
70             bytes_defaults = dict(
71                 unit="B", unit_scale=True, unit_divisor=1024, miniters=1
72             )
73             kwargs = merge(bytes_defaults, kwargs)
74         self.desc_persist = desc
75         if disable is None:
76             disable = logger.getEffectiveLevel() > level
77         super(Tqdm, self).__init__(
78             iterable=iterable,
79             disable=disable,
80             leave=leave,
81             desc=desc,
82             bar_format="!",
83             **kwargs
84         )
85         if bar_format is None:
86             if self.__len__():
87                 self.bar_format = self.BAR_FMT_DEFAULT
88             else:
89                 self.bar_format = self.BAR_FMT_NOTOTAL
90         else:
91             self.bar_format = bar_format
92         self.refresh()
93 
94     def update_desc(self, desc, n=1):
95         """
96         Calls `set_description_str(desc)` and `update(n)`
97         """
98         self.set_description_str(desc, refresh=False)
99         self.update(n)
100 
101     def update_to(self, current, total=None):
102         if total:
103             self.total = total  # pylint: disable=W0613,W0201
104         self.update(current - self.n)
105 
106     def close(self):
107         if self.desc_persist is not None:
108             self.set_description_str(self.desc_persist, refresh=False)
109         super(Tqdm, self).close()
110 
111     @property
112     def format_dict(self):
113         """inject `ncols_desc` to fill the display width (`ncols`)"""
114         d = super(Tqdm, self).format_dict
115         ncols = d["ncols"] or 80
116         ncols_desc = ncols - len(self.format_meter(ncols_desc=1, **d)) + 1
117         d["ncols_desc"] = max(ncols_desc, 0)
118         return d
119
```
--- 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()

```

diff --git a/dvc/progress.py b/dvc/progress.py
--- a/dvc/progress.py
+++ b/dvc/progress.py
@@ -114,5 +114,11 @@
         d = super(Tqdm, self).format_dict
         ncols = d["ncols"] or 80
         ncols_desc = ncols - len(self.format_meter(ncols_desc=1, **d)) + 1
-        d["ncols_desc"] = max(ncols_desc, 0)
+        ncols_desc = max(ncols_desc, 0)
+        if ncols_desc:
+            d["ncols_desc"] = ncols_desc
+        else:
+            # work-around for zero-width desc
+            d["ncols_desc"] = 1
+            d["desc"] = 0
         return d

{"golden_diff": "diff --git a/dvc/progress.py b/dvc/progress.py\n--- a/dvc/progress.py\n+++ b/dvc/progress.py\n@@ -114,5 +114,11 @@\n         d = super(Tqdm, self).format_dict\n         ncols = d[\"ncols\"] or 80\n         ncols_desc = ncols - len(self.format_meter(ncols_desc=1, **d)) + 1\n-        d[\"ncols_desc\"] = max(ncols_desc, 0)\n+        ncols_desc = max(ncols_desc, 0)\n+        if ncols_desc:\n+            d[\"ncols_desc\"] = ncols_desc\n+        else:\n+            # work-around for zero-width desc\n+            d[\"ncols_desc\"] = 1\n+            d[\"desc\"] = 0\n         return d\n", "issue": "Issue with dvc push to AWS s3 remote\n**Please provide information about your setup**\r\nDVC version(i.e. `dvc --version`), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))\r\n\r\nDVC: 0.62.1\r\nMac: Mojave 10.13\r\nInstall with pip\r\n\r\nissue with `dvc push`\r\n\r\n\r\n![image](https://user-images.githubusercontent.com/8621935/66682880-fc77c500-ec2a-11e9-9c37-6e276bca005a.png)\r\n\n", "before_files": [{"content": "\"\"\"Manages progress bars for dvc repo.\"\"\"\nfrom __future__ import print_function\nimport logging\nfrom tqdm import tqdm\nfrom concurrent.futures import ThreadPoolExecutor\nfrom funcy import merge\n\nlogger = logging.getLogger(__name__)\n\n\nclass TqdmThreadPoolExecutor(ThreadPoolExecutor):\n    \"\"\"\n    Ensure worker progressbars are cleared away properly.\n    \"\"\"\n\n    def __enter__(self):\n        \"\"\"\n        Creates a blank initial dummy progress bar if needed so that workers\n        are forced to create \"nested\" bars.\n        \"\"\"\n        blank_bar = Tqdm(bar_format=\"Multi-Threaded:\", leave=False)\n        if blank_bar.pos > 0:\n            # already nested - don't need a placeholder bar\n            blank_bar.close()\n        self.bar = blank_bar\n        return super(TqdmThreadPoolExecutor, self).__enter__()\n\n    def __exit__(self, *a, **k):\n        super(TqdmThreadPoolExecutor, self).__exit__(*a, **k)\n        self.bar.close()\n\n\nclass Tqdm(tqdm):\n    \"\"\"\n    maximum-compatibility tqdm-based progressbars\n    \"\"\"\n\n    BAR_FMT_DEFAULT = (\n        \"{percentage:3.0f}%|{bar:10}|\"\n        \"{desc:{ncols_desc}.{ncols_desc}}{n}/{total}\"\n        \" [{elapsed}<{remaining}, {rate_fmt:>11}{postfix}]\"\n    )\n    BAR_FMT_NOTOTAL = (\n        \"{desc:{ncols_desc}.{ncols_desc}}{n}\"\n        \" [{elapsed}<??:??, {rate_fmt:>11}{postfix}]\"\n    )\n\n    def __init__(\n        self,\n        iterable=None,\n        disable=None,\n        level=logging.ERROR,\n        desc=None,\n        leave=False,\n        bar_format=None,\n        bytes=False,  # pylint: disable=W0622\n        **kwargs\n    ):\n        \"\"\"\n        bytes   : shortcut for\n            `unit='B', unit_scale=True, unit_divisor=1024, miniters=1`\n        desc  : persists after `close()`\n        level  : effective logging level for determining `disable`;\n            used only if `disable` is unspecified\n        kwargs  : anything accepted by `tqdm.tqdm()`\n        \"\"\"\n        kwargs = kwargs.copy()\n        kwargs.setdefault(\"unit_scale\", True)\n        if bytes:\n            bytes_defaults = dict(\n                unit=\"B\", unit_scale=True, unit_divisor=1024, miniters=1\n            )\n            kwargs = merge(bytes_defaults, kwargs)\n        self.desc_persist = desc\n        if disable is None:\n            disable = logger.getEffectiveLevel() > level\n        super(Tqdm, self).__init__(\n            iterable=iterable,\n            disable=disable,\n            leave=leave,\n            desc=desc,\n            bar_format=\"!\",\n            **kwargs\n        )\n        if bar_format is None:\n            if self.__len__():\n                self.bar_format = self.BAR_FMT_DEFAULT\n            else:\n                self.bar_format = self.BAR_FMT_NOTOTAL\n        else:\n            self.bar_format = bar_format\n        self.refresh()\n\n    def update_desc(self, desc, n=1):\n        \"\"\"\n        Calls `set_description_str(desc)` and `update(n)`\n        \"\"\"\n        self.set_description_str(desc, refresh=False)\n        self.update(n)\n\n    def update_to(self, current, total=None):\n        if total:\n            self.total = total  # pylint: disable=W0613,W0201\n        self.update(current - self.n)\n\n    def close(self):\n        if self.desc_persist is not None:\n            self.set_description_str(self.desc_persist, refresh=False)\n        super(Tqdm, self).close()\n\n    @property\n    def format_dict(self):\n        \"\"\"inject `ncols_desc` to fill the display width (`ncols`)\"\"\"\n        d = super(Tqdm, self).format_dict\n        ncols = d[\"ncols\"] or 80\n        ncols_desc = ncols - len(self.format_meter(ncols_desc=1, **d)) + 1\n        d[\"ncols_desc\"] = max(ncols_desc, 0)\n        return d\n", "path": "dvc/progress.py"}], "after_files": [{"content": "\"\"\"Manages progress bars for dvc repo.\"\"\"\nfrom __future__ import print_function\nimport logging\nfrom tqdm import tqdm\nfrom concurrent.futures import ThreadPoolExecutor\nfrom funcy import merge\n\nlogger = logging.getLogger(__name__)\n\n\nclass TqdmThreadPoolExecutor(ThreadPoolExecutor):\n    \"\"\"\n    Ensure worker progressbars are cleared away properly.\n    \"\"\"\n\n    def __enter__(self):\n        \"\"\"\n        Creates a blank initial dummy progress bar if needed so that workers\n        are forced to create \"nested\" bars.\n        \"\"\"\n        blank_bar = Tqdm(bar_format=\"Multi-Threaded:\", leave=False)\n        if blank_bar.pos > 0:\n            # already nested - don't need a placeholder bar\n            blank_bar.close()\n        self.bar = blank_bar\n        return super(TqdmThreadPoolExecutor, self).__enter__()\n\n    def __exit__(self, *a, **k):\n        super(TqdmThreadPoolExecutor, self).__exit__(*a, **k)\n        self.bar.close()\n\n\nclass Tqdm(tqdm):\n    \"\"\"\n    maximum-compatibility tqdm-based progressbars\n    \"\"\"\n\n    BAR_FMT_DEFAULT = (\n        \"{percentage:3.0f}%|{bar:10}|\"\n        \"{desc:{ncols_desc}.{ncols_desc}}{n}/{total}\"\n        \" [{elapsed}<{remaining}, {rate_fmt:>11}{postfix}]\"\n    )\n    BAR_FMT_NOTOTAL = (\n        \"{desc:{ncols_desc}.{ncols_desc}}{n}\"\n        \" [{elapsed}<??:??, {rate_fmt:>11}{postfix}]\"\n    )\n\n    def __init__(\n        self,\n        iterable=None,\n        disable=None,\n        level=logging.ERROR,\n        desc=None,\n        leave=False,\n        bar_format=None,\n        bytes=False,  # pylint: disable=W0622\n        **kwargs\n    ):\n        \"\"\"\n        bytes   : shortcut for\n            `unit='B', unit_scale=True, unit_divisor=1024, miniters=1`\n        desc  : persists after `close()`\n        level  : effective logging level for determining `disable`;\n            used only if `disable` is unspecified\n        kwargs  : anything accepted by `tqdm.tqdm()`\n        \"\"\"\n        kwargs = kwargs.copy()\n        kwargs.setdefault(\"unit_scale\", True)\n        if bytes:\n            bytes_defaults = dict(\n                unit=\"B\", unit_scale=True, unit_divisor=1024, miniters=1\n            )\n            kwargs = merge(bytes_defaults, kwargs)\n        self.desc_persist = desc\n        if disable is None:\n            disable = logger.getEffectiveLevel() > level\n        super(Tqdm, self).__init__(\n            iterable=iterable,\n            disable=disable,\n            leave=leave,\n            desc=desc,\n            bar_format=\"!\",\n            **kwargs\n        )\n        if bar_format is None:\n            if self.__len__():\n                self.bar_format = self.BAR_FMT_DEFAULT\n            else:\n                self.bar_format = self.BAR_FMT_NOTOTAL\n        else:\n            self.bar_format = bar_format\n        self.refresh()\n\n    def update_desc(self, desc, n=1):\n        \"\"\"\n        Calls `set_description_str(desc)` and `update(n)`\n        \"\"\"\n        self.set_description_str(desc, refresh=False)\n        self.update(n)\n\n    def update_to(self, current, total=None):\n        if total:\n            self.total = total  # pylint: disable=W0613,W0201\n        self.update(current - self.n)\n\n    def close(self):\n        if self.desc_persist is not None:\n            self.set_description_str(self.desc_persist, refresh=False)\n        super(Tqdm, self).close()\n\n    @property\n    def format_dict(self):\n        \"\"\"inject `ncols_desc` to fill the display width (`ncols`)\"\"\"\n        d = super(Tqdm, self).format_dict\n        ncols = d[\"ncols\"] or 80\n        ncols_desc = ncols - len(self.format_meter(ncols_desc=1, **d)) + 1\n        ncols_desc = max(ncols_desc, 0)\n        if ncols_desc:\n            d[\"ncols_desc\"] = ncols_desc\n        else:\n            # work-around for zero-width desc\n            d[\"ncols_desc\"] = 1\n            d[\"desc\"] = 0\n        return d\n", "path": "dvc/progress.py"}]}