[issue4903] binascii.crc32() - document signed vs unsigned results

2009-01-10 Thread Gregory P. Smith
Gregory P. Smith added the comment: Agreed, we failed to mention the behavior change in the docs. I'll take care of that. (if its mentioned at all, its mentioned in a note buried in the Misc/NEWS file somewhere) 2to3 could presumably be made to notice crc32 and adler32 calls and warn about

[issue4914] trunc(x) erroneously documented as built-in

2009-01-10 Thread Mitchell Model
New submission from Mitchell Model : In the Numeric Types documentation for 2.6, 3.0, and 3.1 trunc is documented as a built-in, like round, but while there is a trunc in math there is no built-in trunc. Read some of the debate on trunc from a year ago convinced me that this discrepancy is a d

[issue4789] Documentation changes break existing URIs

2009-01-10 Thread Mark Sapiro
Mark Sapiro added the comment: Thank you for adding the redirects, and for getting them right in spite of my garbling some of them in the original report. I have updated the links for the next Mailman release. ___ Python tracker

[issue4796] Decimal to receive from_float method

2009-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: Go ahead with the update, but it isn't really necessary. The PEPs are for getting something into the language in the first place and for centralizing a major discussion. They typically get out of date quickly after they've been implemented. In this case, w

[issue2486] Recode (parts of) decimal module in C

2009-01-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: FWIW, I'm currently seeking project sponsorship to work on this. To do it right, a substantial portion of the module should be coded in C and needs to function independently of Python, with accessors provided to for Python to wrap around. Once, there is a f

[issue4753] Faster opcode dispatch on gcc

2009-01-10 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue4913] wave.py writes 16 bit sample files of half the correct duration

2009-01-10 Thread Alex Robinson
New submission from Alex Robinson : Corrected code in writeframesraw(): self._datawritten = self._datawritten + len(data) * self._sampwidth else: self._file.write(data) self._datawritten = self._datawritten + len(data) * self._sampwidth Note that the

[issue4279] Module 'parser' fails to build

2009-01-10 Thread Yaakov (Cygwin Ports)
Yaakov (Cygwin Ports) added the comment: Here's the patch I used for the Cygwin Ports 2.6 and 3.0 packages. It's the simplest working solution that I could find. Added file: http://bugs.python.org/file12682/2.6.1-parsermodule.patch ___ Python tracker

[issue4288] parsermodule and grammar variable

2009-01-10 Thread Mark Sapiro
Changes by Mark Sapiro : -- nosy: +msapiro ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue4279] Module 'parser' fails to build

2009-01-10 Thread Mark Sapiro
Mark Sapiro added the comment: This problem also occurs when building the 2.6.1 parser module on Cygwin 1.5.25. It did not occur with Python 2.6 or 2.5.x. The error from 'make' is building 'parser' extension gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-1.5.25-i686-2.6/cygdrive/c/

[issue4912] Invalid syntax in ctypes/util.py

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r68511. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4912] Invalid syntax in ctypes/util.py

2009-01-10 Thread Antoine Pitrou
New submission from Antoine Pitrou : ctypes/util.py contains invalid py3k syntax at lines 106-107: if rv == 10: raise OSError, 'gcc or cc command not found' -- assignee: theller components: ctypes messages: 79582 nosy: pitrou, theller severity: normal status: open ti

[issue4910] Should both nb_long and nb_int still exist in 3.x?

2009-01-10 Thread Mark Dickinson
Mark Dickinson added the comment: long(x) replaced by int(x) in r68508. I'm still wondering about the nb_long slot, though. -- title: help(int.__long__) refers to nonexistent long function -> Should both nb_long and nb_int still exist in 3.x? ___ P

[issue4796] Decimal to receive from_float method

2009-01-10 Thread Mark Dickinson
Mark Dickinson added the comment: I agree the PEP should be updated. Your proposed update looks good to me. ___ Python tracker ___ ___ Python-

[issue4796] Decimal to receive from_float method

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Raymond, Mark, thanks for this work! I'd include the following in the PEP (under the "from float" discussion), what do you think? """ Update: The .from_float() method was added to Python 2.7 and 3.1 versions, providing lossless and exact conversion from float

[issue4908] adding a get_metadata in distutils

2009-01-10 Thread Ray
Changes by Ray : -- nosy: +rayterrill ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mai

