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

Make socket support TIPC. #45987

Closed
albertito mannequin opened this issue Dec 18, 2007 · 11 comments
Closed

Make socket support TIPC. #45987

albertito mannequin opened this issue Dec 18, 2007 · 11 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@albertito
Copy link
Mannequin

albertito mannequin commented Dec 18, 2007

BPO 1646
Nosy @gvanrossum, @tiran
Files
  • 0001-Make-socket-support-TIPC.patch
  • 0002-Add-documentation-and-Misc-NEWS-entry-for-TIPC-suppo.patch
  • 0003-Add-unit-tests-for-TIPC-socket-support.patch
  • 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 = 'https://github.com/tiran'
    closed_at = <Date 2008-01-07.16:19:08.310>
    created_at = <Date 2007-12-18.02:54:12.046>
    labels = ['type-feature', 'library']
    title = 'Make socket support TIPC.'
    updated_at = <Date 2008-01-07.16:19:08.308>
    user = 'https://bugs.python.org/albertito'

    bugs.python.org fields:

    activity = <Date 2008-01-07.16:19:08.308>
    actor = 'christian.heimes'
    assignee = 'christian.heimes'
    closed = True
    closed_date = <Date 2008-01-07.16:19:08.310>
    closer = 'christian.heimes'
    components = ['Library (Lib)']
    creation = <Date 2007-12-18.02:54:12.046>
    creator = 'albertito'
    dependencies = []
    files = ['9092', '9093', '9094']
    hgrepos = []
    issue_num = 1646
    keywords = ['patch']
    message_count = 11.0
    messages = ['58721', '58755', '58860', '58885', '58960', '59336', '59378', '59439', '59456', '59458', '59459']
    nosy_count = 3.0
    nosy_names = ['gvanrossum', 'christian.heimes', 'albertito']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue1646'
    versions = ['Python 2.6']

    @albertito
    Copy link
    Mannequin Author

    albertito mannequin commented Dec 18, 2007

    TIPC (http://tipc.sf.net) is an open protocol designed for use in
    clustered computer environments. It currently has an open source
    implementation for Linux (>= 2.6.16), and VxWorks.

    The attached patch (against trunk) adds optional Linux-only support for
    TIPC in the socket module.

    If you want me to make one against 3.0 or any other branch, just let me
    know.

    Thanks,
    Alberto

    @albertito albertito mannequin added the stdlib Python modules in the Lib dir label Dec 18, 2007
    @tiran tiran added the type-feature A feature request or enhancement label Dec 18, 2007
    @gvanrossum
    Copy link
    Member

    I'm okay with adding this, it doesn't add much code and is properly
    safeguarded by #ifdefs and has a configure.in patch.

    I haven't reviewed the code though.

    @albertito
    Copy link
    Mannequin Author

    albertito mannequin commented Dec 20, 2007

    On Tue, Dec 18, 2007 at 07:10:39PM -0000, Guido van Rossum wrote:

    Guido van Rossum added the comment:

    I'm okay with adding this, it doesn't add much code and is properly
    safeguarded by #ifdefs and has a configure.in patch.

    Thanks!

    Is there anything else I need to do in order to get this ready for
    inclusion?

    Thanks again,
    Alberto

    @gvanrossum
    Copy link
    Member

    Tickle the interest of one of the many folks with commit privileges.
    Since 2.6 isn't going to be released for months there's no great hurry,
    but waiting until the last minute would be a mistake.

    @tiran
    Copy link
    Member

    tiran commented Dec 22, 2007

    I've chatted with albertito a few days ago and adviced him to post the
    patch here. I'll take it.

    From the first review the patch looks good. The code is written cleanly
    and it uses the appropriate API. The new code is surrounded by ifdefs
    and it has a patch for configure.in. I'll do the autoreconf to update
    the other files locally.

    The patch is missing documentation updates, Misc/NEWS update and some
    unit tests. The docs should list the new constants and explain TIPC
    briefly in a few sentences. You don't need to write a novell ;)

    @tiran tiran self-assigned this Dec 22, 2007
    @tiran
    Copy link
    Member

    tiran commented Jan 5, 2008

    *PING*

    I'm still waiting for a new patch. Your feature patch has been accepted
    but I won't commit it without doc updates.

    @albertito
    Copy link
    Mannequin Author

    albertito mannequin commented Jan 6, 2008

    On Sat, Jan 05, 2008 at 10:08:15PM -0000, Christian Heimes wrote:

    I'm still waiting for a new patch. Your feature patch has been accepted
    but I won't commit it without doc updates.

    I know, but holidays were not the best time to write documentation.

    I'll probably send you the updated patch sometime this week; thanks for
    the ping =)

    Thanks,
    Alberto

    @albertito
    Copy link
    Mannequin Author

    albertito mannequin commented Jan 7, 2008

    On Sun, Jan 06, 2008 at 02:45:35PM -0000, Alberto Bertogli wrote:

    I'll probably send you the updated patch sometime this week; thanks for
    the ping =)

    Here are the three patches, rebased to the SVN commit 59815.

    The first one is the same I've already submitted, the second adds the
    documentation and the third two testcases.

    The testcases are simple, but I think cover a reasonable amount of TIPC
    specific code. If you want more, let me know.

    The documentation is simple, as you told me, just a paragraph explaining
    about the address format and another explaining the constants. Again, if
    you want me to change anything, just let me know.

    Finally, if you want me to rebase this on top of any other branch, you
    guessed it, just let me know ;)

    Thanks a lot,
    Alberto

    @tiran
    Copy link
    Member

    tiran commented Jan 7, 2008

    The unit tests don't work for me (Ubuntu 7.10, Linux 2.6.22, i386)

    >>> srv = socket.socket(socket.AF_TIPC, socket.SOCK_RDM)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/heimes/dev/python/trunk/Lib/socket.py", line 177, in __init__
        _sock = _realsocket(family, type, proto)
    socket.error: [Errno 97] Address family not supported by protocol

    Do I have to set up my network device for TIPC?

    @albertito
    Copy link
    Mannequin Author

    albertito mannequin commented Jan 7, 2008

    On Mon, Jan 07, 2008 at 03:37:54PM -0000, Christian Heimes wrote:
    > The unit tests don't work for me (Ubuntu 7.10, Linux 2.6.22, i386)
    > 
    > >>> srv = socket.socket(socket.AF_TIPC, socket.SOCK_RDM)
    > Traceback (most recent call last):
    >   File "<stdin>", line 1, in <module>
    >   File "/home/heimes/dev/python/trunk/Lib/socket.py", line 177, in __init__
    >     _sock = _realsocket(family, type, proto)
    > socket.error: [Errno 97] Address family not supported by protocol
    > 
    > Do I have to set up my network device for TIPC?

    No, by default you have a single-node cluster fully capable of TIPC
    networking. But you do need the TIPC module loaded; have you tried
    modprobe tipc?

    If that works, the test cases should pass.

    I understand that this might be a problem because there is no time to
    check at runtime if you have TIPC enabled in your kernel (besides the
    obvious way of trying to create the socket and see if it fails); but you
    have the same problem with any network protocol (although obviously is
    much more common to have TIPC disabled than the rest of the supported
    ones).

    Do you want me to check for this in the conditional for inclusion?

    Thanks,
    Alberto

    @tiran
    Copy link
    Member

    tiran commented Jan 7, 2008

    Committed in r59819

    @tiran tiran closed this as completed Jan 7, 2008
    @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
    stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants