[issue7777] Support needed for AF_RDS family

2011-11-01 Thread Charles-François Natali

Charles-François Natali  added the comment:

Here's a patch adding support for RDS sockets (with test and documentation 
update).

--
keywords: +needs review, patch
nosy: +haypo, neologix, pitrou
stage: needs patch -> patch review
versions: +Python 3.3 -Python 2.7, Python 3.2
Added file: http://bugs.python.org/file23583/socket_rds.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

A couple of things:
- the tests are skipped with "unable to bind RDS socket" here (even under 
root). Is it expected?
- socket.error is the same as OSError now
- there are some ResourceWarnings abount unclosed sockets when running the tests

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-01 Thread Charles-François Natali

Charles-François Natali  added the comment:

> - the tests are skipped with "unable to bind RDS socket" here (even
> under root). Is it expected?

Oops. I did a quick test to force the socket family (because RDS sockets really 
use sockaddr_in), and apparently I overwrote my original patch... Here's the 
correct one.
As long as the `rds` module is loaded, all the tests should pass.

> - socket.error is the same as OSError now

I changed this in this patch.
I'll update the other occurrences in test_socket in a separate patch.

> - there are some ResourceWarnings abount unclosed sockets when
> running the tests

Same thing here, I fixed those in my original patch, then somehow overwrote it 
with a previous version...

--
Added file: http://bugs.python.org/file23588/socket_rds-1.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-05 Thread Charles-François Natali

Charles-François Natali  added the comment:

So, what do you think of the new patch?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Oops, sorry. I wonder if it would be possible to test the address returned by 
recvfrom(). Same for the flags and ancillary data in recvmsg().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-06 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

I think the patch currently lacks a lot of symbolic constants; see my review.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-06 Thread Charles-François Natali

Charles-François Natali  added the comment:

Here's an updated patch:
- address returned by recvfrom()
- recv flags (MSG_PEEK)
- congestion behavior

I've also added a bunch of constants:
- all the typical SO_ constants
- CMSG flags
- RDMA-related options (RDMA is probably one of the most useful features of RDS)
- I chose to let aside INFO flags, since they don't appear in the man pages  
(and neither here: https://github.com/agrover/python-rds/blob/master/rdma.py, a 
ctypes-based RDS implementation I stumbled upon)
- I didn't add control messages tests: they all pertain to RDMA, which is 
rather tricky to test to test from Python (and my header files don't define 
them)

--
Added file: http://bugs.python.org/file23617/socket_rds-2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-06 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

Not having tests for the control messages is fine with me - we don't need to 
test Linux, but Python.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-10 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 2293ca739223 by Charles-François Natali in branch 'default':
Issue #: socket: Add Reliable Datagram Sockets (PF_RDS) support.
http://hg.python.org/cpython/rev/2293ca739223

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2011-11-10 Thread Charles-François Natali

Changes by Charles-François Natali :


--
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2010-01-24 Thread Andrew Grover

New submission from Andrew Grover :

RDS is a reliable datagram protocol used by Oracle clusters for inter-process 
communication. It is in the Linux kernel, and has a defined address family 
number. Its use is identical to UDP, except the address family is 21, and the 
type is SOCK_SEQPACKET.

So, what's this got to do with Python? :)

Apparently Modules/socketmodule.c getsockaddrarg() checks bind() args, and only 
allows known socket types to bind. Attempting to bind with an RDS socket fails.

It looks pretty straightforward to add support for a new family, but before 
doing so I wanted to check whether this was likely to be accepted, and also to 
ask if it wouldn't make more sense for getsockaddrarg() to not default to 
failing unknown families, but instead letting them through? If the params are 
wrong for a non-enumerated family, bind() will presumably return an error that 
the user will get.

--
components: Extension Modules
messages: 98271
nosy: Andrew.Grover
severity: normal
status: open
title: Support needed for AF_RDS family
type: feature request
versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2010-01-24 Thread Martin v . Löwis

Martin v. Löwis  added the comment:

A patch has good chances of getting accepted (eventually; it may take several 
months or years). Test cases and documentation changes should be included.

Supporting generic socket addresses can't work (IMO): how could Python possibly 
know how to map a Python representation of the address (which is likely a tuple 
of some kind) onto a struct sockaddr?

--
nosy: +loewis
versions:  -Python 2.5, Python 2.6, Python 3.1

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7777] Support needed for AF_RDS family

2010-01-25 Thread Brian Curtin

Changes by Brian Curtin :


--
nosy: +brian.curtin
priority:  -> normal
stage:  -> needs patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com