We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Unclear which `HTTPError` was instantiated from `deprecated_args()` warnings
In Falcon 3.0.x, instantiating `HTTPError` or its subclasses with positional arguments (of course except the allowed ones) generates a `DeprecatedWarning` via the `deprecated_args()` decorator.

However, it is unclear from the warning which class/function was invoked, it just says "calls [with more than N] positional args are deprecated". Brought up by @laurent-chriqui (see the linked PR).

Ideally, as a developer, I would like the warning to read along the lines of
```
DeprecatedWarning: Calls to HTTPNotFound.__init__(...) with positional args are deprecated. Please specify them as keyword arguments instead.
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `falcon/util/deprecation.py`
Content:
```
1 # Copyright 2013 by Rackspace Hosting, Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #    http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 
15 """Miscellaneous deprecation utilities.
16 
17 This module provides decorators to mark functions and classes as deprecated.
18 """
19 
20 import functools
21 import warnings
22 
23 
24 __all__ = (
25     'DeprecatedWarning',
26     'deprecated',
27     'deprecated_args',
28 )
29 
30 
31 # NOTE(kgriffs): We don't want our deprecations to be ignored by default,
32 # so create our own type.
33 #
34 # TODO(kgriffs): Revisit this decision if users complain.
35 class DeprecatedWarning(UserWarning):
36     pass
37 
38 
39 def deprecated(instructions, is_property=False, method_name=None):
40     """Flag a method as deprecated.
41 
42     This function returns a decorator which can be used to mark deprecated
43     functions. Applying this decorator will result in a warning being
44     emitted when the function is used.
45 
46     Args:
47         instructions (str): Specific guidance for the developer, e.g.:
48             'Please migrate to add_proxy(...)'.
49         is_property (bool): If the deprecated object is a property. It
50             will omit the ``(...)`` from the generated documentation.
51         method_name (str, optional): Set to override the name of the
52             deprecated function or property in the generated
53             documentation (default ``None``). This is useful when
54             decorating an alias that carries the target's ``__name__``.
55 
56     """
57 
58     def decorator(func):
59 
60         object_name = 'property' if is_property else 'function'
61         post_name = '' if is_property else '(...)'
62         message = 'Call to deprecated {} {}{}. {}'.format(
63             object_name, method_name or func.__name__, post_name, instructions
64         )
65 
66         @functools.wraps(func)
67         def wrapper(*args, **kwargs):
68             warnings.warn(message, category=DeprecatedWarning, stacklevel=2)
69 
70             return func(*args, **kwargs)
71 
72         return wrapper
73 
74     return decorator
75 
76 
77 def deprecated_args(*, allowed_positional, is_method=True):
78     """Flag a method call with positional args as deprecated.
79 
80     Keyword Args:
81         allowed_positional (int): Number of allowed positional arguments
82         is_method (bool, optional): The decorated function is a method. Will
83           add one to the number of allowed positional args to account for
84           ``self``. Defaults to True.
85     """
86 
87     template = (
88         'Calls with{} positional args are deprecated.'
89         ' Please specify them as keyword arguments instead.'
90     )
91     text = ' more than {}'.format(allowed_positional) if allowed_positional else ''
92     warn_text = template.format(text)
93     if is_method:
94         allowed_positional += 1
95 
96     def deprecated_args(fn):
97         @functools.wraps(fn)
98         def wraps(*args, **kwargs):
99             if len(args) > allowed_positional:
100                 warnings.warn(warn_text, DeprecatedWarning, stacklevel=2)
101             return fn(*args, **kwargs)
102 
103         return wraps
104 
105     return deprecated_args
106
```
--- 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/falcon/util/deprecation.py b/falcon/util/deprecation.py
--- a/falcon/util/deprecation.py
+++ b/falcon/util/deprecation.py
@@ -85,11 +85,11 @@
     """
 
     template = (
-        'Calls with{} positional args are deprecated.'
+        'Calls to {{fn}}(...) with{arg_text} positional args are deprecated.'
         ' Please specify them as keyword arguments instead.'
     )
     text = ' more than {}'.format(allowed_positional) if allowed_positional else ''
-    warn_text = template.format(text)
+    warn_text = template.format(arg_text=text)
     if is_method:
         allowed_positional += 1
 
@@ -97,7 +97,11 @@
         @functools.wraps(fn)
         def wraps(*args, **kwargs):
             if len(args) > allowed_positional:
-                warnings.warn(warn_text, DeprecatedWarning, stacklevel=2)
+                warnings.warn(
+                    warn_text.format(fn=fn.__qualname__),
+                    DeprecatedWarning,
+                    stacklevel=2,
+                )
             return fn(*args, **kwargs)
 
         return wraps

{"golden_diff": "diff --git a/falcon/util/deprecation.py b/falcon/util/deprecation.py\n--- a/falcon/util/deprecation.py\n+++ b/falcon/util/deprecation.py\n@@ -85,11 +85,11 @@\n     \"\"\"\n \n     template = (\n-        'Calls with{} positional args are deprecated.'\n+        'Calls to {{fn}}(...) with{arg_text} positional args are deprecated.'\n         ' Please specify them as keyword arguments instead.'\n     )\n     text = ' more than {}'.format(allowed_positional) if allowed_positional else ''\n-    warn_text = template.format(text)\n+    warn_text = template.format(arg_text=text)\n     if is_method:\n         allowed_positional += 1\n \n@@ -97,7 +97,11 @@\n         @functools.wraps(fn)\n         def wraps(*args, **kwargs):\n             if len(args) > allowed_positional:\n-                warnings.warn(warn_text, DeprecatedWarning, stacklevel=2)\n+                warnings.warn(\n+                    warn_text.format(fn=fn.__qualname__),\n+                    DeprecatedWarning,\n+                    stacklevel=2,\n+                )\n             return fn(*args, **kwargs)\n \n         return wraps\n", "issue": "Unclear which `HTTPError` was instantiated from `deprecated_args()` warnings\nIn Falcon 3.0.x, instantiating `HTTPError` or its subclasses with positional arguments (of course except the allowed ones) generates a `DeprecatedWarning` via the `deprecated_args()` decorator.\r\n\r\nHowever, it is unclear from the warning which class/function was invoked, it just says \"calls [with more than N] positional args are deprecated\". Brought up by @laurent-chriqui (see the linked PR).\r\n\r\nIdeally, as a developer, I would like the warning to read along the lines of\r\n```\r\nDeprecatedWarning: Calls to HTTPNotFound.__init__(...) with positional args are deprecated. Please specify them as keyword arguments instead.\r\n```\n", "before_files": [{"content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Miscellaneous deprecation utilities.\n\nThis module provides decorators to mark functions and classes as deprecated.\n\"\"\"\n\nimport functools\nimport warnings\n\n\n__all__ = (\n    'DeprecatedWarning',\n    'deprecated',\n    'deprecated_args',\n)\n\n\n# NOTE(kgriffs): We don't want our deprecations to be ignored by default,\n# so create our own type.\n#\n# TODO(kgriffs): Revisit this decision if users complain.\nclass DeprecatedWarning(UserWarning):\n    pass\n\n\ndef deprecated(instructions, is_property=False, method_name=None):\n    \"\"\"Flag a method as deprecated.\n\n    This function returns a decorator which can be used to mark deprecated\n    functions. Applying this decorator will result in a warning being\n    emitted when the function is used.\n\n    Args:\n        instructions (str): Specific guidance for the developer, e.g.:\n            'Please migrate to add_proxy(...)'.\n        is_property (bool): If the deprecated object is a property. It\n            will omit the ``(...)`` from the generated documentation.\n        method_name (str, optional): Set to override the name of the\n            deprecated function or property in the generated\n            documentation (default ``None``). This is useful when\n            decorating an alias that carries the target's ``__name__``.\n\n    \"\"\"\n\n    def decorator(func):\n\n        object_name = 'property' if is_property else 'function'\n        post_name = '' if is_property else '(...)'\n        message = 'Call to deprecated {} {}{}. {}'.format(\n            object_name, method_name or func.__name__, post_name, instructions\n        )\n\n        @functools.wraps(func)\n        def wrapper(*args, **kwargs):\n            warnings.warn(message, category=DeprecatedWarning, stacklevel=2)\n\n            return func(*args, **kwargs)\n\n        return wrapper\n\n    return decorator\n\n\ndef deprecated_args(*, allowed_positional, is_method=True):\n    \"\"\"Flag a method call with positional args as deprecated.\n\n    Keyword Args:\n        allowed_positional (int): Number of allowed positional arguments\n        is_method (bool, optional): The decorated function is a method. Will\n          add one to the number of allowed positional args to account for\n          ``self``. Defaults to True.\n    \"\"\"\n\n    template = (\n        'Calls with{} positional args are deprecated.'\n        ' Please specify them as keyword arguments instead.'\n    )\n    text = ' more than {}'.format(allowed_positional) if allowed_positional else ''\n    warn_text = template.format(text)\n    if is_method:\n        allowed_positional += 1\n\n    def deprecated_args(fn):\n        @functools.wraps(fn)\n        def wraps(*args, **kwargs):\n            if len(args) > allowed_positional:\n                warnings.warn(warn_text, DeprecatedWarning, stacklevel=2)\n            return fn(*args, **kwargs)\n\n        return wraps\n\n    return deprecated_args\n", "path": "falcon/util/deprecation.py"}], "after_files": [{"content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Miscellaneous deprecation utilities.\n\nThis module provides decorators to mark functions and classes as deprecated.\n\"\"\"\n\nimport functools\nimport warnings\n\n\n__all__ = (\n    'DeprecatedWarning',\n    'deprecated',\n    'deprecated_args',\n)\n\n\n# NOTE(kgriffs): We don't want our deprecations to be ignored by default,\n# so create our own type.\n#\n# TODO(kgriffs): Revisit this decision if users complain.\nclass DeprecatedWarning(UserWarning):\n    pass\n\n\ndef deprecated(instructions, is_property=False, method_name=None):\n    \"\"\"Flag a method as deprecated.\n\n    This function returns a decorator which can be used to mark deprecated\n    functions. Applying this decorator will result in a warning being\n    emitted when the function is used.\n\n    Args:\n        instructions (str): Specific guidance for the developer, e.g.:\n            'Please migrate to add_proxy(...)'.\n        is_property (bool): If the deprecated object is a property. It\n            will omit the ``(...)`` from the generated documentation.\n        method_name (str, optional): Set to override the name of the\n            deprecated function or property in the generated\n            documentation (default ``None``). This is useful when\n            decorating an alias that carries the target's ``__name__``.\n\n    \"\"\"\n\n    def decorator(func):\n\n        object_name = 'property' if is_property else 'function'\n        post_name = '' if is_property else '(...)'\n        message = 'Call to deprecated {} {}{}. {}'.format(\n            object_name, method_name or func.__name__, post_name, instructions\n        )\n\n        @functools.wraps(func)\n        def wrapper(*args, **kwargs):\n            warnings.warn(message, category=DeprecatedWarning, stacklevel=2)\n\n            return func(*args, **kwargs)\n\n        return wrapper\n\n    return decorator\n\n\ndef deprecated_args(*, allowed_positional, is_method=True):\n    \"\"\"Flag a method call with positional args as deprecated.\n\n    Keyword Args:\n        allowed_positional (int): Number of allowed positional arguments\n        is_method (bool, optional): The decorated function is a method. Will\n          add one to the number of allowed positional args to account for\n          ``self``. Defaults to True.\n    \"\"\"\n\n    template = (\n        'Calls to {{fn}}(...) with{arg_text} positional args are deprecated.'\n        ' Please specify them as keyword arguments instead.'\n    )\n    text = ' more than {}'.format(allowed_positional) if allowed_positional else ''\n    warn_text = template.format(arg_text=text)\n    if is_method:\n        allowed_positional += 1\n\n    def deprecated_args(fn):\n        @functools.wraps(fn)\n        def wraps(*args, **kwargs):\n            if len(args) > allowed_positional:\n                warnings.warn(\n                    warn_text.format(fn=fn.__qualname__),\n                    DeprecatedWarning,\n                    stacklevel=2,\n                )\n            return fn(*args, **kwargs)\n\n        return wraps\n\n    return deprecated_args\n", "path": "falcon/util/deprecation.py"}]}