We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DockerClient.secrets is not a property
`DockerClient.secrets` is not decorated with `property` and so must be called rather than just accessed. This is inconsistent with the docs and similar collections on the client attribute (e.g. images, containers, etc.).

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docker/client.py`
Content:
```
1 from .api.client import APIClient
2 from .models.containers import ContainerCollection
3 from .models.images import ImageCollection
4 from .models.networks import NetworkCollection
5 from .models.nodes import NodeCollection
6 from .models.plugins import PluginCollection
7 from .models.secrets import SecretCollection
8 from .models.services import ServiceCollection
9 from .models.swarm import Swarm
10 from .models.volumes import VolumeCollection
11 from .utils import kwargs_from_env
12 
13 
14 class DockerClient(object):
15     """
16     A client for communicating with a Docker server.
17 
18     Example:
19 
20         >>> import docker
21         >>> client = docker.DockerClient(base_url='unix://var/run/docker.sock')
22 
23     Args:
24         base_url (str): URL to the Docker server. For example,
25             ``unix:///var/run/docker.sock`` or ``tcp://127.0.0.1:1234``.
26         version (str): The version of the API to use. Set to ``auto`` to
27             automatically detect the server's version. Default: ``1.26``
28         timeout (int): Default timeout for API calls, in seconds.
29         tls (bool or :py:class:`~docker.tls.TLSConfig`): Enable TLS. Pass
30             ``True`` to enable it with default options, or pass a
31             :py:class:`~docker.tls.TLSConfig` object to use custom
32             configuration.
33         user_agent (str): Set a custom user agent for requests to the server.
34     """
35     def __init__(self, *args, **kwargs):
36         self.api = APIClient(*args, **kwargs)
37 
38     @classmethod
39     def from_env(cls, **kwargs):
40         """
41         Return a client configured from environment variables.
42 
43         The environment variables used are the same as those used by the
44         Docker command-line client. They are:
45 
46         .. envvar:: DOCKER_HOST
47 
48             The URL to the Docker host.
49 
50         .. envvar:: DOCKER_TLS_VERIFY
51 
52             Verify the host against a CA certificate.
53 
54         .. envvar:: DOCKER_CERT_PATH
55 
56             A path to a directory containing TLS certificates to use when
57             connecting to the Docker host.
58 
59         Args:
60             version (str): The version of the API to use. Set to ``auto`` to
61                 automatically detect the server's version. Default: ``1.26``
62             timeout (int): Default timeout for API calls, in seconds.
63             ssl_version (int): A valid `SSL version`_.
64             assert_hostname (bool): Verify the hostname of the server.
65             environment (dict): The environment to read environment variables
66                 from. Default: the value of ``os.environ``
67 
68         Example:
69 
70             >>> import docker
71             >>> client = docker.from_env()
72 
73         .. _`SSL version`:
74             https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLSv1
75         """
76         timeout = kwargs.pop('timeout', None)
77         version = kwargs.pop('version', None)
78         return cls(timeout=timeout, version=version,
79                    **kwargs_from_env(**kwargs))
80 
81     # Resources
82     @property
83     def containers(self):
84         """
85         An object for managing containers on the server. See the
86         :doc:`containers documentation <containers>` for full details.
87         """
88         return ContainerCollection(client=self)
89 
90     @property
91     def images(self):
92         """
93         An object for managing images on the server. See the
94         :doc:`images documentation <images>` for full details.
95         """
96         return ImageCollection(client=self)
97 
98     @property
99     def networks(self):
100         """
101         An object for managing networks on the server. See the
102         :doc:`networks documentation <networks>` for full details.
103         """
104         return NetworkCollection(client=self)
105 
106     @property
107     def nodes(self):
108         """
109         An object for managing nodes on the server. See the
110         :doc:`nodes documentation <nodes>` for full details.
111         """
112         return NodeCollection(client=self)
113 
114     @property
115     def plugins(self):
116         """
117         An object for managing plugins on the server. See the
118         :doc:`plugins documentation <plugins>` for full details.
119         """
120         return PluginCollection(client=self)
121 
122     def secrets(self):
123         """
124         An object for managing secrets on the server. See the
125         :doc:`secrets documentation <secrets>` for full details.
126         """
127         return SecretCollection(client=self)
128 
129     @property
130     def services(self):
131         """
132         An object for managing services on the server. See the
133         :doc:`services documentation <services>` for full details.
134         """
135         return ServiceCollection(client=self)
136 
137     @property
138     def swarm(self):
139         """
140         An object for managing a swarm on the server. See the
141         :doc:`swarm documentation <swarm>` for full details.
142         """
143         return Swarm(client=self)
144 
145     @property
146     def volumes(self):
147         """
148         An object for managing volumes on the server. See the
149         :doc:`volumes documentation <volumes>` for full details.
150         """
151         return VolumeCollection(client=self)
152 
153     # Top-level methods
154     def events(self, *args, **kwargs):
155         return self.api.events(*args, **kwargs)
156     events.__doc__ = APIClient.events.__doc__
157 
158     def df(self):
159         return self.api.df()
160     df.__doc__ = APIClient.df.__doc__
161 
162     def info(self, *args, **kwargs):
163         return self.api.info(*args, **kwargs)
164     info.__doc__ = APIClient.info.__doc__
165 
166     def login(self, *args, **kwargs):
167         return self.api.login(*args, **kwargs)
168     login.__doc__ = APIClient.login.__doc__
169 
170     def ping(self, *args, **kwargs):
171         return self.api.ping(*args, **kwargs)
172     ping.__doc__ = APIClient.ping.__doc__
173 
174     def version(self, *args, **kwargs):
175         return self.api.version(*args, **kwargs)
176     version.__doc__ = APIClient.version.__doc__
177 
178     def __getattr__(self, name):
179         s = ["'DockerClient' object has no attribute '{}'".format(name)]
180         # If a user calls a method on APIClient, they
181         if hasattr(APIClient, name):
182             s.append("In Docker SDK for Python 2.0, this method is now on the "
183                      "object APIClient. See the low-level API section of the "
184                      "documentation for more details.")
185         raise AttributeError(' '.join(s))
186 
187 
188 from_env = DockerClient.from_env
189
```
--- 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/docker/client.py b/docker/client.py
--- a/docker/client.py
+++ b/docker/client.py
@@ -119,6 +119,7 @@
         """
         return PluginCollection(client=self)
 
+    @property
     def secrets(self):
         """
         An object for managing secrets on the server. See the

{"golden_diff": "diff --git a/docker/client.py b/docker/client.py\n--- a/docker/client.py\n+++ b/docker/client.py\n@@ -119,6 +119,7 @@\n         \"\"\"\n         return PluginCollection(client=self)\n \n+    @property\n     def secrets(self):\n         \"\"\"\n         An object for managing secrets on the server. See the\n", "issue": "DockerClient.secrets is not a property\n`DockerClient.secrets` is not decorated with `property` and so must be called rather than just accessed. This is inconsistent with the docs and similar collections on the client attribute (e.g. images, containers, etc.).\n", "before_files": [{"content": "from .api.client import APIClient\nfrom .models.containers import ContainerCollection\nfrom .models.images import ImageCollection\nfrom .models.networks import NetworkCollection\nfrom .models.nodes import NodeCollection\nfrom .models.plugins import PluginCollection\nfrom .models.secrets import SecretCollection\nfrom .models.services import ServiceCollection\nfrom .models.swarm import Swarm\nfrom .models.volumes import VolumeCollection\nfrom .utils import kwargs_from_env\n\n\nclass DockerClient(object):\n    \"\"\"\n    A client for communicating with a Docker server.\n\n    Example:\n\n        >>> import docker\n        >>> client = docker.DockerClient(base_url='unix://var/run/docker.sock')\n\n    Args:\n        base_url (str): URL to the Docker server. For example,\n            ``unix:///var/run/docker.sock`` or ``tcp://127.0.0.1:1234``.\n        version (str): The version of the API to use. Set to ``auto`` to\n            automatically detect the server's version. Default: ``1.26``\n        timeout (int): Default timeout for API calls, in seconds.\n        tls (bool or :py:class:`~docker.tls.TLSConfig`): Enable TLS. Pass\n            ``True`` to enable it with default options, or pass a\n            :py:class:`~docker.tls.TLSConfig` object to use custom\n            configuration.\n        user_agent (str): Set a custom user agent for requests to the server.\n    \"\"\"\n    def __init__(self, *args, **kwargs):\n        self.api = APIClient(*args, **kwargs)\n\n    @classmethod\n    def from_env(cls, **kwargs):\n        \"\"\"\n        Return a client configured from environment variables.\n\n        The environment variables used are the same as those used by the\n        Docker command-line client. They are:\n\n        .. envvar:: DOCKER_HOST\n\n            The URL to the Docker host.\n\n        .. envvar:: DOCKER_TLS_VERIFY\n\n            Verify the host against a CA certificate.\n\n        .. envvar:: DOCKER_CERT_PATH\n\n            A path to a directory containing TLS certificates to use when\n            connecting to the Docker host.\n\n        Args:\n            version (str): The version of the API to use. Set to ``auto`` to\n                automatically detect the server's version. Default: ``1.26``\n            timeout (int): Default timeout for API calls, in seconds.\n            ssl_version (int): A valid `SSL version`_.\n            assert_hostname (bool): Verify the hostname of the server.\n            environment (dict): The environment to read environment variables\n                from. Default: the value of ``os.environ``\n\n        Example:\n\n            >>> import docker\n            >>> client = docker.from_env()\n\n        .. _`SSL version`:\n            https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLSv1\n        \"\"\"\n        timeout = kwargs.pop('timeout', None)\n        version = kwargs.pop('version', None)\n        return cls(timeout=timeout, version=version,\n                   **kwargs_from_env(**kwargs))\n\n    # Resources\n    @property\n    def containers(self):\n        \"\"\"\n        An object for managing containers on the server. See the\n        :doc:`containers documentation <containers>` for full details.\n        \"\"\"\n        return ContainerCollection(client=self)\n\n    @property\n    def images(self):\n        \"\"\"\n        An object for managing images on the server. See the\n        :doc:`images documentation <images>` for full details.\n        \"\"\"\n        return ImageCollection(client=self)\n\n    @property\n    def networks(self):\n        \"\"\"\n        An object for managing networks on the server. See the\n        :doc:`networks documentation <networks>` for full details.\n        \"\"\"\n        return NetworkCollection(client=self)\n\n    @property\n    def nodes(self):\n        \"\"\"\n        An object for managing nodes on the server. See the\n        :doc:`nodes documentation <nodes>` for full details.\n        \"\"\"\n        return NodeCollection(client=self)\n\n    @property\n    def plugins(self):\n        \"\"\"\n        An object for managing plugins on the server. See the\n        :doc:`plugins documentation <plugins>` for full details.\n        \"\"\"\n        return PluginCollection(client=self)\n\n    def secrets(self):\n        \"\"\"\n        An object for managing secrets on the server. See the\n        :doc:`secrets documentation <secrets>` for full details.\n        \"\"\"\n        return SecretCollection(client=self)\n\n    @property\n    def services(self):\n        \"\"\"\n        An object for managing services on the server. See the\n        :doc:`services documentation <services>` for full details.\n        \"\"\"\n        return ServiceCollection(client=self)\n\n    @property\n    def swarm(self):\n        \"\"\"\n        An object for managing a swarm on the server. See the\n        :doc:`swarm documentation <swarm>` for full details.\n        \"\"\"\n        return Swarm(client=self)\n\n    @property\n    def volumes(self):\n        \"\"\"\n        An object for managing volumes on the server. See the\n        :doc:`volumes documentation <volumes>` for full details.\n        \"\"\"\n        return VolumeCollection(client=self)\n\n    # Top-level methods\n    def events(self, *args, **kwargs):\n        return self.api.events(*args, **kwargs)\n    events.__doc__ = APIClient.events.__doc__\n\n    def df(self):\n        return self.api.df()\n    df.__doc__ = APIClient.df.__doc__\n\n    def info(self, *args, **kwargs):\n        return self.api.info(*args, **kwargs)\n    info.__doc__ = APIClient.info.__doc__\n\n    def login(self, *args, **kwargs):\n        return self.api.login(*args, **kwargs)\n    login.__doc__ = APIClient.login.__doc__\n\n    def ping(self, *args, **kwargs):\n        return self.api.ping(*args, **kwargs)\n    ping.__doc__ = APIClient.ping.__doc__\n\n    def version(self, *args, **kwargs):\n        return self.api.version(*args, **kwargs)\n    version.__doc__ = APIClient.version.__doc__\n\n    def __getattr__(self, name):\n        s = [\"'DockerClient' object has no attribute '{}'\".format(name)]\n        # If a user calls a method on APIClient, they\n        if hasattr(APIClient, name):\n            s.append(\"In Docker SDK for Python 2.0, this method is now on the \"\n                     \"object APIClient. See the low-level API section of the \"\n                     \"documentation for more details.\")\n        raise AttributeError(' '.join(s))\n\n\nfrom_env = DockerClient.from_env\n", "path": "docker/client.py"}], "after_files": [{"content": "from .api.client import APIClient\nfrom .models.containers import ContainerCollection\nfrom .models.images import ImageCollection\nfrom .models.networks import NetworkCollection\nfrom .models.nodes import NodeCollection\nfrom .models.plugins import PluginCollection\nfrom .models.secrets import SecretCollection\nfrom .models.services import ServiceCollection\nfrom .models.swarm import Swarm\nfrom .models.volumes import VolumeCollection\nfrom .utils import kwargs_from_env\n\n\nclass DockerClient(object):\n    \"\"\"\n    A client for communicating with a Docker server.\n\n    Example:\n\n        >>> import docker\n        >>> client = docker.DockerClient(base_url='unix://var/run/docker.sock')\n\n    Args:\n        base_url (str): URL to the Docker server. For example,\n            ``unix:///var/run/docker.sock`` or ``tcp://127.0.0.1:1234``.\n        version (str): The version of the API to use. Set to ``auto`` to\n            automatically detect the server's version. Default: ``1.26``\n        timeout (int): Default timeout for API calls, in seconds.\n        tls (bool or :py:class:`~docker.tls.TLSConfig`): Enable TLS. Pass\n            ``True`` to enable it with default options, or pass a\n            :py:class:`~docker.tls.TLSConfig` object to use custom\n            configuration.\n        user_agent (str): Set a custom user agent for requests to the server.\n    \"\"\"\n    def __init__(self, *args, **kwargs):\n        self.api = APIClient(*args, **kwargs)\n\n    @classmethod\n    def from_env(cls, **kwargs):\n        \"\"\"\n        Return a client configured from environment variables.\n\n        The environment variables used are the same as those used by the\n        Docker command-line client. They are:\n\n        .. envvar:: DOCKER_HOST\n\n            The URL to the Docker host.\n\n        .. envvar:: DOCKER_TLS_VERIFY\n\n            Verify the host against a CA certificate.\n\n        .. envvar:: DOCKER_CERT_PATH\n\n            A path to a directory containing TLS certificates to use when\n            connecting to the Docker host.\n\n        Args:\n            version (str): The version of the API to use. Set to ``auto`` to\n                automatically detect the server's version. Default: ``1.26``\n            timeout (int): Default timeout for API calls, in seconds.\n            ssl_version (int): A valid `SSL version`_.\n            assert_hostname (bool): Verify the hostname of the server.\n            environment (dict): The environment to read environment variables\n                from. Default: the value of ``os.environ``\n\n        Example:\n\n            >>> import docker\n            >>> client = docker.from_env()\n\n        .. _`SSL version`:\n            https://docs.python.org/3.5/library/ssl.html#ssl.PROTOCOL_TLSv1\n        \"\"\"\n        timeout = kwargs.pop('timeout', None)\n        version = kwargs.pop('version', None)\n        return cls(timeout=timeout, version=version,\n                   **kwargs_from_env(**kwargs))\n\n    # Resources\n    @property\n    def containers(self):\n        \"\"\"\n        An object for managing containers on the server. See the\n        :doc:`containers documentation <containers>` for full details.\n        \"\"\"\n        return ContainerCollection(client=self)\n\n    @property\n    def images(self):\n        \"\"\"\n        An object for managing images on the server. See the\n        :doc:`images documentation <images>` for full details.\n        \"\"\"\n        return ImageCollection(client=self)\n\n    @property\n    def networks(self):\n        \"\"\"\n        An object for managing networks on the server. See the\n        :doc:`networks documentation <networks>` for full details.\n        \"\"\"\n        return NetworkCollection(client=self)\n\n    @property\n    def nodes(self):\n        \"\"\"\n        An object for managing nodes on the server. See the\n        :doc:`nodes documentation <nodes>` for full details.\n        \"\"\"\n        return NodeCollection(client=self)\n\n    @property\n    def plugins(self):\n        \"\"\"\n        An object for managing plugins on the server. See the\n        :doc:`plugins documentation <plugins>` for full details.\n        \"\"\"\n        return PluginCollection(client=self)\n\n    @property\n    def secrets(self):\n        \"\"\"\n        An object for managing secrets on the server. See the\n        :doc:`secrets documentation <secrets>` for full details.\n        \"\"\"\n        return SecretCollection(client=self)\n\n    @property\n    def services(self):\n        \"\"\"\n        An object for managing services on the server. See the\n        :doc:`services documentation <services>` for full details.\n        \"\"\"\n        return ServiceCollection(client=self)\n\n    @property\n    def swarm(self):\n        \"\"\"\n        An object for managing a swarm on the server. See the\n        :doc:`swarm documentation <swarm>` for full details.\n        \"\"\"\n        return Swarm(client=self)\n\n    @property\n    def volumes(self):\n        \"\"\"\n        An object for managing volumes on the server. See the\n        :doc:`volumes documentation <volumes>` for full details.\n        \"\"\"\n        return VolumeCollection(client=self)\n\n    # Top-level methods\n    def events(self, *args, **kwargs):\n        return self.api.events(*args, **kwargs)\n    events.__doc__ = APIClient.events.__doc__\n\n    def df(self):\n        return self.api.df()\n    df.__doc__ = APIClient.df.__doc__\n\n    def info(self, *args, **kwargs):\n        return self.api.info(*args, **kwargs)\n    info.__doc__ = APIClient.info.__doc__\n\n    def login(self, *args, **kwargs):\n        return self.api.login(*args, **kwargs)\n    login.__doc__ = APIClient.login.__doc__\n\n    def ping(self, *args, **kwargs):\n        return self.api.ping(*args, **kwargs)\n    ping.__doc__ = APIClient.ping.__doc__\n\n    def version(self, *args, **kwargs):\n        return self.api.version(*args, **kwargs)\n    version.__doc__ = APIClient.version.__doc__\n\n    def __getattr__(self, name):\n        s = [\"'DockerClient' object has no attribute '{}'\".format(name)]\n        # If a user calls a method on APIClient, they\n        if hasattr(APIClient, name):\n            s.append(\"In Docker SDK for Python 2.0, this method is now on the \"\n                     \"object APIClient. See the low-level API section of the \"\n                     \"documentation for more details.\")\n        raise AttributeError(' '.join(s))\n\n\nfrom_env = DockerClient.from_env\n", "path": "docker/client.py"}]}