Python 2.7.7

Marcus von Appen mva at freebsd.org
Tue Jun 17 12:24:19 UTC 2014


Kubilay Kocak <koobs at freebsd.org>:

> On 17/06/2014 9:22 PM, Marcus von Appen wrote:
>> Li-Wen Hsu <lwhsu at freebsd.org>:
>>
>>> On Wed, Jun 11, 2014 at 1:54 AM, Robert Simmons <rsimmons0 at gmail.com>
>>> wrote:
>>>> Is there an ETA for updating the python27 port to 2.7.7?
>>>
>>> I just made a patch for updating python27:
>>>
>>>   https://people.freebsd.org/~lwhsu/patch/python-2.7.7.diff
>>
>> lang/python27/files/patch-Lib__distutils__unixccompiler.py should be kept.
>> http://bugs.python.org/issue20767 has not been closed yet and the 2.7.7
>> source
>> code does not incorporate the change nor does the NEWS file indicate
>> anything related
>> to the issue.
>>
>> I'm also unsure about the fcntl.ioctl() patch change. The 2.7.6 patch
>> used an
>> unsigned long on purpose, since we are not limited to 32 bit. The 2.7.7
>> patch however
>> seems to revert this behaviour, limiting ioctl() to 32 bit, which will
>> most likely
>> have an impact on ports using ioctl(). I can't find a related python
>> issue - did we
>> ever report our change upstream?
>>
>> Cheers
>> Marcus
>>
>> _______________________________________________
>> freebsd-python at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-python
>> To unsubscribe, send any mail to "freebsd-python-unsubscribe at freebsd.org"
>
> I don't recall coming across one, but I could be wrong.
>
> If I understood the change (and its background/context), I'd upstream it
> in a heartbeat given its simplicity.
>
> Is the change conditional on FreeBSD? What might be required to get it
> upstream ready?
>

All hail to the revision logs:

http://svnweb.freebsd.org/ports?view=revision&revision=257978

Fix fcntl module to accept 'unsigned long' type commands for ioctl(2).

Although POSIX says the type is 'int', all BSD variants (including Mac OS X)
have been using 'unsigned long' type for very long time and its use predates
the standard long enough.  For certain commands (e.g., TIOCSWINSZ, FIONBIO),
the Python value may get sign-extended on 64-bit platforms (by implicit type
promotion) and it causes annoying warnings from kernel such as this:

WARNING pid 24509 (python2.6): ioctl sign-extension ioctl ffffffff8004667e

-- cut here for more fun --

Cheers
Marcus



More information about the freebsd-python mailing list