[issue4909] incorrect renaming in imports

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Ok. I will close this for now. This is a very common construct; if we get more bug reports, we can reconsider. (I'm attaching the patch I used to "fix" this for future reference.) -- keywords: +patch resolution: -> wont fix status: open -> closed Ad

[issue4909] incorrect renaming in imports

2009-01-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: If there is no straight-forward solution, we should close it as "won't fix", and encourage users to work around. ___ Python tracker ___

[issue4909] incorrect renaming in imports

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Tricky. I only solution I can think of is replacing cStringIO with _stringio or just refusing to replace StringIO usage once cStringIO has been seen. The latter seems like the best solutions. -- nosy: +benjamin.peterson _

[issue4608] urllib.request.urlopen does not return an iterable object

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Senthil, do you think you could provide a test case for this? Thank you! -- assignee: -> facundobatista nosy: +facundobatista ___ Python tracker

[issue4607] uuid behavior with multiple threads

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Yes, _buffer is not longer global. Thanks for the report! -- nosy: +facundobatista resolution: -> out of date status: open -> closed ___ Python tracker _

[issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Everything looks ok, with one detail, the new set_tunnel() function. Should this function be public? If yes, new documentation should be added. If not, it should start with "_". I think that it should be public, because we're using it from somewhere else. So

[issue4910] help(int.__long__) refers to nonexistent long function

2009-01-10 Thread Mark Dickinson
New submission from Mark Dickinson : In Python 3.x: >>> int.__long__.__doc__ 'x.__long__() <==> long(x)' But the long builtin no longer exists. I'm actually not sure why the nb_long slot still exists in 3.x at all. Can anyone enlighten me? -- messages: 79571 nosy: marketdickinson se

[issue2396] Backport memoryview object to Python 2.7

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: This new patch includes documentation update and fixes as well. Added file: http://bugs.python.org/file12679/memview-trunk2.patch ___ Python tracker ___

[issue1251] ssl module doesn't support non-blocking handshakes

2009-01-10 Thread Facundo Batista
Facundo Batista added the comment: Bill, should this issue be closed? Or Senthil found a bug in the actual code and you're waiting for him to point out where is the problem or a way to reproduce it? -- nosy: +facundobatista ___ Python tracker

[issue2396] Backport memoryview object to Python 2.7

2009-01-10 Thread Thomas Heller
Changes by Thomas Heller : -- nosy: +theller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4909] incorrect renaming in imports

2009-01-10 Thread Martin v. Löwis
New submission from Martin v. Löwis : The fragment try: import cStringIO as StringIO except ImportError: import StringIO s=StringIO.StringIO() gets rewritten to try: import io as StringIO except ImportError: import io s=io.StringIO() Unfortunately, that code fails to work: the

[issue3871] cross and native build of python for mingw32 with distutils

2009-01-10 Thread Roumen Petrov
Changes by Roumen Petrov : Added file: http://bugs.python.org/file12678/python-trunk.patch-MINGW-20090110 ___ Python tracker <http://bugs.python.org/issue3871> ___ ___

[issue3754] minimal cross-compilation support for configure

2009-01-10 Thread Roumen Petrov
Changes by Roumen Petrov : Added file: http://bugs.python.org/file12677/python-trunk.patch-CROSS-20090110 ___ Python tracker <http://bugs.python.org/issue3754> ___ ___

[issue2233] Makefile.pre.in contains extra slash before $(DESTDIR) which can cause Cygwin build to fail

2009-01-10 Thread Roumen Petrov
Roumen Petrov added the comment: Jason, did you test what is result is DESTDIR default to "/". This variable(macro) is used with specific syntax by example (from Makefile): $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$b; \ where $$b is absolute path. ___ Python

[issue2486] Recode (parts of) decimal module in C

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > By the way, presumably it's not a prerequisite for (2) that *all* of the > decimal.py functionality be recoded in C? I could imagine a situation > where the decimal literals are present in the core, but an 'import > decimal' was necessary to get complete f

[issue2486] Recode (parts of) decimal module in C

2009-01-10 Thread Mark Dickinson
Mark Dickinson added the comment: > (2) Bring proposals to add a decimal literal to C ... That should be "to Python", not "to C", of course. ___ Python tracker ___ __

[issue4884] Work around gethostbyaddr_r bug

2009-01-10 Thread Jeffrey Yasskin
Jeffrey Yasskin added the comment: socket_gethostbyname_ex() calls gethostbyname_r() rather than gethostbyaddr_r(), and that appears not to have the bug. ___ Python tracker ___ __

[issue2486] Recode (parts of) decimal module in C

2009-01-10 Thread Mark Dickinson
Changes by Mark Dickinson : -- assignee: facundobatista -> marketdickinson title: Decimal slowdown in 3.0 due to str/unicode changes -> Recode (parts of) decimal module in C ___ Python tracker _

[issue2486] Decimal slowdown in 3.0 due to str/unicode changes

2009-01-10 Thread Mark Dickinson
Mark Dickinson added the comment: Changing title and assignee. (But all help is appreciated: if anyone wants to commit changes to the sandbox directory, please go ahead!) ___ Python tracker __

[issue2486] Decimal slowdown in 3.0 due to str/unicode changes

2009-01-10 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue4908] adding a get_metadata in distutils

2009-01-10 Thread Tarek Ziadé
New submission from Tarek Ziadé : Let's add a "get_metadata" API in Distutils that would return in a dictionary the content of the .egg-info file introduced into Python 2.5. >>> from distutils import get_metadata >>> get_metadata('ThePackage') {..} (Working on a prototype) -- as

[issue1777] ElementTree/cElementTree findtext inconsistency

2009-01-10 Thread Fredrik Lundh
Fredrik Lundh added the comment: Forgot to mention that this is fixed in the cElementTree trunk (public as of today's 1.0.6 preview release). Will merge with Python trunk when I find the time... ___ Python tracker

[issue2486] Decimal slowdown in 3.0 due to str/unicode changes

2009-01-10 Thread Mark Dickinson
Mark Dickinson added the comment: (Adding Raymond to the nosy list.) In r68494, I've checked in some work towards rewriting Decimal (or parts of Decimal) in C. I reused Facundo's old /decimal directory in the sandbox, so the URL is: http://svn.python.org/view/sandbox/trunk/decimal/decimal_i

[issue2396] Backport memoryview object to Python 2.7

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. Some remarks: - I had to disable a few tests in test_memoryview.py, mainly because array.array does not support the new buffer API in 2.x - I kept the PyBytes_* aliases in memoryobject.c rather than using the PyString_* equivalents. Is it ok? -

[issue4901] inconsistent API docs for tp_iter

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the report! Fixed in r68495. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue3383] ctypes.util fails to find libc in some environments

2009-01-10 Thread Matthias Klose
Matthias Klose added the comment: I keep this open for now, I don't have access to AIX. Yes, if objdump is found in some /sbin PATH, then maybe we should search there explicitely. ___ Python tracker

[issue4861] fix problems with ctypes.util.find_library

2009-01-10 Thread Matthias Klose
Matthias Klose added the comment: now fixed in 2.6, 2.7, 3.0 and 3.1. objdump is never installed in /sbin. I don't think we should assume a specific path for objdump. we don't do this for gcc either. -- assignee: theller -> doko resolution: -> fixed status: open -> closed ___

[issue4904] Typo for PickingError in pickle.py

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the report! Fixed in r68488. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue4907] ast.literal_eval does not properly handled complex numbers

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Looks good to me assuming you add a test. -- keywords: -needs review nosy: +benjamin.peterson ___ Python tracker ___ ___

[issue4472] Is shared lib building broken on trunk for Mac OS X?

2009-01-10 Thread Skip Montanaro
Skip Montanaro added the comment: Works for me. Thanks Ronald. Closing... -- assignee: -> ronaldoussoren status: pending -> closed ___ Python tracker ___ _

[issue4879] Allow buffering for HTTPResponse

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why not name the parameter buffering=False rather than nobuffer=True? Sounds more "natural" to me. -- nosy: +pitrou ___ Python tracker ___ _

[issue3860] GzipFile and BZ2File should support context manager protocol

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in trunk and py3k. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4907] ast.literal_eval does not properly handled complex numbers

2009-01-10 Thread Armin Ronacher
Armin Ronacher added the comment: fixed patch :) Added file: http://bugs.python.org/file12675/literal-eval.patch ___ Python tracker ___ ___ Py

[issue4868] Faster utf-8 decoding

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I committed the patch with the last suggested change (word -> data) in py3k (r68483). I don't intend to backport it to trunk, but I suppose it wouldn't be too much work to do. -- resolution: -> fixed status: open -> closed

[issue4907] ast.literal_eval does not properly handled complex numbers

2009-01-10 Thread Armin Ronacher
New submission from Armin Ronacher : ast.literal_eval does not properly handle complex numbers: >>> ast.literal_eval("1j") 1j >>> ast.literal_eval("2+1j") Traceback (most recent call last): ... ValueError: malformed string >>> ast.literal_eval("(2+1j)") Traceback (most recent call last): ...

[issue1767370] Make xmlrpc use HTTP/1.1 and keepalive

