[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()

2009-03-02 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The UTF-7 codec implementation has a few problems (one of them is that it is hardly being used, so bugs only get detected very slowly). issue4426 has a patch with cleaned up and more standards compliant implementation. Perhaps that also fixes the problem wi

[issue5404] Cross-compiling Python

2009-03-02 Thread Joshua Kinard
New submission from Joshua Kinard : I'm attempting to get Python to cross-compile, and I'm not sure if this is an actual flaw in the build system or not, but thought I'd detail what I can here and seek comment from those in the know. What happens is under a cross-environment setup on a Gentoo in

[issue5135] Expose simplegeneric function in functools module

2009-03-02 Thread Kevin Teague
Kevin Teague added the comment: The problem with generic functions supporting ABCs is it's a bug with the way ABCs work and not a problem with the generic function implementation. The register() method of an ABC only fakes out isinstance checks, it doesn't actually make the abstract base class a

[issue5402] MutableMapping code smell (see OrderedDict)

2009-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I'm happy with Guido's design of MutableMapping. It parallels all the other ABCs in its design and it succeeds completely at its primary role as a defining an interface. Its secondary role is to provide some mixin capability. It does well in this rol

[issue5402] MutableMapping code smell (see OrderedDict)

2009-03-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyt

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Paul Moore
New submission from Paul Moore : There is no way to determine the list of classes for which issubclass(C, x) is true. The MRO of the class is fine for normal inheritance, but for ABCs it is possible to register classes which don't inherit from the ABC, so that you have a situation where issubclas

[issue2459] speedup for / while / if with better bytecode

2009-03-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I've updated for_iter.patch to the latest trunk, merging in issue 4715. > I also changed tracing a bit so that the first line of a loop doesn't > get traced twice in the first iteration, and added to test_dis to check > that decreasing line numbers work there.

[issue3924] cookielib chokes on non-integer cookie version, should ignore it instead

2009-03-02 Thread Henrik Olsson
Henrik Olsson added the comment: The cookiejar workaround in the first comment did not work for me. The cookies didn't stick in it. I guess version needs to be set.. this worked for me: class ForgivingCookieJar(cookielib.CookieJar): def _cookie_from_cookie_tuple(self, tup, request):

[issue5135] Expose simplegeneric function in functools module

2009-03-02 Thread Paul Moore
Paul Moore added the comment: I raised issue 5405. Armin Roachner commented over there that it's not even possible in principle to enumerate the ABCs a class implements because ABCs can do semantic checks (e.g., checking for the existence of a special method). So documenting the limitation is a

[issue5135] Expose simplegeneric function in functools module

2009-03-02 Thread Paul Moore
Changes by Paul Moore : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bug

[issue1355826] shutil.move() does not preserve ownership

2009-03-02 Thread Armin Ronacher
Armin Ronacher added the comment: While this is surprising, this is documented behavior: "If the destination is on the current filesystem, then simply use rename. Otherwise, copy src (with copy2()) to the dst and then remove src." And copy2() uses copystat() and does not copy "contents, owner,

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Armin Ronacher
Armin Ronacher added the comment: I don't think this can be solved. Not only do registered classes not show up (which could be fixed by providing something like inspect.getfakemro) but ABCs can also perform duck-type checks. For example a class with an __iter__ method is an instance of collect

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Armin Ronacher
Armin Ronacher added the comment: I suppose it would be a good idea to fix part of that problem in Sphinx (and probably also in pydoc) by adding something like ":implements: MutableMapping" in the docstring. So that this is explicitly added to the docstring and conforming tools can use this doc

[issue5135] Expose simplegeneric function in functools module

2009-03-02 Thread Paul Moore
Paul Moore added the comment: I raised issue 5405. Armin Ronacher commented over there that it's not even possible in principle to enumerate the ABCs a class implements because ABCs can do semantic checks (e.g., checking for the existence of a special method). So documenting the limitation is a

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Paul Moore
Paul Moore added the comment: Good point! So a documentation patch, to the effect that there is no way of determining which ABCs a given class is an instance of, would be an appropriate resolution, I guess. ___ Python tracker

[issue5235] distutils seems to only work with VC++ 2008 (9.0)

2009-03-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: Whether VC++ 2008 is required very much depends on what precisely you do in your extension. If you use a different compiler (in particular, a different CRT), chances are fair that the resulting extension crashes the interpreter. Users using a different compiler

[issue5404] Cross-compiling Python

2009-03-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: In short: cross-compilation is not supported at all, and it will be very very difficult to implement. Search this tracker for proposed solutions, and comment in each proposed solution whether it would help in your case. -- nosy: +loewis __

[issue2459] speedup for / while / if with better bytecode

2009-03-02 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: No particular reason for cPickle. It sometimes shows when we've caused problems by increasing the code size, and shows the size of any random effects that the compiler causes by moving code around. Could you double-check the patch to see if I did anything dumb?

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro
Skip Montanaro added the comment: Can't be applied to 2.5 at this point. I agree it's dumb to report the entire partial read and that reporting just the number of bytes read is a much better solution. Your patch looks fine to me as well, except you call resp.close() twice in test_incomplete_re

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro
Changes by Skip Montanaro : -- stage: needs patch -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue5404] Cross-compiling Python

2009-03-02 Thread Roumen Petrov
Changes by Roumen Petrov : -- nosy: +rpetrov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue5235] distutils seems to only work with VC++ 2008 (9.0)

2009-03-02 Thread Roumen Petrov
Changes by Roumen Petrov : -- nosy: +rpetrov ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Chris Withers
Chris Withers added the comment: Why can't it be applied to 2.5? No problem with the 2nd resp.close() being removed... ___ Python tracker ___

[issue5397] PEP 372: OrderedDict

2009-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: At Antoine's request, strengthened the tests in test_copying. -- assignee: -> rhettinger Added file: http://bugs.python.org/file13229/od6.diff ___ Python tracker __

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: The Python 2.5 branch is closed for bug fixes; no further bug fix releases of Python 2.5 will be made. Only security fixes can be accepted on the 2.5 branch. -- nosy: +loewis ___ Python tracker

[issue5385] mmap can crash after resize failure (windows)

2009-03-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Or, use NULL as invalid handle value for map handle instead of INVALID_HANDLE_VALUE. Maybe this is simpler. -- keywords: +patch Added file: http://bugs.python.org/file13230/fix_mmap_resize_v2.patch ___ Python trac

[issue5404] Cross-compiling Python

2009-03-02 Thread Joshua Kinard
Joshua Kinard added the comment: Gotcha, I'll poke around and see what I can find. Are you guys open to patches for 2.5.x still if we find something that needs patching (versus passing lots of variables to the make process)? ___ Python tracker

[issue5404] Cross-compiling Python

2009-03-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Gotcha, I'll poke around and see what I can find. Are you guys open to > patches for 2.5.x still if we find something that needs patching (versus > passing lots of variables to the make process)? No. The Python 2.5 branch is closed; the 2.6 branch doesn't a

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro
Skip Montanaro added the comment: Chris> Why can't it be applied to 2.5? Benjamin can correct me if I'm wrong, but I thought the last 2.5 release was the last full release planned. Certainly if another full 2.5 release is in the cards then the patch should go there as well. Skip

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Skip Montanaro
Skip Montanaro added the comment: Martin> The Python 2.5 branch is closed for bug fixes; no further bug Martin> fix releases of Python 2.5 will be made. Only security fixes can Martin> be accepted on the 2.5 branch. So all Chris has to do to get this applied to 2.5 is craft an exploit b

[issue5404] Cross-compiling Python

2009-03-02 Thread Joshua Kinard
Joshua Kinard added the comment: Gotcha. Not sure how far off Gentoo is from supporting 2.6 -- our primary package manager relies on it, so the updates tend to be slow. for moving to new versions. Do you guys maintain any kind of an "internals" guide to the build system anywhere? Like an outl

[issue5406] asyncore doc issue

2009-03-02 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : About asyncore.loop()'s count parameter: > The count parameter defaults to None, resulting in the loop > terminating only when all channels have been closed This is incorrect and it's not what count parameter actually does. I'd come up with a patch but I

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: > So all Chris has to do to get this applied to 2.5 is craft an exploit based > on the current behavior, right? ;-) Right :-) Of course, security patches should see a much more careful review than regular bug fixes. ___ Pyt

