title: AttributeError: '_UnixSelectorEventLoop' object has no attribute '_signal_handlers'
body: <p>I've been upgrading our Django/Python app to Python 3.9.7 and Django 3.2.7 (from Python 3.5 and Django 1.11.23).</p>
  <p>Currently if I try to run <code>python manage.py createsuperuser</code></p>
  <p>I get the following error</p>
  <pre class="lang-py prettyprint-override"><code>Traceback (most recent call last):
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/selector_events.py&quot;, line 261, in _add_reader
      key = self._selector.get_key(fd)
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/selectors.py&quot;, line 193, in get_key
      raise KeyError(&quot;{!r} is not registered&quot;.format(fileobj)) from None
  KeyError: '10 is not registered'
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/Users/myuser/Development/app/manage.py&quot;, line 22, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File &quot;/Users/myuser/.pyenv/versions/insta9/lib/python3.9/site-packages/django/core/management/__init__.py&quot;, line 419, in execute_from_command_line
      utility.execute()
    File &quot;/Users/myuser/.pyenv/versions/insta9/lib/python3.9/site-packages/django/core/management/__init__.py&quot;, line 413, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/Users/myuser/.pyenv/versions/insta9/lib/python3.9/site-packages/django/core/management/base.py&quot;, line 367, in run_from_argv
      connections.close_all()
    File &quot;/Users/myuser/.pyenv/versions/insta9/lib/python3.9/site-packages/django/db/utils.py&quot;, line 213, in close_all
      connection.close()
    File &quot;/Users/myuser/.pyenv/versions/insta9/lib/python3.9/site-packages/django/utils/asyncio.py&quot;, line 19, in inner
      event_loop = asyncio.get_event_loop()
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/events.py&quot;, line 639, in get_event_loop
      self.set_event_loop(self.new_event_loop())
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/events.py&quot;, line 659, in new_event_loop
      return self._loop_factory()
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/unix_events.py&quot;, line 54, in __init__
      super().__init__(selector)
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/selector_events.py&quot;, line 61, in __init__
      self._make_self_pipe()
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/selector_events.py&quot;, line 112, in _make_self_pipe
      self._add_reader(self._ssock.fileno(), self._read_from_self)
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/selector_events.py&quot;, line 263, in _add_reader
      self._selector.register(fd, selectors.EVENT_READ,
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/selectors.py&quot;, line 523, in register
      self._selector.control([kev], 0, 0)
  TypeError: changelist must be an iterable of select.kevent objects
  Exception ignored in: &lt;function BaseEventLoop.__del__ at 0x103307310&gt;
  Traceback (most recent call last):
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_events.py&quot;, line 683, in __del__
      self.close()
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/unix_events.py&quot;, line 63, in close
      if self._signal_handlers:
  AttributeError: '_UnixSelectorEventLoop' object has no attribute '_signal_handlers'
  Exception ignored in: &lt;function BaseEventLoop.__del__ at 0x103307310&gt;
  Traceback (most recent call last):
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/base_events.py&quot;, line 683, in __del__
      self.close()
    File &quot;/Users/myuser/.pyenv/versions/3.9.7/lib/python3.9/asyncio/unix_events.py&quot;, line 63, in close
      if self._signal_handlers:
  AttributeError: '_UnixSelectorEventLoop' object has no attribute '_signal_handlers'
  </code></pre>
  <p>These are some of the versions I'm using in my requirements.txt</p>
  <pre><code>Django==3.2.7
  django-braces==1.14.0
  django-pipeline==2.0.6
  django-storages==1.11.1
  djangorestframework==3.12.4
  django-localflavor==2.0
  django-redis==5.0.0
  django_guardian==2.4.0
  django-debug-toolbar==3.2.2
  django-grappelli==2.15.1
  django-extensions==3.1.3
  django-simple-history==3.0.0
  django-cities-light==3.8.1
  django-autoslug==1.9.8
  django-constance==2.8.0
  django-jsonify==0.3.0
  django-bulk-update==2.2.0
  django-sslserver==0.22
  django-admin-easy==0.6.1
  django-admin-rangefilter==0.8.1
  django-model-utils==4.1.1
  gunicorn==19.7.1
  honcho==0.7.1
  ipython==5.6.0
  eventlet==0.32.0
  selenium==2.53.2
  </code></pre>
  <p>This also seems to happen when I runserver, and then kill the server again. Any ideas what could be causing the issue?</p>