2009-01-10 Thread williambr
williambr added the comment: Hi. I am very intereasted about this patch... specially about the keep-alive part... I have a proposition... wouldn't be fair enough to have a separated Transport just for keep-alive connections? I could wirte one if no one is against it... -- nosy: +willi

[issue4884] Work around gethostbyaddr_r bug

2009-01-10 Thread Roumen Petrov
Roumen Petrov added the comment: What about socket_gethostbyname_ex() ? -- nosy: +rpetrov ___ Python tracker ___ ___ Python-bugs-list

[issue4753] Faster opcode dispatch on gcc

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > (First culprit might > be license/compatibility problems I guess, but the speedup would be > worth the time to fix the troubles IMHO). That would be the obvious reason IMO. And Intel is the only one who can "fix the troubles". ___

[issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers

2009-01-10 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: The patch replaces remaining magic numbers with INVALID_FILE_ATTRIBUTES. -- keywords: +patch Added file: http://bugs.python.org/file12673/python-2.7-fileattrib-magic.0.patch ___ Python tracker

[issue4906] os.listdir fails on debug build (windows)

2009-01-10 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Checked in: Completed: At revision: 68476 -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue4903] binascii.crc32()

2009-01-10 Thread David M. Beazley
David M. Beazley added the comment: Placing a note in the standard library documentation would be a start. Just say in Python 3.0 it always returns the result as an unsigned integer whereas in Python 2.6 a 32-bit signed integer is returned. Although the numerical value may differ between ve

[issue4753] Faster opcode dispatch on gcc

2009-01-10 Thread Paolo 'Blaisorblade' Giarrusso
Paolo 'Blaisorblade' Giarrusso added the comment: > Same for CPU-specific tuning: I don't think we want to ship Python with compiler flags which depend on the particular CPU being used. I wasn't suggesting this - but since different CPUs have different optimization rules, something like "oh, 20

[issue4906] os.listdir fails on debug build (windows)

2009-01-10 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: I see, so it was I that caused this :) I will owe up to it and submit a fix. -- nosy: +krisvale ___ Python tracker ___ _

[issue4753] Faster opcode dispatch on gcc

2009-01-10 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 2009-01-10 10:55, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> It looks like we still didn't manage, and since ICC is the best >> compiler out there, this matters. > > Well, from the perspective of Python, what matters mostly is the

[issue4906] os.listdir fails on debug build (windows)

2009-01-10 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto : Due to r68455, os.listdir fails on debug build (windows). // Python 2.7a0 (trunk, Jan 10 2009, 18:36:15) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> impo

[issue4753] Faster opcode dispatch on gcc

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It looks like we still didn't manage, and since ICC is the best > compiler out there, this matters. Well, from the perspective of Python, what matters mostly is the commonly used compilers (that is, gcc and MSVC). I doubt many people compile Python with icc,

[issue4753] Faster opcode dispatch on gcc

2009-01-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > @pitrou: > > The machine I got the 15% speedup on is in 64-bit mode with gcc > 4.3.2. > > Which is the processor? I guess the bigger speedups should be on > Pentium4, since it has the bigger mispredict penalties. Athlon X2 3600+. __

[issue4905] Use INVALID_FILE_ATTRIBUTES instead of magic numbers

2009-01-10 Thread Ulrich Eckhardt
New submission from Ulrich Eckhardt : GetFileAttributes[W|A] returns a DWORD with this value when it couldn't determine the file's attributes. In the Python codebase, there are basically three values this is compared with, the above macro, 0x and (DWORD)-1, it should only be the macro.

[issue4903] binascii.crc32()

2009-01-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: What is "this" that you want to get documented? Can you propose a specific wording? -- nosy: +loewis ___ Python tracker ___ ___

[issue4893] Use separate thread support code under MS Windows CE

2009-01-10 Thread Ulrich Eckhardt
Ulrich Eckhardt added the comment: The thread code is unaffected by the Unicode/ANSI issues, but CE doesn't have _beginthread[ex], which are mandatory for the desktop variants. I have checkin 68455 and I will try to compile the new NT code under CE to estimate how large the changes are.

[issue4753] Faster opcode dispatch on gcc

2009-01-10 Thread Paolo 'Blaisorblade' Giarrusso
Paolo 'Blaisorblade' Giarrusso added the comment: The standing question is still: can we get ICC to produce the expected output? It looks like we still didn't manage, and since ICC is the best compiler out there, this matters. Some problems with SunCC, even if it doesn't do jump sharing, it se