[New-bugs-announce] [issue30378] SysLogHandler does not support IPv6 destinations

Calvin Cheng report at bugs.python.org
Tue May 16 10:23:19 EDT 2017


New submission from Calvin Cheng:

The attached test script works fine with IPv4 syslog:
$ python test_syslog.py 192.168.1.4
(no errors reported)

When running the attached script with python 3.5.2 on Ubuntu 16.04, received the following error:

$ python3 test_syslog.py ::1
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.5/logging/handlers.py", line 908, in emit
    self.socket.sendto(msg, self.address)
socket.gaierror: [Errno -9] Address family for hostname not supported
Call stack:
  File "test_syslog.py", line 16, in <module>
    logging.info("Test Syslog with IPv6")
Message: 'Test Syslog with IPv6'
Arguments: ()

Similar error in python 2.7.10:

$ python test_syslog.py ::1
Traceback (most recent call last):
  File "/usr/lib/python2.7/logging/handlers.py", line 864, in emit
    self.socket.sendto(msg, self.address)
gaierror: [Errno -9] Address family for hostname not supported
Logged from file test_syslog.py, line 16

----------
components: Library (Lib)
files: test_syslog.py
messages: 293764
nosy: Calvin Cheng
priority: normal
severity: normal
status: open
title: SysLogHandler does not support IPv6 destinations
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file46865/test_syslog.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30378>
_______________________________________


More information about the New-bugs-announce mailing list