[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-16 Thread R. David Murray
R. David Murray added the comment: Well, if you want backward compatibility, you pretty much have to keep it as is, don't you? This is the only time I've used load_source, and it was used because we didn't want to bother mucking with the path but did want to load the module whose file system

[issue4130] Intel icc 9.1 does not support __int128_t used by ctypes

2012-04-16 Thread Alex Leach
Alex Leach added the comment: Thanks for the assurance. I found it strange because compilation only fails when building shared binaries. My static build of Python-2.7.3, with icc seems to work fine, except for this libffi issue. Turns out I needed dejagnu to run the tests in libffi's `make ch

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Stefan Behnel
Stefan Behnel added the comment: It turns out that it wasn't all that hard to work around. Calling __import__ twice seems to do the trick. It's more overhead, but if people want speed, they can just be explicit about what kind of import they actually mean. So I wouldn't mind considering this

[issue14580] imp.reload can fail for sub-modules

2012-04-16 Thread Jim Jewett
Jim Jewett added the comment: (Note that the two patches are not cumulative; both would need to be applied.) -- nosy: +Jim.Jewett stage: -> patch review ___ Python tracker ___

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-16 Thread Guy Taylor
Guy Taylor added the comment: @murray The thing I would be worried at in both supporting truncate(0) and truncate(size=0) would be truncate(0, size=1). This could throw an exception but causes the need for extra sanity checks and introduces ambiguity in the otherwise 'only one way to do somet

[issue13579] string.Formatter doesn't understand the a conversion specifier

2012-04-16 Thread Éric Araujo
Éric Araujo added the comment: To be exact, the specifier is "a", without "!" which is a delimiter. :) -- nosy: +eric.araujo title: string.Formatter doesn't understand the !a conversion specifier -> string.Formatter doesn't understand the a conversion specifier ___

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-16 Thread R. David Murray
R. David Murray added the comment: I think you misunderstand the way that python arguments work. If you have a function so: def func(size=None): Then func(0) and func(size=0) are equivalent, and func(0, size=0) is a TypeError because you've provided two arguments instead of just one. The

[issue14087] multiprocessing.Condition.wait_for missing

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Charles-François, will you take this one? :) -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: Well, I want backwards-compatibility *now*, not forever. And no, it is not an obvious API as you are asking for what loaders are supposed to do; load a module, which is why the one-liner I gave you works today. Finder simply find a loader that can load somethin

[issue14600] Change ImportError reference handling, naming

2012-04-16 Thread Brian Curtin
New submission from Brian Curtin : Antoine mentioned in email that the reference handling should be changed, so here's a shot at it. I also condensed and renamed the convenience functions - I was paying too much attention to the surrounding conventions and made this harder than it had to be.

[issue13476] Simple exclusion filter for unittest autodiscovery

2012-04-16 Thread Gustavo Arzola
Gustavo Arzola added the comment: I use netatalk so that I can edit my projects on my laptop (Mac) but run them on my server (Linux). Netatalk creates all kinds of .AppleDouble sub-directories that contain files with the same names as the parents, but generally hold icon, desktop location, a

[issue14599] Windows test_import failure

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: Issue #14581 covers the .PY failure (still looking for input on that one). The path failure is from http://hg.python.org/cpython/rev/f341b99bb370 which Brian committed. The test_reprlib failure is because of a race condition where an importlib.invalidate_cache

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: Yeah, the fix is dead-simple, import with level=1 and if that fails import with level=0. I plan to cover this specific issue in the "What's New" for Python 3.3. -- ___ Python tracker

[issue14599] Windows test_import failure

