[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart
Marien Zwart added the comment: Attaching a less broken patch, after Taggnostr pointed out on irc that the code I removed is not actually dead. I really don't know why I thought it was. I did take the opportunity to make it more obvious what that code is actually checking for. -- Added

[issue6944] socket.getnameinfo raises SystemError on bogus input

2009-09-18 Thread Marien Zwart
New submission from Marien Zwart : socket.getnameinfo passes a PyObject* to PyArg_ParseTuple without checking if it's a tuple first. That means it raises SystemError on invalid input where TypeError would make more sense: >>> socket.getnameinfo('localhost', 0) SystemError: new style getargs form

[issue6943] setup.py fails to find headers of system libffi

2009-09-18 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: It seems that a part of my comment has been truncated. I meant `pkg-config libffi --cflags` command. -- ___ Python tracker

[issue6943] setup.py fails to find headers of system libffi

2009-09-18 Thread Arfrever Frehtes Taifersar Arahesis
New submission from Arfrever Frehtes Taifersar Arahesis : I use --with-system-ffi option, but setup.py fails to find headers of system libffi which are placed outside standard include directory, which causes using of internal copy of libffi. In Gentoo, headers of libffi-3.0.8 are installed into

[issue6743] pprint.pprint should support no objects to print blank lines & allow args

2009-09-18 Thread Éric Araujo
Éric Araujo added the comment: And use keyword-only arguments :) -- nosy: +Merwok ___ Python tracker ___ ___ Python-bugs-list mailing

[issue1602] windows console doesn't print utf8 (Py30a2)

2009-09-18 Thread Christos Georgi ou
Χρήστος Γεωργίου (Christos Georgiou) added the comment: Another note: if one creates a dummy Stream object (having a softspace attribute and a write method that writes using os.write, as in http://stackoverflow.com/questions/878972/windows-cmd-encoding-change-causes-python-crash/1432462#1432462

[issue6942] email.generator.Generator memory consumption

2009-09-18 Thread Ross Patterson
New submission from Ross Patterson : Due to repeated use of StringIO as a way to "look ahead" into subparts while checking that multipart boundaries are unique, memory consumption during email.generator.Generator.flatten() can be up to 3 times the original message size. I implemented a subcla

[issue6925] Doc for locals and vars

2009-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: I disagree with calling only nonlocal variables but not module variables 'free'. As I quoted from Wikipedia, that restrictive definition is not agree on by all at all. From The Free On-line Dictionary of Computing, "1. A variable referred to in a function, whic

[issue6941] Socket error when launching IDL

2009-09-18 Thread Brett Cannon
Brett Cannon added the comment: Can you copy what is being printed out to a text file or into a comment on this issue? Also, what OS is this on? Otherwise we have nothing to work off of. I also deleted whatever exe you uploaded as that will not help with debugging at all. -- nosy: +

[issue6941] Help

2009-09-18 Thread Brett Cannon
Changes by Brett Cannon : Removed file: http://bugs.python.org/file14926/python_icon.exe ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue6885] pdb documentation shows running as script using "python" not "python3"

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: I assume the poor Windows users can figure out what they need to do :) -- ___ Python tracker ___ ___ P

[issue6885] pdb documentation shows running as script using "python" not "python3"

2009-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: On Windows, 3.x has so far been installed as python.exe, not python3.exe, so this change is not correct for Windows users. So please consider reverting this until there is a consistent change across platforms. -- nosy: +tjreedy

[issue6930] [PATCH] PyUnicode_DecodeUTF16 docs wrong (byteorder param)

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: I applied a slightly different patch in r74933. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue6925] Doc for locals and vars

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: Should be fixed now in r74930. I kept "free variables" because this is the correct term, while "nonlocals" clashes with the "nonlocal" statement in 3.x. -- resolution: -> fixed status: open -> closed ___ Python track

[issue6300] encode and decode should accept 'errors' as a keyword argument

