New issue 2787: pypy3 sockname error
https://bitbucket.org/pypy/pypy/issues/2787/pypy3-sockname-error

Guillaume Valadon:

I found an error with socket.sockname() while using pypy3 with Scapy. 

Here is how to reproduce it:
```
#!shell

$ pypy3 --version
Python 3.5.3 (3f6eaa010fce78cc7973bdc1dfdb95970f08fed2, Feb 12 2018, 22:20:44)
[PyPy 5.10.1 with GCC 7.3.0]

$ cat test_pypy3.py 
import socket
ETH_P_ALL = 3
ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(ETH_P_ALL))
ins.bind(("eno1", ETH_P_ALL))
print(ins.getsockname())
ins.close()

$ sudo pypy3 test_pypy3.py
[sudo] password for guedou: 
Traceback (most recent call last):
  File "test_pypy3.py", line 5, in <module>
    print(ins.getsockname())
UnicodeDecodeError: 'utf8' codec can't decode byte 0xdc in position 0: invalid 
continuation byte
```
The same code works fine with Python 2.7, 3.6 and pypy.


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to