[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Jeremy Hylton
Jeremy Hylton added the comment: Brief update: The Python 2.x code works because readline() is provided by socket._fileobject. The Python 3.x code fails because it grabs the HTTPResponse.fp instance variable at the end of AbstractHTTPHandler.do_open. That method needs to pass the response to

[issue3761] urllib.request and urllib.response cannot handle HTTP1.1 chunked encoding

2008-12-14 Thread Jeremy Hylton
Jeremy Hylton added the comment: I'm sorry that I didn't notice this bug report in September! The chunked support does exist in the http package, but it doesn't work with urllib. Tracking in 4631. -- nosy: +jhylton resolution: -> duplicate status: open -> closed superseder: -> urlop

[issue4657] Doctest gets line numbers wrongs with <> in name

2008-12-14 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +belopolsky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue4668] examples in the functional howto are not consistent with 3.X behavior

2008-12-14 Thread Santiago Gala
New submission from Santiago Gala : map and filter don't return lists anymore, so wrapping them in list() in the examples will make the real output consistent with what is seen in the doc. -- assignee: georg.brandl components: Documentation files: 0001-Make-examples-consistent-with-3.0.p

[issue4667] Patch with a couple of 2.0isms in tutorial

2008-12-14 Thread Santiago Gala
New submission from Santiago Gala : references to reload as builtin or dict.keys as returning a list, and the use of the .sort method, all gone in 3.X -- assignee: georg.brandl components: Documentation files: tutorial.patch keywords: patch messages: 77843 nosy: georg.brandl, sgala sever

[issue4666] test_bad_address in test_urllib2_localnet often fails

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: I confirm that following tests test_curses test_urllib2_localnet test_urllibnet fail if regression test run all test. All three tests succeed if I run them one by one. Version - trunk, os - linux. -- nosy: +rpetrov __

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: > The macro Py_IS_INFINITY don't work on linux. The test case(force-inf.c) > is attached. The result don't depend from optimisation flag. Thanks, Roumen. I rather suspected that Py_IS_INFINITY was dodgy this way. On the other hand, this is only a problem whe

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Jeremy Hylton
Changes by Jeremy Hylton : -- assignee: -> jhylton ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue4666] test_bad_address in test_urllib2_localnet often fails

2008-12-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : This error is often seen on the buildbots (both py3k and trunk): == FAIL: test_bad_address (test.test_urllib2_localnet.TestUrlopen) ---

[issue4664] Regression fix_imports does not refactor multiple imports correctly

2008-12-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Fixed in r67774. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Pytho