[issue5404] Cross-compiling Python

2009-03-02 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Do you guys maintain any kind of an "internals" guide to the build > system anywhere? Like an outline or such of what happens from start to > finish when you run setup.py (I think that's the start, anyways)? Besides the code, and besides the very high-level

[issue5403] test_md5 segfault

2009-03-02 Thread Greg Bakker
Changes by Greg Bakker : -- nosy: +gregb ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue5135] Expose simplegeneric function in functools module

2009-03-02 Thread Nick Coghlan
Nick Coghlan added the comment: Given the point Armin raised, I once again agree that documenting the limitation is a reasonable approach. Longer-term, being able to subcribe to ABCs (and exposing the registration list if it isn't already visible) is likely to be the ultimate solution.

[issue5405] There is no way of determining which ABCs a class is registered against

2009-03-02 Thread Nick Coghlan
Nick Coghlan added the comment: While a complete solution isn't possible, at least supporting querying of explicit registrations would be an improvement over the status quo (since an implicit registration can always be turned into an explicit one, but a registration can't always be turned into i

[issue5397] PEP 372: OrderedDict

2009-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Attaching update reflecting Guido's change to __eq__(). Added file: http://bugs.python.org/file13231/od7.diff ___ Python tracker ___

[issue5397] PEP 372: OrderedDict

2009-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Checked-in r70101 and r70102 -- resolution: -> accepted status: open -> closed ___ Python tracker ___ __

[issue5397] PEP 372: OrderedDict

2009-03-02 Thread Raymond Hettinger
Changes by Raymond Hettinger : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyt

[issue1533164] Installed but not listed *.pyo break bdist_rpm

2009-03-02 Thread Martin v. Löwis
Changes by Martin v. Löwis : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue5397] PEP 372: OrderedDict

2009-03-02 Thread Armin Ronacher
Armin Ronacher added the comment: Maybe premature optimization but maybe it would make sense to implement __eq__ like this: def __eq__(self, other): if isinstance(other, OrderedDict): if not dict.__eq__(self, other): return False return all(p == q for p, q in _zi

[issue5389] Uninitialized variable may be used in PyUnicode_DecodeUTF7Stateful()

2009-03-02 Thread Guido van Rossum
Guido van Rossum added the comment: It looks like it was fixed in 2.6 by adding an assignment to startinpos to this block: else if (SPECIAL(ch,0,0)) { startinpos = s-starts; /* <-- This was added */ errmsg = "unexpected special character"; s++

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Raymond Hettinger
New submission from Raymond Hettinger : The build crashes and it seems related to io.py. This started about two weeks ago. Before that, it built fine. -- Build started: Project: _ssl, Configuration: Release Win32 -- Performing Pre-Build Event... Traceback (most recent call last): Fi

[issue4308] repr of httplib.IncompleteRead is stupid

2009-03-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: Applied with a few tweaks in r70107. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ __

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't reproduce under Visual Studio Express 2008, release mode. I suspect it may be due to r69560/r69793 (introduction of a Windows-specific function named _PyVerify_fd()). ___ Python tracker

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +krisvale ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ocean-city ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue1641] asyncore delayed calls feature

2009-03-02 Thread Forest Wilkinson
Forest Wilkinson added the comment: I'm looking forward to having this functionality in asyncore. It would help me remove some unwanted hackery from my own code. Giampaolo, I'm concerned that your patch uses a global 'tasks' list which cannot be overriden. Shouldn't loop() accept an optional

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: pitrou -> krisvale ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue5408] test_osx_env failing

2009-03-02 Thread Benjamin Peterson
New submission from Benjamin Peterson : Mac OS 10.4 PPC debug build test_osx_env [31492 refs] Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: can't initialize sys standard streams I

[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2009-03-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r70112. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

[issue4626] compile() doesn't ignore the source encoding when a string is passed in

2009-03-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: Should this be backported? ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue5408] test_osx_env failing

2009-03-02 Thread Ned Deily
Changes by Ned Deily : -- nosy: +nad ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

[issue1580] Use shorter float repr when possible