2009-09-18 Thread Benjamin Peterson
Benjamin Peterson added the comment: Applied in r74929. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue6925] Doc for locals and vars

2009-09-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: OK. Same is true of vars() also. So I suggest that current locals() entry be changed to "Update and return a dictionary representing the current local symbol table. In function blocks, this includes nonlocal names. Note The contents of this dictionary should n

[issue3366] Add gamma function, error functions and other C99 math.h functions to math module

2009-09-18 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a more careful patch for just the gamma function. It's a fairly direct implementation of Lanczos' formula, with the choice of parameters (N=13, g=6.024680040776729583740234375) taken from the Boost library. In testing of random values and known diffi

[issue6729] Add support for ssize_t

2009-09-18 Thread Thomas Heller
Thomas Heller added the comment: Find where c_size_t is defined: in Lib/ctypes/__init__.py -- ___ Python tracker ___ ___ Python-bugs-l

[issue6613] ctypes.PyThreadState_SetAsyncExc does not work on linux 64bit machines

2009-09-18 Thread Thomas Heller
Thomas Heller added the comment: I guess this is a bug in your code, as mentioned in my last comment, so closing as invalid. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue4606] Passing 'None' if argtype is set to POINTER(...) doesn't always result in NULL

2009-09-18 Thread Thomas Heller
Thomas Heller added the comment: Comitted as trunk: 74921, py3k: 74922, release31-maint: 74923, release26-maint: 74924 -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___

[issue6941] Help

2009-09-18 Thread Joshua Purcell
New submission from Joshua Purcell : My IDLE (Python GUI) Will NOT open It says socket error which is really annoying me because it doesnt open IDLE (AT ALL) -- components: +IDLE type: -> performance Added file: http://bugs.python.org/file14926/python_icon.exe

[issue6300] encode and decode should accept 'errors' as a keyword argument

2009-09-18 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Jeff Bradberry wrote: > > Jeff Bradberry added the comment: > > Ok, fixed. I am kind of vague, though, on the usefulness of str.encode > and unicode.decode. codecs can work on any combination of types. Here's an example of a codec that accepts str and u

[issue6941] Help

2009-09-18 Thread Joshua Purcell
Changes by Joshua Purcell : -- nosy: 08jpurcell severity: normal status: open title: Help versions: Python 2.6 ___ Python tracker ___ _

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller
Changes by Thomas Heller : -- resolution: -> fixed status: open -> closed versions: -Python 2.5 ___ Python tracker ___ ___ Python-bug

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller
Thomas Heller added the comment: I've commited a slightly changed patch plus a test. trunk: 74917, py3k: 74918, release26-maint: 74919, release31-maint: 74920. -- ___ Python tracker ___

[issue6300] encode and decode should accept 'errors' as a keyword argument

2009-09-18 Thread Jeff Bradberry
Jeff Bradberry added the comment: Ok, fixed. I am kind of vague, though, on the usefulness of str.encode and unicode.decode. -- Added file: http://bugs.python.org/file14925/python27.patch ___ Python tracker __

[issue6940] cannot compute sizeof wchar_t on OS X 10.5.7, Python 2.6.2

2009-09-18 Thread Rajarshi
Rajarshi added the comment: Thanks for the pointer. Indeed, clearing PATH to the minimal set of paths allows configure to complete. -- status: open -> closed ___ Python tracker _

[issue6940] cannot compute sizeof wchar_t on OS X 10.5.7, Python 2.6.2

2009-09-18 Thread Ned Deily
Ned Deily added the comment: Works for me (2.6.2 tarball, 10.5.8 PPC, gcc build 5493). Check configure.log and search for the failing "wchar_t" section. Also, try stripping your $PATH down to bare essentials, removing /opt/local/bin (MacPorts), /sw/bin (Fink), /usr/local/bin, etc.; it's poss

[issue6713] Integer & Long types: Performance improvement of 1.6x to 2x for base 10 conversions

2009-09-18 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch for trunk's Objects/intobject.c. With this patch, I'm seeing more than 100% speed increases for str(sys.maxint) on OS X 10.6 (64-bit) and more modest speed gains on OS X 10.5 (32-bit). I'm leaving out the two-digits-at-a-time optimization. It

[issue6939] shadows around the io truncate() semantics

2009-09-18 Thread Pascal Chambon
Pascal Chambon added the comment: Well, I guess it deserve discussion on the pydev mailing lits, that's imo a rather important point, to be documented precisely. Concerning the padding, I guess the semantic doesn't change between the io module and the old file type, i.e : file.truncate([size])

[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2009-09-18 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: The patch looks good as it just removes the while loop. This is a high priority issue and should be fixed as soon as possible, imho, as it makes impossible to use ssl module with non blocking sockets. -- ___ Pyth

[issue6508] expose setresuid

2009-09-18 Thread Travis H.
Travis H. added the comment: On Fri, Sep 18, 2009 at 07:44:56AM +, Martin v. L??wis wrote: > > Your patch looks good (except that in getresuid, you seem to be missing > return). I have no clue why it doesn't work; I'll see whether I can try it > out on Linux within the next few weeks. I

[issue6508] expose setresuid

2009-09-18 Thread Travis H.
Travis H. added the comment: This patch fixes a number of typos in the original and, to my knowledge, is now complete. I have tested this manually and confirmed that it works. I would start as root, setresuid/gid to some non-root uid/gids, getresuid/gid to test those functions, and follow it u

[issue3890] ssl.SSLSocket.recv() implementation may not work with non-blocking sockets

2009-09-18 Thread Tom
Tom added the comment: I have just encountered this bug on Python 2.6.2 on Windows. I hope the fix makes it into 2.6.3. Thanks for the patch. -- nosy: +qwavel ___ Python tracker __

[issue6713] Integer & Long types: Performance improvement of 1.6x to 2x for base 10 conversions

2009-09-18 Thread Mark Dickinson
Mark Dickinson added the comment: The now unused arbitrary base conversion was removed in r74910 (py3k). I'm deliberately going to leave it in in the trunk, just in case there's third party code that's using _PyLong_Format. (There shouldn't be, given the '_Py' prefix, but you never know.)

[issue6939] shadows around the io truncate() semantics

2009-09-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't tell you why it was decided to behave like this. Perhaps it was felt that, since FileIO is low-level (lower than the file object in 2.x), it shouldn't have to remember and restore the old file position. That argument wouldn't apply to BufferedWriter, tho

[issue6940] cannot compute sizeof wchar_t on OS X 10.5.7, Python 2.6.2

2009-09-18 Thread Rajarshi
New submission from Rajarshi : OS 10.5.7, Python 2.6.2 sources. When I execute: /configure --enable-framework=/Library/Frameworks \ --enable-universalsdk=/ \ MACOSX_DEPLOYMENT_TARGET=10.5 \ --with-universal-archs=all \ --with-readline-dir=/usr/local configure fails with the error checking siz

[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Jesse Noller
Jesse Noller added the comment: Ronald, could you email me the incantation for a full-on 64 bit build, I'll double check this on 26-maint. I just forget the magic build flags all the time. -- ___ Python tracker _

[issue6882] uuid creates zombies

2009-09-18 Thread Eric Smith
Eric Smith added the comment: I checked in a slightly modified version of Marcin's patch in py3k (r74907) and release31-maint (r74909). I modified the patch to keep the same style as the rest of the module. I'll now work on back-porting all of the try/finally code to trunk. That includes this c

[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Ronald Oussoren
Changes by Ronald Oussoren : -- assignee: jnoller -> ronaldoussoren ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Ronald Oussoren
Ronald Oussoren added the comment: Jesse: Apple can fix their own copy of python (which is 2.6.1), I was more worried about the upcoming 2.6.3 release. I'll file a bug with Apple and poke their Python maintainer once 2.6.3 is released. -- ___ Pyt

[issue4111] Add DTrace probes

2009-09-18 Thread Dave Malcolm
Changes by Dave Malcolm : -- nosy: +dmalcolm ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue6939] shadows around the io truncate() semantics

2009-09-18 Thread Pascal Chambon
New submission from Pascal Chambon : Hello I'm having trouble around the behaviour of the io module's truncate methods, in py3k. If I remember well, under unix and older versions of Python (with other file types), truncate never move the fiel pointer (and had to fake that behaviour under windows

[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Jesse Noller
Jesse Noller added the comment: AFAIK: Tim is correct. Unfortunately, this has already been fixed - as much as it kills me, there's not much I can do to fix this for Snow Leopard. -- ___ Python tracker __

[issue6938] Incorrect multiprocessing log string in managers.py (python 2.6.2)

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r74903; I used %r as the format code to match the formatting in create(). -- nosy: +georg.brandl resolution: -> fixed status: open -> closed ___ Python tracker

[issue6905] inspect.getargspec(print) fails

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: OK, that is reasonable. I changed this and several other same-style errors in r74901. -- ___ Python tracker ___ __

[issue6938] Incorrect multiprocessing log string in managers.py (python 2.6.2)

2009-09-18 Thread Zhang Cong
New submission from Zhang Cong : There is an issue in multiprocessing library. Lib/multiprocessing/managers.py:413: util.debug('disposing of obj with id %d', ident) It is '%d' here, but 'ident' is a string. This always cause an TypeError from logging module once enable logging on multiprocessi

[issue6934] [PATCH] postflight.framework script (from the Mac OS X .dmg installer) fails.

2009-09-18 Thread Ned Deily
Ned Deily added the comment: Issue5652 suggests removing the Mac/Tools references here and in trunk. -- nosy: +ned.deily ___ Python tracker ___ __

[issue5042] Structure sub-subclass does not initialize with base class positional arguments

2009-09-18 Thread Thomas Heller
Thomas Heller added the comment: > Is that any help? Not really ;-). Here is a patch I just wrote - it must still be checked for correctness, and tests for it must be added. I hope the comment in the code explains how it works. ctypes-structinit.patch -- keywords: +patch Added file:

[issue5652] OS X Installer: remove references to Mac/Tools which no longer exists

2009-09-18 Thread Ned Deily
Ned Deily added the comment: See also Issue6934 for Python3 fix. -- assignee: -> ronaldoussoren components: +Macintosh ___ Python tracker ___ ___

[issue6937] multiprocessing lock on OS X Snow Leopard dumps core

2009-09-18 Thread Tim Golden
Tim Golden added the comment: Don't know what exact release OS X ships with, but it looks like you're being bitten by this: http://bugs.python.org/issue5261 -- nosy: +tim.golden ___ Python tracker

[issue6508] expose setresuid

2009-09-18 Thread Martin v . Löwis
Martin v. Löwis added the comment: Your patch looks good (except that in getresuid, you seem to be missing return). I have no clue why it doesn't work; I'll see whether I can try it out on Linux within the next few weeks. The one puzzling detail is that you don't include a patch to pyconfig.

[issue6935] Version updates needed in tutorial

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: Fixed in r74897, r74898 (3.1). -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue6936] Import needed to quit Python?

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: And fixed now (I used ``quit()``) in r74896. -- resolution: works for me -> fixed ___ Python tracker ___ _

[issue6936] Import needed to quit Python?

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: They are meant for interactive use only. -- resolution: -> works for me status: open -> closed ___ Python tracker ___ ___

[issue6925] Doc for locals and vars

2009-09-18 Thread Georg Brandl
Georg Brandl added the comment: I'm sorry, I messed up the test. When "x" is not used in g(), it's of course *not* a free variable in g. This is the correct test: def f(): x = 1 def g(): print x print locals() g() f() -- ___ Python t