[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Do we have any means to test the C++ compatibility of the header files? No, we fix it when users report bugs (which typically happens very quickly after we made some). > Full C++ compatibility is one way to make sure the header files are > compatible, too.

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: The macro Py_IS_INFINITY don't work on linux. The test case(force-inf.c) is attached. The result don't depend from optimisation flag. isinf(x)=1 Py_IS_INFINITY(x)=0 Py_IS_INFINITY2(x)=1 isinf(x)=0 Py_IS_INFINITY(x)=0 Py_IS_INFINITY2(x)=0 Added file: http://bugs

[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Christian Heimes
Christian Heimes added the comment: Ah, I was under the impression that Python must be compatible both C++ and C89 compilers. Do we have any means to test the C++ compatibility of the header files? Full C++ compatibility is one way to make sure the header files are compatible, too. *wink* I don

[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Martin v. Löwis
Martin v. Löwis added the comment: I disagree. It's not a requirement that the Python source code is compilable as C++. Only the header files should be thus compilable. -- nosy: +loewis ___ Python tracker _

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: about "export" decoration it is find in then patch PyAPI_FUNC(double) . found it after second review ___ Python tracker ___ __

[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Christian Heimes
Christian Heimes added the comment: The trunk contains lots of implicit casts from void pointers that make the code incompatible with C++. ___ Python tracker ___ _

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: As Skip Montanaro report that work on ... may be macro from pymath.h has to be changed to force conversion to double. ___ Python tracker ___ _

[issue4664] Regression fix_imports does not refactor multiple imports correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I got it. It is a regression from a previous version of 2to3's fix_imports. I was able to reproduce your problem using the sandbox's 2to3. And to answer your question, I still running an older RC release of Python 3.0. That explains why I couldn't reprodu

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: I'm not sure that patch has to deal with "force to memory". FYI: when I port python trunk to mingw platform I encounter some inconsistency for isinf. My note about issue follow: - configure.in: ... dnl FIXME: For mingw "isinf" is a macro defined in and can't be

[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Christian Heimes
Christian Heimes added the comment: Python should be compile-able with a C++ compiler. I'll test it on my system in a couple of minutes. -- nosy: +christian.heimes ___ Python tracker ___

[issue4665] Failure to compile trunk on Solaris10/SPARC using C++ compiler

2008-12-14 Thread Skip Montanaro
New submission from Skip Montanaro : I don't know if the Python source is supposed to be compilable with a C++ compiler or not, but I'm having trouble finding a C compiler on the Solaris10/SPARC machines at work. I decided to give a C++ compiler a whirl: /opt/gnu/bin/c++ -c -fno-strict-alia

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Lennart Regebro
Lennart Regebro added the comment: What version are you running? Can you post the output? ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Skip Montanaro
Skip Montanaro added the comment: Mark> Skip, could you give it a try? Works for me on Solaris 10/x86. Based on Roumen's comment I am preparing to try it on Mac OS X/x86 and Solaris 10/sparc. Skip ___ Python tracker

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Benjamin, your example fails for a different reason--i.e. the fixer for HTMLParser is missing. Sorry Lennart, I still cannot reproduce it. ___ Python tracker

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Lennart Regebro
Lennart Regebro added the comment: Heres my test file. Added file: http://bugs.python.org/file12357/test3.py ___ Python tracker ___ ___ Python

[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Andrii V. Mishkovskyi
Andrii V. Mishkovskyi added the comment: I've missed one simple thing -- posix.getcwdu has been renamed to posix.getcwd in 3.0, so adding Py3k deprecation warning to this function is not really needed. Instead a fix for this should be added to the list of 2to3 fixes. I've also fixed the warnings

[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Andrii V. Mishkovskyi
Changes by Andrii V. Mishkovskyi : Removed file: http://bugs.python.org/file12354/posixmodule.patch ___ Python tracker ___ ___ Python-bugs-list

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Roumen Petrov
Roumen Petrov added the comment: may be proposed patch break platforms that need specific "export" decoration -- nosy: +rpetrov ___ Python tracker ___ ___

[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Well, it's trivial to use PyErr_WarnPy3k in place of PyErr_Warn. -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Martin v. Löwis
Martin v. Löwis added the comment: I don't think a DeprecationWarning is appropriate. Instead, there could be a -3 warning. -- nosy: +loewis ___ Python tracker ___ __

[issue1759845] subprocess.call fails with unicode strings in command line

2008-12-14 Thread xianyiteng
Changes by xianyiteng : -- nosy: +xianyiteng ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here's one which doesn't work correctly: $ 2to3 - RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma impor

[issue1040026] os.times() is bogus

2008-12-14 Thread Martin v. Löwis
Martin v. Löwis added the comment: > I wouldn't be > surprised if it breaks on some machines sometimes, especially ones with > low clock granularity. Now that I look at the test, I see what you mean. I think I will reject it. ___ Python tracker

[issue4645] configparser DEFAULT

2008-12-14 Thread Martin v. Löwis
Martin v. Löwis added the comment: The release candidate for 2.5.3 has been made; this patch cannot be considered anymore. Closing as fixed. -- resolution: -> fixed status: open -> closed ___ Python tracker _

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Sorry, I still cannot reproduce it. Could you attach your test file? Maybe it is some weird encoding bug. a...@helios:~$ 2to3 -f imports test.py --- test.py (original) +++ test.py (refactored) @@ -1,2 +1,2 @@ -import urlparse, cStringIO -import cStringIO,

[issue4664] import urlparse, cStringIO breaks

2008-12-14 Thread Lennart Regebro
New submission from Lennart Regebro : If you have urlparse before cStringIO in an import line, 2to3 will not convert the cStringIO to io. However, reverse the order, and urlparse will not get translated. So this file: import urlparse, cStringIO import cStringIO, urlparse will with 2to3 return t

[issue4663] Increase TextIOWrapper._CHUNK_SIZE

2008-12-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : Simply bumping TextIOWrapper._CHUNK_SIZE from 128 to 1024 yields some significant performance improvements. ./python -m timeit -s "f=open('LICENSE')" "f.seek(0)" "for line in f: pass" -> with 128: 6.21 msec per loop -> with 1024: 3.41 msec per loop ./pytho

[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Backported to trunk and 2.6.2 in r67762 and r67764. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue4074] Building a list of tuples has non-linear performance

2008-12-14 Thread Adam Olsen
Adam Olsen added the comment: I didn't test it, but the patch looks okay to me. -- nosy: +Rhamphoryncus ___ Python tracker ___ ___ Pyt

[issue4575] Py_IS_INFINITY defect causes test_cmath failure on x86

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch (force_to_memory2.patch) that I'm hoping fixes the cmath test failures on Solaris 10/x86. Skip, could you give it a try? The patch isn't final: I need to look for more places where Py_FORCE_DOUBLE should be applied. But I'll wait to find out

[issue4662] posix module lacks several DeprecationWarning's

2008-12-14 Thread Andrii V. Mishkovskyi
New submission from Andrii V. Mishkovskyi : posix module lacks DeprecationWarning for the functions listed below: tempnam, tmpfile, fdopen, getcwdu, popen, tmpnam All of these are absent in 3.0, so I think adding DeprecationWarning to all of them would be useful. Attaching a straight-forward patc

[issue4658] missing closing bracket in Functional Programming HOWTO

2008-12-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the report! Fixed in r67761. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2008-12-14 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> barry nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue4660] multiprocessing.JoinableQueue task_done() issue

2008-12-14 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- assignee: -> jnoller nosy: +jnoller ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue4574] reading UTF16-encoded text file crashes if \r on 64-char boundary

2008-12-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed to py3k and release30-maint in r67760 and r67759. Needs backporting to 2.x. -- priority: release blocker -> normal ___ Python tracker

[issue4661] email.parser: impossible to read messages encoded in a different encoding

2008-12-14 Thread Adeodato Simó
New submission from Adeodato Simó : Currently, email.parser/feedparser can only parse messages that come as a string, or from a file opened in text mode. Email messages, however, can contain 8bit characters in any encoding other than the local one (yet still be valid e-mails, of course), so I

[issue4660] multiprocessing.JoinableQueue task_done() issue

2008-12-14 Thread Brian
Changes by Brian : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue4660] multiprocessing.JoinableQueue task_done() issue

2008-12-14 Thread Brian
New submission from Brian : Despite carefully matching my get() and task_done() statements I would often trigger "raise ValueError('task_done() called too many times')" in my multiprocessing.JoinableQueue (multiprocessing/queues.py) Looking over the code (and a lot of debug logging), it appear

[issue4197] Doctest module does not work with zipped packages

2008-12-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Nick, Your commit does not fix the line number reporting from doctest failures: $ ./python.exe testmodule.zip ** File "testmodule.zip/__main__.py", line ?, in __main__.c ... Note the '?

[issue4659] compilation warning in Modules/zipimport.c

2008-12-14 Thread Antoine Pitrou
New submission from Antoine Pitrou : Probably harmless: ./Modules/zipimport.c: In function ‘get_module_code’: ./Modules/zipimport.c:1132: warning: format ‘%c’ expects type ‘int’, but argument 3 has type ‘long int’ -- components: Extension Modules messages: 77804 nosy: pitrou priority: l

[issue1040026] os.times() is bogus

2008-12-14 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue1040026] os.times() is bogus

2008-12-14 Thread Guido van Rossum
Guido van Rossum added the comment: [-gvanrossum] ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue4074] Building a list of tuples has non-linear performance

2008-12-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a simple patch implementing Martin's proposal with a few basic tweaks. Using Greg's script, we get: -> without patch: 100 2.64134001732 200 3.60712885857 300 5.40855813026 400 6.46308898926 500 8.65147781372 600 10.3949871063 7

[issue4658] missing closing bracket in Functional Programming HOWTO

2008-12-14 Thread Bram Geron
New submission from Bram Geron : In the Functional Programming HOWTO -> Built-in functions -> sorted, the syntaxis code misses a closing square bracket just after `reverse=False`. -- assignee: georg.brandl components: Documentation messages: 77801 nosy: bgeron, georg.brandl severity: nor

[issue4656] Python 3 tutorial has old information about dicts

2008-12-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks! Fixed in r67755. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue4071] ntpath.abspath fails for long str paths

2008-12-14 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: GetFullPathNameW may return the required buffer size (non-zero value) when buffer is too short. Before r67154, this case was treated as success, so there was possibility of access to uninitialized buffer woutbuf. Fortunately, GetFullPathNameW sets '\0' to

[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12320/long_as_double2.patch ___ Python tracker ___ ___ Python-bugs-list ma

[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file10694/long_as_double.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue3166] Make conversions from long to float correctly rounded.

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch; cleanup of comments and slight refactoring of code. Int->float conversions are even a speck faster than the current code, for small inputs. (On my machine, on a Friday night, during a full moon. Your results may differ. :)) Also, retarget

[issue1040026] os.times() is bogus

2008-12-14 Thread Malte Helmert
Malte Helmert added the comment: > I see. I wish that people would a) always provide complete patches in > a single file, and b) delete files themselves that have been > superceded by others. In any case, I have re-attached the file; > thanks for pointing this out. Regarding b), I did that as f

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Daniel Diniz
Daniel Diniz added the comment: Clarifying the diagnosis, the offending spurious bytes are only present when we use 3.0's GET above. That's because urllib.request.HTTPHandler asks for a vanilla http.client.HTTPConnection, which uses HTTP 1.1. IIUC, either we change the request version back to