2009-03-02 Thread Noam Raphael
Noam Raphael added the comment: Do you mean msg58966? I'm sorry, I still don't understand what's the problem with returning f_15(x) if eval(f_15(x)) == x and otherwise returning f_17(x). You said (msg69232) that you don't care if float(repr(x)) == x isn't cross-platform. Obviously, the simple m

[issue1580] Use shorter float repr when possible

2009-03-02 Thread Guido van Rossum
Guido van Rossum added the comment: I changed my mind on the cross-platform requirement. ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue4565] Rewrite the IO stack in C

2009-03-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reviewers: , Description: The diff between the py3k and io-c branches, for whoever wants to review it. Please review this at http://codereview.appspot.com/22061 Affected files: Doc/library/io.rst Lib/_pyio.py Lib/importlib/__init__.py Lib/importli

[issue1597850] Cross compiling patches for MINGW

2009-03-02 Thread Joshua Kinard
Joshua Kinard added the comment: Anyone gotten farther on getting Python-2.5.x to cross-compile? I'm trying to get x86_64-pc-linux-gnu --> mipsel-unknown-linux-gnu, and after some hacking at the last updated cross-2.5.1.patch, plus a fix for the %zd printf bugaboo, plus adding in config.sub/con

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I didn't know that VS2005 was supported. We jumped from 2003 to 2008, didn't we? Anyway, I'll fix this, we can't have things crashing. ___ Python tracker

[issue5364] documentation in epub format

2009-03-02 Thread Keith Fahlgren
Keith Fahlgren added the comment: > I got the same impression: xhtml + extra markup for mobile readers. ePub is indeed based heavily on XHTML 1.1 and CSS and uses a fairly simple ZIP container. Having written DocBook->ePub tools, I'm happy to help anyone interested in doing rst2epub. -

[issue5409] ConfigParser get methods broken

2009-03-02 Thread Sylvain Rabot
New submission from Sylvain Rabot : Python 3.0 (r30:67507, Dec 3 2008, 20:14:27) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. Personal firewall software may warn abo

[issue5409] ConfigParser get methods broken

2009-03-02 Thread Sylvain Rabot
Sylvain Rabot added the comment: My bad, ConfigParser.set() needs string values apparently. ___ Python tracker ___ ___ Python-bugs-list mailing

[issue5408] test_osx_env failing

2009-03-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: Is this a standard unix build or a framework build? ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Okay, I have submitted revision 70119 that fixes this. This is most weird, though. It is as though the non-_DEBUG crt doesn't match the headers supplied with the CRT sources that come with visual studio 2005. One possible reason is that there is some

[issue5408] test_osx_env failing

2009-03-02 Thread Ned Deily
Ned Deily added the comment: It appears the test doesn't work correctly for non-framework builds, something I didn't test. A patch is forthcoming. ___ Python tracker ___ ___

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: The fix works for me. It all builds once again :-) ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: Sorry for interruption. Maybe is this CRT internal hack needed for debug build only? I believe _ASSERTE is only enabled for debug build. ___ Python tracker __

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: For me, it was the release builds that were failing. With the fix just added, all is well now. ___ Python tracker ___ ___

[issue5403] test_md5 segfault

2009-03-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: This one was fixed in r70119. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: no, r69560/r69793 also removed the call to _set_invalid_parameter_handler(). The default parameter handling is now left alone in the crt which will throw up a dialogue box both in the release and debug versions. Anyway, the issue (strange block layo

[issue5336] collections.namedtuple generates code causing PyChecker warnings

2009-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Fixed in r70106 and r70121 as part of converting _asdict() to return an OrderedDictionary. Leaving 2.6 and 3.0 as-is. -- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.1 -Python 2.6

[issue5407] Broken Py3.1 release build in Visual Studio 2005

2009-03-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: OK, sorry for interruption. ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue5408] test_osx_env failing

2009-03-02 Thread Ned Deily
Ned Deily added the comment: ANALYSISIn a non-framework build, when PYTHONEXECUTABLE is set to a invalid value, getpath.c is unable to determine appropriate values for sys.prefix and sys.path so the interpreter fails in initialization. SOLUTIONSimplif