2012-04-16 Thread Brian Curtin
Brian Curtin added the comment: Not sure why test_extension_import_fail is failing - not seeing that here. -- ___ Python tracker ___

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Incidentally, Looking at this, I noticed code such as: (textio.c) static int _textiowrapper_clear(textio *self) { if (self->ok && _PyIOBase_finalize((PyObject *) self) < 0) return -1; This shows something scary: During a GC run, it is poss

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > static int > _textiowrapper_clear(textio *self) > { > if (self->ok && _PyIOBase_finalize((PyObject *) self) < 0) > return -1; > > This shows something scary: During a GC run, it is possible to invoke > the "close()" method on a textio object. T

[issue14601] PEP sources not available as documented

2012-04-16 Thread Jim Jewett
New submission from Jim Jewett : PEP 12 states: """ To get the source this (or any) PEP, look at the top of the HTML page and click on the date & time on the "Last-Modified" line. It is a link to the source text in the Python repository. """ Unfortunately, the link actually goes to SVN, which

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-16 Thread Guy Taylor
Guy Taylor added the comment: Looking through cpython and trying to form a patch I found several differing interpretations of truncate: Lib/_pyio.py def truncate(self, pos=None): Modules/_io/fileio.c PyDoc_STRVAR(truncate_doc, "truncate([size: int]) ..."); A first semi-working patch is att

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: __del__ methods are never invoked from GC. All objects that have finalizers, and all objects reachable from them _must_ be put in gc.garbage. If I'm not mistaken, this is a fundamental rule of python's gc module and it is not because of the unknown or

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-16 Thread Guy Taylor
Guy Taylor added the comment: Sorry had not refreshed the page to pick up the last comment. After reading more the cpython code I get what you are saying now. Not a fan of that syntax but consistency is best. This is my first time working with cpython directly, I have only worked on small pyt

[issue9141] Allow objects to decide if they can be collected by GC

2012-04-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I've stumbled upon further cases of this problem, and a possible serious bug in python 3. the _PyIOBase_finalize() will invoke a "close" method on the object if the object isn't closed. This is the same as the object having a __del__ method. Yet, th

[issue14602] OSX Build Target

2012-04-16 Thread Andrew Thompson
New submission from Andrew Thompson : I could not get Python3 to build on my OSX 10.6.8 box as per the instructions on the website (or those in the README). It "configures" , but does not "make" : IOError: $MACOSX_DEPLOYMENT_TARGET mismatch: now "10.4" but "10.5" during configure make:

[issue14602] OSX Build Target

2012-04-16 Thread Andrew Thompson
Changes by Andrew Thompson : -- assignee: -> ronaldoussoren components: +Macintosh nosy: +ronaldoussoren type: -> compile error ___ Python tracker ___ _

[issue14586] TypeError: truncate() takes no keyword arguments

2012-04-16 Thread Georg Brandl
Georg Brandl added the comment: The patch is wrong: PyArg_ParseTupleAndKeywords already handles the correct assignment of positional and keyword args, and raises exceptions accordingly. Did you test that code? The question is also: why only truncate()? There are several other fileio_* metho

[issue8212] A tp_dealloc of a subclassed class cannot resurrect an object

2012-04-16 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Here is a patch with the suggested change. I put _PyObject_ResurrectFromDealloc into typeobject.c since it seems more at home there than in object.c, but I'm not sure. Also note that other types, that were calling _PyIOBase_finalize() from their tp_dea

[issue14601] PEP sources not available as documented

2012-04-16 Thread STINNER Victor
STINNER Victor added the comment: The templates have been fixed 1 year ago, when we moved from SVN to HG. I suppose that the bot has an old local copy of the template (Python scripts to compile reST to HTML). But who owns the robot? :-) -- nosy: +haypo, loewis ___

[issue14601] PEP sources not available as documented

2012-04-16 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue14600] Change ImportError reference handling, naming

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good on the principle. Implementation is a bit weird: you don't need to check name and path for NULL-ness? -- ___ Python tracker ___ ___

[issue14600] Change ImportError reference handling, naming

2012-04-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, and is PyErr_SetExcWithArgsKwargs still useful? -- ___ Python tracker ___ ___ Python-bugs-list

[issue14583] try/except import fails --without-threads

2012-04-16 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14599] Windows test_import failure

2012-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset eae7cc54d28b by Brett Cannon in branch 'default': Issue #14599: Make test_reprlib robust against import cache race http://hg.python.org/cpython/rev/eae7cc54d28b -- nosy: +python-dev ___ Python tracker <

[issue14599] Windows test_import failure

2012-04-16 Thread Brett Cannon
Brett Cannon added the comment: I think the failure is from a cache race condition. Hopefully the invalidate_caches() call will fix things. -- ___ Python tracker ___ __

[issue14599] Windows test_import failure

2012-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 00a07720a570 by Brett Cannon in branch 'default': Issue #14599: Fix an import caching race condition. http://hg.python.org/cpython/rev/00a07720a570 -- ___ Python tracker

[issue14602] OSX Build Target

2012-04-16 Thread Martin v . Löwis
Martin v. Löwis added the comment: Please understand that the bug tracker is not a place to ask questions; use python-l...@python.org for that. To still answer your last question: newbie OSX developers are advised to prefer released versions of Python, as they will have build issues fixed tha

[issue13959] Re-implement parts of imp in pure Python

2012-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3b5b4b4bb43c by Brett Cannon in branch 'default': Issue #13959: Re-implement imp.load_source() in imp.py. http://hg.python.org/cpython/rev/3b5b4b4bb43c -- ___ Python tracker

[issue14600] Change ImportError reference handling, naming

2012-04-16 Thread Brian Curtin
Brian Curtin added the comment: How about this patch? Adds NULL checking and merges PyErr_SetExcWithArgsKwargs inside PyErr_SetImportError since it's not needed by itself. Docs are also updated in line with these changes. -- Added file: http://bugs.python.org/file25248/issue14600.diff

[issue14603] List comprehension in zipfile.namelist

2012-04-16 Thread Dum Dum
New submission from Dum Dum : Use list comprehension in namelist() method of zipfile module. -- components: Library (Lib) files: zipfile.patch keywords: patch messages: 158524 nosy: Dum.Dum priority: normal severity: normal status: open title: List comprehension in zipfile.namelist type:

[issue14602] OSX Build Target

2012-04-16 Thread Ned Deily
Ned Deily added the comment: The problem you are seeing is due to two separate issues. (1) The first time you build Python 3 in a particular build directory, the Abstract Syntax Definition Language (asdl) parser build step may be unnecessarily run by "make" if the time stamps of the source f

[issue14602] Python build fails on OS X with "$MACOSX_DEPLOYMENT_TARGET mismatch"

2012-04-16 Thread Ned Deily
Changes by Ned Deily : -- assignee: -> ronaldoussoren components: -Devguide stage: -> committed/rejected title: OSX Build Target -> Python build fails on OS X with "$MACOSX_DEPLOYMENT_TARGET mismatch" versions: -Python 2.7 ___ Python tracker

[issue14603] List comprehension in zipfile.namelist

2012-04-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset cac63f6ad252 by Ezio Melotti in branch 'default': #14603: use a listcomp in ZipFile.namelist. http://hg.python.org/cpython/rev/cac63f6ad252 -- nosy: +python-dev ___ Python tracker

[issue14603] List comprehension in zipfile.namelist

2012-04-16 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! -- assignee: -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue2771] Test issue

2012-04-16 Thread Ezio Melotti
Ezio Melotti added the comment: Testing links: http://bugs.python.org/issue2771 http://bugs.python.org/issue2771. http://bugs.python.org/issue2771, http://bugs.python.org/issue2771; http://bugs.python.org/issue2771: http://bugs.python.org/issue2771! (http://bugs.python.org/issue2771) [http://bug

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Stefan Behnel
Stefan Behnel added the comment: > Yeah, the fix is dead-simple, import with level=1 and if that fails import > with level=0. With one caveat: relative imports don't work outside of packages, so the importing code has to know when it's in a package or not. Otherwise, the relative import would

[issue14592] old-style (level=-1) importing broken after importlib changes

2012-04-16 Thread Stefan Behnel
Stefan Behnel added the comment: Hmm, interesting - it stripped the command from my e-mail. I was doing this: >>> __import__("sys", level=1) Traceback (most recent call last): File "", line 1, in SystemError: error return without exception set -- ___

[issue13959] Re-implement parts of imp in pure Python

2012-04-16 Thread Eric Snow
Eric Snow added the comment: This is a mostly-working sketch of find_module() in imp.py. I've run out of time tonight, but wanted to get it up in case it's useful to anyone else (a.k.a Brett). If nobody's touched it before then, I'll finish it up tomorrow. -- Added file: http://bugs

[issue10486] http.server doesn't set all CGI environment variables

2012-04-16 Thread Glenn Linderman
Glenn Linderman added the comment: Reading the CGI 1.1 spec, it says: The QUERY_STRING value provides the query-string part of the Script-URI. (See section 3.3). The server MUST set this variable; if the Script-URI does not include a query component, the QUERY_STRING MUST be defin

<    1   2