We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Importing ABC directly from collections module was removed in Python 3.9
Since the project is Python 3 only importing from collections.abc will resolve the issue. I will raise a PR.

https://github.com/marshmallow-code/webargs/blob/1b34470908cb54862b7aeb578f794ac3285cdf38/src/webargs/pyramidparser.py#L141

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/webargs/pyramidparser.py`
Content:
```
1 """Pyramid request argument parsing.
2 
3 Example usage: ::
4 
5     from wsgiref.simple_server import make_server
6     from pyramid.config import Configurator
7     from pyramid.response import Response
8     from marshmallow import fields
9     from webargs.pyramidparser import use_args
10 
11     hello_args = {
12         'name': fields.Str(missing='World')
13     }
14 
15     @use_args(hello_args)
16     def hello_world(request, args):
17         return Response('Hello ' + args['name'])
18 
19     if __name__ == '__main__':
20         config = Configurator()
21         config.add_route('hello', '/')
22         config.add_view(hello_world, route_name='hello')
23         app = config.make_wsgi_app()
24         server = make_server('0.0.0.0', 6543, app)
25         server.serve_forever()
26 """
27 import collections
28 import functools
29 
30 from webob.multidict import MultiDict
31 from pyramid.httpexceptions import exception_response
32 
33 from webargs import core
34 from webargs.core import json
35 from webargs.multidictproxy import MultiDictProxy
36 
37 
38 def is_json_request(req):
39     return core.is_json(req.headers.get("content-type"))
40 
41 
42 class PyramidParser(core.Parser):
43     """Pyramid request argument parser."""
44 
45     __location_map__ = dict(
46         matchdict="load_matchdict",
47         path="load_matchdict",
48         **core.Parser.__location_map__,
49     )
50 
51     def _raw_load_json(self, req):
52         """Return a json payload from the request for the core parser's load_json
53 
54         Checks the input mimetype and may return 'missing' if the mimetype is
55         non-json, even if the request body is parseable as json."""
56         if not is_json_request(req):
57             return core.missing
58 
59         return core.parse_json(req.body, req.charset)
60 
61     def load_querystring(self, req, schema):
62         """Return query params from the request as a MultiDictProxy."""
63         return MultiDictProxy(req.GET, schema)
64 
65     def load_form(self, req, schema):
66         """Return form values from the request as a MultiDictProxy."""
67         return MultiDictProxy(req.POST, schema)
68 
69     def load_cookies(self, req, schema):
70         """Return cookies from the request as a MultiDictProxy."""
71         return MultiDictProxy(req.cookies, schema)
72 
73     def load_headers(self, req, schema):
74         """Return headers from the request as a MultiDictProxy."""
75         return MultiDictProxy(req.headers, schema)
76 
77     def load_files(self, req, schema):
78         """Return files from the request as a MultiDictProxy."""
79         files = ((k, v) for k, v in req.POST.items() if hasattr(v, "file"))
80         return MultiDictProxy(MultiDict(files), schema)
81 
82     def load_matchdict(self, req, schema):
83         """Return the request's ``matchdict`` as a MultiDictProxy."""
84         return MultiDictProxy(req.matchdict, schema)
85 
86     def handle_error(self, error, req, schema, error_status_code, error_headers):
87         """Handles errors during parsing. Aborts the current HTTP request and
88         responds with a 400 error.
89         """
90         status_code = error_status_code or self.DEFAULT_VALIDATION_STATUS
91         response = exception_response(
92             status_code,
93             detail=str(error),
94             headers=error_headers,
95             content_type="application/json",
96         )
97         body = json.dumps(error.messages)
98         response.body = body.encode("utf-8") if isinstance(body, str) else body
99         raise response
100 
101     def _handle_invalid_json_error(self, error, req, *args, **kwargs):
102         messages = {"json": ["Invalid JSON body."]}
103         response = exception_response(
104             400, detail=str(messages), content_type="application/json"
105         )
106         body = json.dumps(messages)
107         response.body = body.encode("utf-8") if isinstance(body, str) else body
108         raise response
109 
110     def use_args(
111         self,
112         argmap,
113         req=None,
114         location=core.Parser.DEFAULT_LOCATION,
115         as_kwargs=False,
116         validate=None,
117         error_status_code=None,
118         error_headers=None,
119     ):
120         """Decorator that injects parsed arguments into a view callable.
121         Supports the *Class-based View* pattern where `request` is saved as an instance
122         attribute on a view class.
123 
124         :param dict argmap: Either a `marshmallow.Schema`, a `dict`
125             of argname -> `marshmallow.fields.Field` pairs, or a callable
126             which accepts a request and returns a `marshmallow.Schema`.
127         :param req: The request object to parse. Pulled off of the view by default.
128         :param str location: Where on the request to load values.
129         :param bool as_kwargs: Whether to insert arguments as keyword arguments.
130         :param callable validate: Validation function that receives the dictionary
131             of parsed arguments. If the function returns ``False``, the parser
132             will raise a :exc:`ValidationError`.
133         :param int error_status_code: Status code passed to error handler functions when
134             a `ValidationError` is raised.
135         :param dict error_headers: Headers passed to error handler functions when a
136             a `ValidationError` is raised.
137         """
138         location = location or self.location
139         # Optimization: If argmap is passed as a dictionary, we only need
140         # to generate a Schema once
141         if isinstance(argmap, collections.Mapping):
142             argmap = core.dict2schema(argmap, self.schema_class)()
143 
144         def decorator(func):
145             @functools.wraps(func)
146             def wrapper(obj, *args, **kwargs):
147                 # The first argument is either `self` or `request`
148                 try:  # get self.request
149                     request = req or obj.request
150                 except AttributeError:  # first arg is request
151                     request = obj
152                 # NOTE: At this point, argmap may be a Schema, callable, or dict
153                 parsed_args = self.parse(
154                     argmap,
155                     req=request,
156                     location=location,
157                     validate=validate,
158                     error_status_code=error_status_code,
159                     error_headers=error_headers,
160                 )
161                 if as_kwargs:
162                     kwargs.update(parsed_args)
163                     return func(obj, *args, **kwargs)
164                 else:
165                     return func(obj, parsed_args, *args, **kwargs)
166 
167             wrapper.__wrapped__ = func
168             return wrapper
169 
170         return decorator
171 
172 
173 parser = PyramidParser()
174 use_args = parser.use_args
175 use_kwargs = parser.use_kwargs
176
```
--- 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/src/webargs/pyramidparser.py b/src/webargs/pyramidparser.py
--- a/src/webargs/pyramidparser.py
+++ b/src/webargs/pyramidparser.py
@@ -138,7 +138,7 @@
         location = location or self.location
         # Optimization: If argmap is passed as a dictionary, we only need
         # to generate a Schema once
-        if isinstance(argmap, collections.Mapping):
+        if isinstance(argmap, collections.abc.Mapping):
             argmap = core.dict2schema(argmap, self.schema_class)()
 
         def decorator(func):

{"golden_diff": "diff --git a/src/webargs/pyramidparser.py b/src/webargs/pyramidparser.py\n--- a/src/webargs/pyramidparser.py\n+++ b/src/webargs/pyramidparser.py\n@@ -138,7 +138,7 @@\n         location = location or self.location\n         # Optimization: If argmap is passed as a dictionary, we only need\n         # to generate a Schema once\n-        if isinstance(argmap, collections.Mapping):\n+        if isinstance(argmap, collections.abc.Mapping):\n             argmap = core.dict2schema(argmap, self.schema_class)()\n \n         def decorator(func):\n", "issue": "Importing ABC directly from collections module was removed in Python 3.9\nSince the project is Python 3 only importing from collections.abc will resolve the issue. I will raise a PR.\r\n\r\nhttps://github.com/marshmallow-code/webargs/blob/1b34470908cb54862b7aeb578f794ac3285cdf38/src/webargs/pyramidparser.py#L141\n", "before_files": [{"content": "\"\"\"Pyramid request argument parsing.\n\nExample usage: ::\n\n    from wsgiref.simple_server import make_server\n    from pyramid.config import Configurator\n    from pyramid.response import Response\n    from marshmallow import fields\n    from webargs.pyramidparser import use_args\n\n    hello_args = {\n        'name': fields.Str(missing='World')\n    }\n\n    @use_args(hello_args)\n    def hello_world(request, args):\n        return Response('Hello ' + args['name'])\n\n    if __name__ == '__main__':\n        config = Configurator()\n        config.add_route('hello', '/')\n        config.add_view(hello_world, route_name='hello')\n        app = config.make_wsgi_app()\n        server = make_server('0.0.0.0', 6543, app)\n        server.serve_forever()\n\"\"\"\nimport collections\nimport functools\n\nfrom webob.multidict import MultiDict\nfrom pyramid.httpexceptions import exception_response\n\nfrom webargs import core\nfrom webargs.core import json\nfrom webargs.multidictproxy import MultiDictProxy\n\n\ndef is_json_request(req):\n    return core.is_json(req.headers.get(\"content-type\"))\n\n\nclass PyramidParser(core.Parser):\n    \"\"\"Pyramid request argument parser.\"\"\"\n\n    __location_map__ = dict(\n        matchdict=\"load_matchdict\",\n        path=\"load_matchdict\",\n        **core.Parser.__location_map__,\n    )\n\n    def _raw_load_json(self, req):\n        \"\"\"Return a json payload from the request for the core parser's load_json\n\n        Checks the input mimetype and may return 'missing' if the mimetype is\n        non-json, even if the request body is parseable as json.\"\"\"\n        if not is_json_request(req):\n            return core.missing\n\n        return core.parse_json(req.body, req.charset)\n\n    def load_querystring(self, req, schema):\n        \"\"\"Return query params from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.GET, schema)\n\n    def load_form(self, req, schema):\n        \"\"\"Return form values from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.POST, schema)\n\n    def load_cookies(self, req, schema):\n        \"\"\"Return cookies from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.cookies, schema)\n\n    def load_headers(self, req, schema):\n        \"\"\"Return headers from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.headers, schema)\n\n    def load_files(self, req, schema):\n        \"\"\"Return files from the request as a MultiDictProxy.\"\"\"\n        files = ((k, v) for k, v in req.POST.items() if hasattr(v, \"file\"))\n        return MultiDictProxy(MultiDict(files), schema)\n\n    def load_matchdict(self, req, schema):\n        \"\"\"Return the request's ``matchdict`` as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.matchdict, schema)\n\n    def handle_error(self, error, req, schema, error_status_code, error_headers):\n        \"\"\"Handles errors during parsing. Aborts the current HTTP request and\n        responds with a 400 error.\n        \"\"\"\n        status_code = error_status_code or self.DEFAULT_VALIDATION_STATUS\n        response = exception_response(\n            status_code,\n            detail=str(error),\n            headers=error_headers,\n            content_type=\"application/json\",\n        )\n        body = json.dumps(error.messages)\n        response.body = body.encode(\"utf-8\") if isinstance(body, str) else body\n        raise response\n\n    def _handle_invalid_json_error(self, error, req, *args, **kwargs):\n        messages = {\"json\": [\"Invalid JSON body.\"]}\n        response = exception_response(\n            400, detail=str(messages), content_type=\"application/json\"\n        )\n        body = json.dumps(messages)\n        response.body = body.encode(\"utf-8\") if isinstance(body, str) else body\n        raise response\n\n    def use_args(\n        self,\n        argmap,\n        req=None,\n        location=core.Parser.DEFAULT_LOCATION,\n        as_kwargs=False,\n        validate=None,\n        error_status_code=None,\n        error_headers=None,\n    ):\n        \"\"\"Decorator that injects parsed arguments into a view callable.\n        Supports the *Class-based View* pattern where `request` is saved as an instance\n        attribute on a view class.\n\n        :param dict argmap: Either a `marshmallow.Schema`, a `dict`\n            of argname -> `marshmallow.fields.Field` pairs, or a callable\n            which accepts a request and returns a `marshmallow.Schema`.\n        :param req: The request object to parse. Pulled off of the view by default.\n        :param str location: Where on the request to load values.\n        :param bool as_kwargs: Whether to insert arguments as keyword arguments.\n        :param callable validate: Validation function that receives the dictionary\n            of parsed arguments. If the function returns ``False``, the parser\n            will raise a :exc:`ValidationError`.\n        :param int error_status_code: Status code passed to error handler functions when\n            a `ValidationError` is raised.\n        :param dict error_headers: Headers passed to error handler functions when a\n            a `ValidationError` is raised.\n        \"\"\"\n        location = location or self.location\n        # Optimization: If argmap is passed as a dictionary, we only need\n        # to generate a Schema once\n        if isinstance(argmap, collections.Mapping):\n            argmap = core.dict2schema(argmap, self.schema_class)()\n\n        def decorator(func):\n            @functools.wraps(func)\n            def wrapper(obj, *args, **kwargs):\n                # The first argument is either `self` or `request`\n                try:  # get self.request\n                    request = req or obj.request\n                except AttributeError:  # first arg is request\n                    request = obj\n                # NOTE: At this point, argmap may be a Schema, callable, or dict\n                parsed_args = self.parse(\n                    argmap,\n                    req=request,\n                    location=location,\n                    validate=validate,\n                    error_status_code=error_status_code,\n                    error_headers=error_headers,\n                )\n                if as_kwargs:\n                    kwargs.update(parsed_args)\n                    return func(obj, *args, **kwargs)\n                else:\n                    return func(obj, parsed_args, *args, **kwargs)\n\n            wrapper.__wrapped__ = func\n            return wrapper\n\n        return decorator\n\n\nparser = PyramidParser()\nuse_args = parser.use_args\nuse_kwargs = parser.use_kwargs\n", "path": "src/webargs/pyramidparser.py"}], "after_files": [{"content": "\"\"\"Pyramid request argument parsing.\n\nExample usage: ::\n\n    from wsgiref.simple_server import make_server\n    from pyramid.config import Configurator\n    from pyramid.response import Response\n    from marshmallow import fields\n    from webargs.pyramidparser import use_args\n\n    hello_args = {\n        'name': fields.Str(missing='World')\n    }\n\n    @use_args(hello_args)\n    def hello_world(request, args):\n        return Response('Hello ' + args['name'])\n\n    if __name__ == '__main__':\n        config = Configurator()\n        config.add_route('hello', '/')\n        config.add_view(hello_world, route_name='hello')\n        app = config.make_wsgi_app()\n        server = make_server('0.0.0.0', 6543, app)\n        server.serve_forever()\n\"\"\"\nimport collections\nimport functools\n\nfrom webob.multidict import MultiDict\nfrom pyramid.httpexceptions import exception_response\n\nfrom webargs import core\nfrom webargs.core import json\nfrom webargs.multidictproxy import MultiDictProxy\n\n\ndef is_json_request(req):\n    return core.is_json(req.headers.get(\"content-type\"))\n\n\nclass PyramidParser(core.Parser):\n    \"\"\"Pyramid request argument parser.\"\"\"\n\n    __location_map__ = dict(\n        matchdict=\"load_matchdict\",\n        path=\"load_matchdict\",\n        **core.Parser.__location_map__,\n    )\n\n    def _raw_load_json(self, req):\n        \"\"\"Return a json payload from the request for the core parser's load_json\n\n        Checks the input mimetype and may return 'missing' if the mimetype is\n        non-json, even if the request body is parseable as json.\"\"\"\n        if not is_json_request(req):\n            return core.missing\n\n        return core.parse_json(req.body, req.charset)\n\n    def load_querystring(self, req, schema):\n        \"\"\"Return query params from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.GET, schema)\n\n    def load_form(self, req, schema):\n        \"\"\"Return form values from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.POST, schema)\n\n    def load_cookies(self, req, schema):\n        \"\"\"Return cookies from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.cookies, schema)\n\n    def load_headers(self, req, schema):\n        \"\"\"Return headers from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.headers, schema)\n\n    def load_files(self, req, schema):\n        \"\"\"Return files from the request as a MultiDictProxy.\"\"\"\n        files = ((k, v) for k, v in req.POST.items() if hasattr(v, \"file\"))\n        return MultiDictProxy(MultiDict(files), schema)\n\n    def load_matchdict(self, req, schema):\n        \"\"\"Return the request's ``matchdict`` as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.matchdict, schema)\n\n    def handle_error(self, error, req, schema, error_status_code, error_headers):\n        \"\"\"Handles errors during parsing. Aborts the current HTTP request and\n        responds with a 400 error.\n        \"\"\"\n        status_code = error_status_code or self.DEFAULT_VALIDATION_STATUS\n        response = exception_response(\n            status_code,\n            detail=str(error),\n            headers=error_headers,\n            content_type=\"application/json\",\n        )\n        body = json.dumps(error.messages)\n        response.body = body.encode(\"utf-8\") if isinstance(body, str) else body\n        raise response\n\n    def _handle_invalid_json_error(self, error, req, *args, **kwargs):\n        messages = {\"json\": [\"Invalid JSON body.\"]}\n        response = exception_response(\n            400, detail=str(messages), content_type=\"application/json\"\n        )\n        body = json.dumps(messages)\n        response.body = body.encode(\"utf-8\") if isinstance(body, str) else body\n        raise response\n\n    def use_args(\n        self,\n        argmap,\n        req=None,\n        location=core.Parser.DEFAULT_LOCATION,\n        as_kwargs=False,\n        validate=None,\n        error_status_code=None,\n        error_headers=None,\n    ):\n        \"\"\"Decorator that injects parsed arguments into a view callable.\n        Supports the *Class-based View* pattern where `request` is saved as an instance\n        attribute on a view class.\n\n        :param dict argmap: Either a `marshmallow.Schema`, a `dict`\n            of argname -> `marshmallow.fields.Field` pairs, or a callable\n            which accepts a request and returns a `marshmallow.Schema`.\n        :param req: The request object to parse. Pulled off of the view by default.\n        :param str location: Where on the request to load values.\n        :param bool as_kwargs: Whether to insert arguments as keyword arguments.\n        :param callable validate: Validation function that receives the dictionary\n            of parsed arguments. If the function returns ``False``, the parser\n            will raise a :exc:`ValidationError`.\n        :param int error_status_code: Status code passed to error handler functions when\n            a `ValidationError` is raised.\n        :param dict error_headers: Headers passed to error handler functions when a\n            a `ValidationError` is raised.\n        \"\"\"\n        location = location or self.location\n        # Optimization: If argmap is passed as a dictionary, we only need\n        # to generate a Schema once\n        if isinstance(argmap, collections.abc.Mapping):\n            argmap = core.dict2schema(argmap, self.schema_class)()\n\n        def decorator(func):\n            @functools.wraps(func)\n            def wrapper(obj, *args, **kwargs):\n                # The first argument is either `self` or `request`\n                try:  # get self.request\n                    request = req or obj.request\n                except AttributeError:  # first arg is request\n                    request = obj\n                # NOTE: At this point, argmap may be a Schema, callable, or dict\n                parsed_args = self.parse(\n                    argmap,\n                    req=request,\n                    location=location,\n                    validate=validate,\n                    error_status_code=error_status_code,\n                    error_headers=error_headers,\n                )\n                if as_kwargs:\n                    kwargs.update(parsed_args)\n                    return func(obj, *args, **kwargs)\n                else:\n                    return func(obj, parsed_args, *args, **kwargs)\n\n            wrapper.__wrapped__ = func\n            return wrapper\n\n        return decorator\n\n\nparser = PyramidParser()\nuse_args = parser.use_args\nuse_kwargs = parser.use_kwargs\n", "path": "src/webargs/pyramidparser.py"}]}