#1050285 python3-defaults: SSLEOFError when running cheroot application

#1050285#5
Date:
2023-08-22 14:42:04 UTC
From:
To:
Dear Maintainer,
We are running salt-master on bookworm, using salt-api module.
Occasionally it errors out with the following exception:
```
ENGINE socket.error 8
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/cheroot/server.py", line 1287, in communicate
    req.respond()
  File "/usr/lib/python3/dist-packages/cheroot/server.py", line 1077, in respond
    self.server.gateway(self).respond()
  File "/usr/lib/python3/dist-packages/cheroot/wsgi.py", line 139, in respond
    self.write(chunk)
  File "/usr/lib/python3/dist-packages/cheroot/wsgi.py", line 221, in write
    self.req.write(chunk)
  File "/usr/lib/python3/dist-packages/cheroot/server.py", line 1133, in write
    self.conn.wfile.write(chunk)
  File "/usr/lib/python3/dist-packages/cheroot/makefile.py", line 68, in write
    res = super().write(val, *args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/cheroot/makefile.py", line 24, in write
    self._flush_unlocked()
  File "/usr/lib/python3/dist-packages/cheroot/makefile.py", line 33, in _flush_unlocked
    n = self.raw.write(bytes(self._write_buf))
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/socket.py", line 724, in write
    return self._sock.send(b)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/ssl.py", line 1210, in send
    return self._sslobj.write(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2393)
```

There's a fix in cheroot repo, but it relies on having python >=3.11.3:
 * https://github.com/cherrypy/cheroot/pull/518
 * https://github.com/python/cpython/pull/103006

Please consider updating python3 version in bookworm to >= 3.11.3