[issue4223] inspect.getsource doesn't work on functions imported from a zipfile

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Final revisions for fix: 2.7 = r67751 (there was a new test file missing from the initial checkin) 2.6 = r67752 3.1 = r67753 3.0 = r67754 -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: IMO we should downgrade urlopen to HTTP 1.0 in 3.0.1. Implementing chunked encoding will come later if people are interested in doing it. -- nosy: +pitrou ___ Python tracker __

[issue4082] __main__.__file__ not set correctly when -m switch gets __main__ from a zipfile

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Final revisions for fix: 2.7 = r67751 (there was a new test file missing from the initial checkin) 2.6 = r67752 3.1 = r67753 3.0 = r67754 -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue4201] Pdb cannot access source code in zipped packages.

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Final revisions for fix: 2.7 = r67751 (there was a new test file missing from the initial checkin) 2.6 = r67752 3.1 = r67753 3.0 = r67754 -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue4197] Doctest module does not work with zipped packages

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Final revisions for fix: 2.7 = r67751 (there was a new test file missing from the initial checkin) 2.6 = r67752 3.1 = r67753 3.0 = r67754 -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: -> critical type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue1734234] Fast path for unicodedata.normalize()

2008-12-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a new patch against trunk, including the modified data files. All tests pass and I confirm a very healthy speed-up (~ 5x) when trying to a normalize an already normalized string. The slowdown for non-normalized strings is so small that it cannot be disti

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Daniel Diniz
Daniel Diniz added the comment: Took me a bit of Wiresharking to find this out, the problem is that we are asking for the page using HTTP 1.1 in 3.0. Here's a workaround patch for those who need it quick, I have yet to look at urllib to see what can be fixed there. --- Index: Lib/http/client.p

[issue4223] inspect.getsource doesn't work on functions imported from a zipfile

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.7 in r67750. Will be ported to 2.6, 3.0 and 3.1. ___ Python tracker ___ ___ Python-bugs-list maili

[issue4082] __main__.__file__ not set correctly when -m switch gets __main__ from a zipfile

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.7 in r67750. Will be ported to 2.6, 3.0 and 3.1. ___ Python tracker ___ ___ Python-bugs-list maili

[issue4512] Add get_filename method to zipimport

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Correction - added as _get_filename() in that revision. Documenting it and making it public (i.e. removing the underscore) is still to be done, and will only be done for 2.7/3.1 ___ Python tracker

[issue4512] Add get_filename method to zipimport

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.7 in r67750. Will be ported to 2.6, 3.0 and 3.1. ___ Python tracker ___ ___ Python-bugs-list maili

[issue4201] Pdb cannot access source code in zipped packages.

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.7 in r67750. Will be ported to 2.6, 3.0 and 3.1. ___ Python tracker ___ ___ Python-bugs-list maili

[issue4197] Doctest module does not work with zipped packages

2008-12-14 Thread Nick Coghlan
Nick Coghlan added the comment: Fixed for 2.7 in r67750. Will be ported to 2.6, 3.0 and 3.1. ___ Python tracker ___ ___ Python-bugs-list maili

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12343/bit_length7_opt2.patch ___ Python tracker ___ ___ Python-bugs-list m

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Added file: http://bugs.python.org/file12349/bit_length7_opt2.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Changes by Mark Dickinson : Removed file: http://bugs.python.org/file12336/bit_length7.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue3439] create a numbits() method for int and long types

