[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: Removed file: http://bugs.python.org/file22025/socket_if.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: You use UTF-8 encoding: Here's an updated patch taking your comments into account (I'm really blissfully ignorant when it comes to encoding issues, so I hope it will be OK this time). -- Added file:

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: that patch looks good. though I do wish we had a function similar to PyObject_AsStringEncodedFSDefault() so that the ParseTuple call wasn't needed for this relatively common operation when interfacing with system library calls that deal in

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: that patch looks good I tested it with non-ASCII interface names: it works as expected with ASCII and UTF-8 locales. It's the first time that I see the O format for Py_BuildValue(), I didn't know this one. The patch looks good.

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset cc60d0283fad by Charles-François Natali in branch 'default': Issue #1746656: make if_nameindex(), if_indextoname() and if_nametoindex() http://hg.python.org/cpython/rev/cc60d0283fad --

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: @neologix: You can commit it into Python 3.3. Tell me if you need help ;-) My first commit :-) What's the next step? Can this issue be closed, or should I wait until the tests pass on some buildbot? --

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: My first commit :-) What's the next step? Can this issue be closed, or should I wait until the tests pass on some buildbot? You can close the issue nevertheless (as fixed / committed/rejected). It can be reopened later if there's a buildbot

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-20 Thread Charles-François Natali
Changes by Charles-François Natali neolo...@free.fr: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___ ___

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Here's a patch: - those functions now accept and return str, not bytes arrays You use UTF-8 encoding: +Is, ni[i].if_index, ni[i].if_name); +if (!PyArg_ParseTuple(args, s:if_nametoindex, ifname)) You should

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-19 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Example with a non-ASCII interface name: $ sudo tunctl -u haypo -t unicodeé Set 'unicodeé' persistent and owned by uid 1000 $ sudo ifconfig -a|grep unicode|hexdump -C 75 6e 69 63 6f 64 65 c3 a9 20 4c 69 6e 6b 20 65

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-18 Thread Charles-François Natali
Charles-François Natali neolo...@free.fr added the comment: Here's a patch: - those functions now accept and return str, not bytes arrays - some of them were not declared static, it's now fixed - use PyErr_SetFromErrno when errno is set - add tests (return type, nonexistent interface name/index

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-18 Thread Santoso Wijaya
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___ ___

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-17 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Sorry to reopen, but do these methods really have to return *byte strings* for interface names? In Python 3, we usually take the position that textually meaningful data should be str, not bytes (even filenames under POSIX). The usual way to do

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset c2515cb23d9b by Gregory P. Smith in branch 'default': Issue #1746656: Add if_nameindex, if_nametoindex, if_indextoname http://hg.python.org/cpython/rev/c2515cb23d9b -- nosy: +python-dev

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: I added these with conditional compilation via autoconf for use on posix systems. These methods are not IPv6 specific. Anyone who wants to see them supported on windows will need to add whatever conditional compilation magic is required to

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: New changeset c2515cb23d9b by Gregory P. Smith in branch 'default': Issue #1746656: Add if_nameindex, if_nametoindex, if_indextoname The _socket module doesn't compile on OpenIndiana anymore:

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: The _socket module doesn't compile on OpenIndiana anymore Same problem of FreeBSD 8.2: http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/291/steps/test/logs/stdio --

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Also failing to compile on OS X: http://www.python.org/dev/buildbot/all/builders/AMD64%20Leopard%203.x/builds/1385/steps/test/logs/stdio The problem seems to be that net/if.h is not being included on these non-Linux systems. Looking at

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 434dfe42fde1 by Nadeem Vawda in branch 'default': Fix _socket compilation failures on non-Linux buildbots (cf. issue #1746656). http://hg.python.org/cpython/rev/434dfe42fde1 -- ___ Python

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: The OpenIndiana bots are now green, but the BSD and OS X bots are still failing. It seems that on those systems, net/if.h depends on sys/types.h and maybe some other headers, so the current configure script detects it as present but not

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: thanks i'll take a look at OS X here. obviously i did development and testing on linux. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: OK, that's great. It'll be another couple of hours before I can do anything from the FreeBSD side; I'm still waiting for the ISO to finish downloading :/ -- ___ Python tracker

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset b6aafb20e5f5 by Gregory P. Smith in branch 'default': issue #1746656: Fix for OS X. configure and #include changes so that the socket http://hg.python.org/cpython/rev/b6aafb20e5f5 -- ___

[issue1746656] IPv6 Interface naming/indexing functions

2011-05-15 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: All the buildbots are back to normal. It looks like FreeBSD was having the same problem as OS X. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656

[issue1746656] IPv6 Interface naming/indexing functions

2010-08-08 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.2 -Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___

[issue1746656] IPv6 Interface naming/indexing functions

2009-04-07 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: What is the status of these methods? On the windows side, it appears that these are only available in Vista and later so we'll need some conditional compliation magic there: http://msdn.microsoft.com/en-us/library/bb408409(VS.85).aspx

[issue1746656] IPv6 Interface naming/indexing functions

2009-04-06 Thread Daniel Diniz
Changes by Daniel Diniz aja...@gmail.com: -- stage: - test needed versions: +Python 2.7, Python 3.1 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1746656 ___

[issue1746656] IPv6 Interface naming/indexing functions

2007-11-23 Thread Christian Heimes
Christian Heimes added the comment: How do you know that the patch is working when you don't know how to test it? Nobody is going to apply new features without unit tests. -- nosy: +tiran _ Tracker [EMAIL PROTECTED]

[issue1746656] IPv6 Interface naming/indexing functions

2007-10-07 Thread Gabriel de Perthuis
Changes by Gabriel de Perthuis : -- nosy: +onyxg7 type: - rfe _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1746656 _