[issue10866] Add sethostname()

2011-02-28 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Patch committed in r88685 (3.3), closing. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue10866] Add sethostname()

2011-02-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm not sure why you use PyTuple_Size() and PyTuple_GetItem(). You should be able to do a first call to PyArg_ParseTuple() (using the S specifier to mandate a bytes object), and call PyErr_Clear() and fallback to the second PyArg_ParseTuple() if

[issue10866] Add sethostname()

2011-02-26 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Here is a simplified version. -- Added file: http://bugs.python.org/file20904/sethostname_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10866

[issue10866] Add sethostname()

2011-02-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: New patch including a check for PyObject_GetBuffer()'s return value, the missing declaration of HAVE_SETHOSTNAME in pyconfig.h.in, and a test for giving a bytes values to the function. -- Added file:

[issue10866] Add sethostname()

2011-02-26 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: The patch looks good. Just to be clear, on my system running autoreconf adds the correct stuff to pyconfig.h.in Isn't it best to leave it up to the committer to generate configure and pyconfig.h.in, especially since different autoconf

[issue10866] Add sethostname()

2011-02-26 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: The patch looks good. Just to be clear, on my system running autoreconf adds the correct stuff to pyconfig.h.in Ah, strange. I used autoconf and it didn't... Isn't it best to leave it up to the committer to generate configure and

[issue10866] Add sethostname()

2011-02-26 Thread Ross Lagerwall
Ross Lagerwall rosslagerw...@gmail.com added the comment: Ah, strange. I used autoconf and it didn't... From the man page of autoreconf: Run `autoconf' (and `autoheader', `aclocal', `automake', `autopoint' (formerly `gettextize'), and `libtoolize' where appropriate) repeatedly to

[issue10866] Add sethostname()

2011-01-10 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +pitrou stage: - patch review type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10866 ___

[issue10866] Add sethostname()

2011-01-08 Thread Ross Lagerwall
New submission from Ross Lagerwall rosslagerw...@gmail.com: This patch adds sethostname to the socket module (since socket has gethostname()). -- components: Library (Lib) files: sethostname.patch keywords: patch messages: 125761 nosy: giampaolo.rodola, loewis, rosslagerwall priority: