title: django rest Error - AttributeError: module 'collections' has no attribute 'MutableMapping'
body: <p>I'm build Django app, and it's work fine on my machine, but when I run inside docker container it's rest framework keep crashing, but when I comment any connection with rest framework it's work fine.</p>
  <ul>
  <li>My machine: Kali Linux 2021.3</li>
  <li>docker machine: Raspberry Pi 4 4gb</li>
  <li>docker container image: python:rc-alpine3.14</li>
  <li>python version on my machine: Python 3.9.7</li>
  <li>python version on container: Python 3.10.0rc2</li>
  </ul>
  <p>error output:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;/app/manage.py&quot;, line 22, in &lt;module&gt;
      main()
    File &quot;/app/manage.py&quot;, line 18, in main
      execute_from_command_line(sys.argv)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py&quot;, line 419, in execute_from_command_line
      utility.execute()
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py&quot;, line 413, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/commands/test.py&quot;, line 23, in run_from_argv
      super().run_from_argv(argv)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/base.py&quot;, line 354, in run_from_argv
      self.execute(*args, **cmd_options)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/base.py&quot;, line 398, in execute
      output = self.handle(*args, **options)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/commands/test.py&quot;, line 55, in handle
      failures = test_runner.run_tests(test_labels)
    File &quot;/usr/local/lib/python3.10/site-packages/django/test/runner.py&quot;, line 728, in run_tests
      self.run_checks(databases)
    File &quot;/usr/local/lib/python3.10/site-packages/django/test/runner.py&quot;, line 665, in run_checks
      call_command('check', verbosity=self.verbosity, databases=databases)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/__init__.py&quot;, line 181, in call_command
      return command.execute(*args, **defaults)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/base.py&quot;, line 398, in execute
      output = self.handle(*args, **options)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/commands/check.py&quot;, line 63, in handle
      self.check(
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/management/base.py&quot;, line 419, in check
      all_issues = checks.run_checks(
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/checks/registry.py&quot;, line 76, in run_checks
      new_errors = check(app_configs=app_configs, databases=databases)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/checks/urls.py&quot;, line 13, in check_url_config
      return check_resolver(resolver)
    File &quot;/usr/local/lib/python3.10/site-packages/django/core/checks/urls.py&quot;, line 23, in check_resolver
      return check_method()
    File &quot;/usr/local/lib/python3.10/site-packages/django/urls/resolvers.py&quot;, line 412, in check
      for pattern in self.url_patterns:
    File &quot;/usr/local/lib/python3.10/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;/usr/local/lib/python3.10/site-packages/django/urls/resolvers.py&quot;, line 598, in url_patterns
      patterns = getattr(self.urlconf_module, &quot;urlpatterns&quot;, self.urlconf_module)
    File &quot;/usr/local/lib/python3.10/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;/usr/local/lib/python3.10/site-packages/django/urls/resolvers.py&quot;, line 591, in urlconf_module
      return import_module(self.urlconf_name)
    File &quot;/usr/local/lib/python3.10/importlib/__init__.py&quot;, line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1050, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1027, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 688, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 883, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 241, in _call_with_frames_removed
    File &quot;/app/project/urls.py&quot;, line 24, in &lt;module&gt;
      path(&quot;&quot;, include(&quot;apps.urls&quot;, namespace=&quot;apps&quot;)),
    File &quot;/usr/local/lib/python3.10/site-packages/django/urls/conf.py&quot;, line 34, in include
      urlconf_module = import_module(urlconf_module)
    File &quot;/usr/local/lib/python3.10/importlib/__init__.py&quot;, line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1050, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1027, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1006, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 688, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 883, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 241, in _call_with_frames_removed
    File &quot;/app/apps/urls.py&quot;, line 3, in &lt;module&gt;
      from . import api
    File &quot;/app/apps/api.py&quot;, line 1, in &lt;module&gt;
      from .serializers import *
    File &quot;/app/apps/serializers.py&quot;, line 1, in &lt;module&gt;
      from rest_framework import serializers
    File &quot;/usr/local/lib/python3.10/site-packages/rest_framework/serializers.py&quot;, line 27, in &lt;module&gt;
      from rest_framework.compat import postgres_fields
    File &quot;/usr/local/lib/python3.10/site-packages/rest_framework/compat.py&quot;, line 59, in &lt;module&gt;
      import requests
    File &quot;/usr/local/lib/python3.10/site-packages/requests/__init__.py&quot;, line 63, in &lt;module&gt;
      from . import utils
    File &quot;/usr/local/lib/python3.10/site-packages/requests/utils.py&quot;, line 27, in &lt;module&gt;
      from .cookies import RequestsCookieJar, cookiejar_from_dict
    File &quot;/usr/local/lib/python3.10/site-packages/requests/cookies.py&quot;, line 172, in &lt;module&gt;
      class RequestsCookieJar(cookielib.CookieJar, collections.MutableMapping):
  AttributeError: module 'collections' has no attribute 'MutableMapping'
  </code></pre>
  <p>Dockerfile</p>
  <pre><code>FROM python:rc-alpine3.14
  
  COPY . /app 
  WORKDIR /app
  
  ENV UWSGI_PROFILE=core
  ENV PYTHONUNBUFFERED=TRUE
  RUN apk add --update --no-cache g++ gcc libxslt-dev # add some nessery libs
  RUN apk add python3-dev build-base linux-headers pcre-dev
  RUN pip3 install -U pip # upgrade pip
  RUN apk update \
      &amp;&amp; apk add --virtual build-deps gcc python3-dev musl-dev \
      &amp;&amp; apk add jpeg-dev zlib-dev libjpeg \
      &amp;&amp; pip install Pillow \
      &amp;&amp; apk del build-deps
  
  
  RUN apk add --no-cache --virtual=build-dependencies wget ca-certificates &amp;&amp; \
      wget &quot;https://bootstrap.pypa.io/get-pip.py&quot; -O /dev/stdout | python
  
  
  RUN pip install uwsgi
  
  RUN pip3 install -r requirements.txt # install all requirements
  RUN python uploadstatics.py
  
  EXPOSE 80
  CMD [&quot;gunicorn&quot;,&quot;project.wsgi:application&quot;, &quot;-b 0.0.0.0:8060&quot;]
  </code></pre>
  <p>NOTES:</p>
  <ul>
  <li>I use gunicorn to run the app (the error show even I run't from manage.py)</li>
  </ul>