2008-12-14 Thread Mark Dickinson
Mark Dickinson added the comment: Update both patches: (1) change PyLong_FromLong(ndigits-1) to PyLong_FromSsize_t(ndigits-1) in both patches (it's possible to have a 32-bit long and 64-bit Py_ssize_t), and (2) in the optimized patch, add the table lookup optimization for long_bit_length. A

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Resul Cetin
Resul Cetin added the comment: I have the same problem with that code: (exchange USERNAME with your delicious username and PASSWORD with your delicious password): import urllib.request auth_handler = urllib.request.HTTPBasicAuthHandler() auth_handler.add_password('del.icio.us API', 'api.del

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Adeodato Simó
Adeodato Simó added the comment: > FWIW, there are trailing spurious bytes too And in the middle of the document as well. Each time there's a chunk, I guess? ___ Python tracker ___ _

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Daniel Diniz
Daniel Diniz added the comment: Jeremy: no, it doesn't. Python 2.6.1+ (release26-maint:67716M, Dec 13 2008, 10:30:52) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu3)] on linux2 ~/release26-maint$ ./python -c "import urllib; print urllib.urlopen('http://bugs.debian.org/cgi-bin/bugreport.cgi?mbox=yes;bug=123

[issue4631] urlopen returns extra, spurious bytes

2008-12-14 Thread Adeodato Simó
Adeodato Simó added the comment: > Does the same thing happen with 2.6? No, I can't reproduce with 2.6.1. ___ Python tracker ___ ___ Python-bu

[issue4645] configparser DEFAULT

2008-12-14 Thread Quentin Gallet-Gilles
Changes by Quentin Gallet-Gilles : -- versions: +Python 2.5.3 -Python 2.4, Python 2.5 ___ Python tracker ___ ___ Python-bugs-list maili

[issue4657] Doctest gets line numbers wrongs with <> in name

2008-12-14 Thread Nick Coghlan
New submission from Nick Coghlan : When writing the unit tests for running doctests from inside a zipfile, I initially had "" as the name being passed to the doctest.DocTestFinder.find method. With that name, the line numbers coming back for all of the examples were being incremented by 1 beyond