Commit 9989b11d authored by ento's avatar ento

SSLSyscallError is an IOError in PyPy 2.7

```
$ pypy
Python 2.7.18 (596a3d4905d6452b2ac871c1b39dea68418b4f64, May 29 2022, 00:39:20)
...
>>>> from ssl import SSLSyscallError
>>>> SSLSyscallError.__mro__
(<class '_cffi_ssl._stdssl.error.SSLSyscallError'>, <class '_cffi_ssl._stdssl.error.SSLError'>, <class '_socket.error'>, <type 'exceptions.IOError'>, <type 'exceptions.EnvironmentError'>, <typ
e 'exceptions.StandardError'>, <type 'exceptions.Exception'>, <type 'exceptions.BaseException'>, <type 'object'>)
```

Where I think _socket.error is defined:
https://github.com/mozillazg/pypy/blob/release-pypy2.7-v7.3.9/pypy/module/_socket/interp_socket.py#L679-L680
parent 7e17e88a
......@@ -198,9 +198,9 @@ class TestTCP(greentest.TestCase):
# from generating ``ConnectionResetError`` on AppVeyor.
try:
client = client.unwrap()
except (ValueError, OSError):
# PyPy 3.7 started raising _cffi_ssl._stdssl.error.SSLSyscallError,
# which is an OSError
except (ValueError, IOError, OSError):
# PyPy raises _cffi_ssl._stdssl.error.SSLSyscallError,
# which is an IOError in 2.7 and OSError in 3.7
pass
try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment