Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SysLogHandler does not support IPv6 destinations #74563

Closed
calcheng mannequin opened this issue May 16, 2017 · 6 comments
Closed

SysLogHandler does not support IPv6 destinations #74563

calcheng mannequin opened this issue May 16, 2017 · 6 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@calcheng
Copy link
Mannequin

calcheng mannequin commented May 16, 2017

BPO 30378
Nosy @vsajip, @zhangyangyu
PRs
  • bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses #1676
  • [3.5] bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses #1902
  • [3.6] bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses #1903
  • [2.7] bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses #1904
  • Files
  • test_syslog.py: Test script for syslog
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2017-06-01.14:24:10.743>
    created_at = <Date 2017-05-16.14:23:19.881>
    labels = ['3.7', 'type-bug', 'library']
    title = 'SysLogHandler does not support IPv6 destinations'
    updated_at = <Date 2017-06-01.14:24:10.740>
    user = 'https://bugs.python.org/calcheng'

    bugs.python.org fields:

    activity = <Date 2017-06-01.14:24:10.740>
    actor = 'xiang.zhang'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-01.14:24:10.743>
    closer = 'xiang.zhang'
    components = ['Library (Lib)']
    creation = <Date 2017-05-16.14:23:19.881>
    creator = 'calcheng'
    dependencies = []
    files = ['46865']
    hgrepos = []
    issue_num = 30378
    keywords = []
    message_count = 6.0
    messages = ['293764', '294936', '294945', '294946', '294947', '294948']
    nosy_count = 3.0
    nosy_names = ['vinay.sajip', 'xiang.zhang', 'calcheng']
    pr_nums = ['1676', '1902', '1903', '1904']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue30378'
    versions = ['Python 2.7', 'Python 3.5', 'Python 3.6', 'Python 3.7']

    @calcheng
    Copy link
    Mannequin Author

    calcheng mannequin commented May 16, 2017

    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

    @calcheng calcheng mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels May 16, 2017
    @zhangyangyu
    Copy link
    Member

    New changeset 0b4b57d by Xiang Zhang in branch 'master':
    bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (bpo-1676)
    0b4b57d

    @zhangyangyu
    Copy link
    Member

    New changeset e20d226 by Xiang Zhang in branch '3.5':
    bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (bpo-1676) (bpo-1902)
    e20d226

    @zhangyangyu
    Copy link
    Member

    New changeset 95b4da2 by Xiang Zhang in branch '3.6':
    bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (bpo-1676) (bpo-1903)
    95b4da2

    @zhangyangyu
    Copy link
    Member

    New changeset 3ef3bcb by Xiang Zhang in branch '2.7':
    bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (bpo-1904) (bpo-1676)
    3ef3bcb

    @zhangyangyu
    Copy link
    Member

    Thanks calcheng for your report and Vinay for the review.

    @zhangyangyu zhangyangyu added the 3.7 (EOL) end of life label Jun 1, 2017
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant