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
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
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
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:
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
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
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
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
___
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: