[issue15805] Add stdout redirection tool to contextlib

2012-09-25 Thread Nick Coghlan
Nick Coghlan added the comment: I'd actually be inclined to make it the full trio: redirect_stdin, redirect_stdout, redirect_stderr. Mostly because I don't see an especially compelling reason to privilege redirecting stdout over the other two standard streams, and the "pass in the stream name

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset a87ab9b0c9e5 by Petri Lehtinen in branch '2.7': #15222: Fix a test failure on Windows http://hg.python.org/cpython/rev/a87ab9b0c9e5 -- ___ Python tracker _

[issue16040] nntplib: unlimited readline() from connection

2012-09-25 Thread Hynek Schlawack
Changes by Hynek Schlawack : -- nosy: +hynek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue15805] Add stdout redirection tool to contextlib

2012-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: I like Nick's proposed variant and think it should go in contextlib, not the mocking library. Redirection has a lot of use cases that has nothing to do with mocking-up test suites. Contextlib is about general purpose context-managers that apply in many si

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-25 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- keywords: +easy type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue16051] Documentation missing pipes.quote()

2012-09-25 Thread Barry Morrison
New submission from Barry Morrison: Documentation here: http://docs.python.org/library/pipes.html makes no mention of quote() But the link to Source code: Lib/pipes.py http://hg.python.org/cpython/file/2.7/Lib/pipes.py has: 267 def quote(file): 268 """Return a shell-escaped version of the fi

[issue16047] Tools/freeze no longer works in Python 3

2012-09-25 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7897] Support parametrized tests in unittest

2012-09-25 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue16050] ctypes: callback from C++ to Python fails with Illegal Instruction call

2012-09-25 Thread Pavel Maltsev
New submission from Pavel Maltsev: ppc_405, Linux 2.4, GCC 3.3.1 Python crashes on attempt to pass python callback function to custom C++ library under PowerPC 405. This happens because some versions of GCC (I guess below 4.1) doesn't raise __NO_FPRS__ flag if hard-floats is not supported, in

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-25 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue16034] bz2 module appears slower in Python 3.x versus Python 2.x

2012-09-25 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue7427] BadStatusLine is hell to debug

2012-09-25 Thread Andrew Swan
Andrew Swan added the comment: I just got tripped up by this change, I wanted to catch the specific case of an http server closing a connection and assumed that the following would work: try: resp = conn.getresponse() except httplib.BadStatusLine, e: if len(e.line) == 0: # server closed

[issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__

2012-09-25 Thread Raymond Hettinger
New submission from Raymond Hettinger: Since inheritance is more commonplace and more easily understood than __metaclass__, the abc module would benefit from a simple helper class: class ABC(metaclass=ABCMeta): pass >From a user's point-of-view, writing an abstract base call become

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-25 Thread Raymond Hettinger
Raymond Hettinger added the comment: Please don't apply this until I've signed-off on it. -- ___ Python tracker ___ ___ Python-bugs-lis

[issue16001] small ints: cache string representation

2012-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Small int caching saves both time and space. On a nearly fresh IDLE session: >>> sys.getrefcount(0) 772 >>> sys.getrefcount(1) 854 >>> sum(sys.getrefcount(i) for i in range(-5, 257)) 4878 While an interesting idea, I do not see the same gain here, and agree with

[issue16023] IDLE freezes on ^5 or ^6 (Un-)Tabify Region with OS X Cocoa Tk 8.5

2012-09-25 Thread Ned Deily
Ned Deily added the comment: Thanks for the additional information! I can now reproduce a hang using just Ctrl-5 on a US keyboard input method. Ctrl-5 is the default IDLE keyboard accelerator for the "Tabify Region" menu item under the "Format" menu cascade for an edit window. With any curr

[issue16036] simplify int() signature docs

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: I'm attaching an updated patch that does not cover certain edge cases that may differ for other Python implementations (and in fact does differ for PyPY). See issue 16045 for more information. -- Added file: http://bugs.python.org/file27307/issue-16036

[issue16010] Some Unicode in identifiers improperly rejected

2012-09-25 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- resolution: -> invalid ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue16048] Tutorial-classes-remarks: replace paragragh

2012-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ian Kelly reminds me that instance.__xxx__ is only skipped by the internal machinery and not by direct accesses in user code. In the other hand, docs, official or otherwise, are filled with things like 'len(a) calls a.__len__', so I think something should be s

[issue16048] Tutorial-classes-remarks: replace paragragh

2012-09-25 Thread Terry J. Reedy
Terry J. Reedy added the comment: Peter Otten thought the first clause should instead be ""Data attributes and method attributes share the same namespace.", which is also true for a given object. This is a different intepretation of what the original author was getting at. The convention remar

[issue16048] Tutorial-classes-remarks: replace paragragh

2012-09-25 Thread Terry J. Reedy
New submission from Terry J. Reedy: (from python-list thread "data attributes override method attributes?") "9.4. Random Remarks Data attributes override method attributes with the same name; to avoid accidental name conflicts, which may cause hard-to-find bugs in large programs, it is wise t

[issue16035] Segmentation fault in test suite of apsw

2012-09-25 Thread Stefan Krah
Stefan Krah added the comment: [Adding the apsw author to the cc.] Antoine is right, no Python bug here. I think we can close this. -- nosy: +rogerbinns stage: -> committed/rejected status: pending -> closed ___ Python tracker

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-25 Thread Michele Orrù
Changes by Michele Orrù : Added file: http://bugs.python.org/file27306/bench.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-25 Thread Michele Orrù
Changes by Michele Orrù : Removed file: http://bugs.python.org/file27293/bench.py ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-25 Thread Michele Orrù
Michele Orrù added the comment: > I'm not sure of the usefulness of this comment. removing, then. > "else" redundant here. > Instead of using a local variable "intersected", you can simply add "else > Py_INCREF(other)" here and then decref "other" unconditionally. It will be > shorter and perha

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-25 Thread Michele Orrù
Michele Orrù added the comment: > I'm not sure of the usefulness of this comment. removing, then. > "else" redundant here. > Instead of using a local variable "intersected", you can simply add "else > Py_INCREF(other)" here and then decref "other" unconditionally. It will be > shorter and perha

[issue16002] AIX buildbot compile errors

2012-09-25 Thread Stefan Krah
Stefan Krah added the comment: Hi Trent, nice setup BTW! Trent Nelson wrote: > Hi Stefan, quick question: how did you invoke ./configure on the AIX box? > The reason for asking is that a7/arsenic is a little quirky, you need to > run a zsh subroutine via `_xlc 12` to set up the right CC env (se

[issue16029] pickle.dumps(xrange(sys.maxsize)) produces xrange(0)

2012-09-25 Thread Mark Dickinson
Mark Dickinson added the comment: Updated patch: rename range_stop, as suggested in Rietveld review. -- Added file: http://bugs.python.org/file27302/xrange_reduce_repr_4.patch ___ Python tracker __

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-25 Thread Petri Lehtinen
Petri Lehtinen added the comment: Fixed, thanks! -- keywords: -needs review resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue15222] mailbox.mbox writes without empty line after each message

2012-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6451be0e374a by Petri Lehtinen in branch '2.7': #15222: test_mailbox: End message template in a newline http://hg.python.org/cpython/rev/6451be0e374a New changeset d903d4981e33 by Petri Lehtinen in branch '2.7': #15222: Insert blank line after each

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: s/it/them/ -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue8425] a -= b should be fast if a is a small set and b is a large set

2012-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I added a few comments in Rietveld. Did you run benchmarks in debug mode? In order for results to be convenient to compare please sort it by name. -- ___ Python tracker

[issue2771] Test issue

2012-09-25 Thread Ezio Melotti
Changes by Ezio Melotti : Added file: http://bugs.python.org/file27301/entities.py ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue16025] Minor corrections to the zipfile documentation

2012-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > :meth:`closed ` works too. Patches updated. -- Added file: http://bugs.python.org/file27298/doc_zipfile-3.3.patch Added file: http://bugs.python.org/file27299/doc_zipfile-3.2.patch Added file: http://bugs.python.org/file27300/doc_zipfile-2.7.patch

[issue16025] Minor corrections to the zipfile documentation

2012-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27279/doc_zipfile-2.7.patch ___ Python tracker ___ ___ Python-bugs-list

[issue16025] Minor corrections to the zipfile documentation

2012-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27278/doc_zipfile-3.2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue16025] Minor corrections to the zipfile documentation

2012-09-25 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27277/doc_zipfile-3.3.patch ___ Python tracker ___ ___ Python-bugs-list

[issue15955] gzip, bz2, lzma: add option to limit output size

2012-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree with Antoine. This would be a desirable feature. -- nosy: +storchaka ___ Python tracker ___

[issue16042] smtplib: unlimited readline() from connection

2012-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please submit patches in standard Mercurial format to them understood Rietveld. I wanted to make a code review, but I don't see the definition of readline() method in the file Lib/smtplib.py. -- ___ Python tracker

[issue14201] Documented caching for shared library's __getattr__ and __getitem__ is incorrect

2012-09-25 Thread Erik Johansson
Erik Johansson added the comment: The issue14201-v2.patch patch looks good to me at least. -- ___ Python tracker ___ ___ Python-bugs-l

[issue16042] smtplib: unlimited readline() from connection

2012-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both io.IOBase.readline() and io.TextIOBase.readline() have parameter named "limit". I doubt that such a change can be done in 2.7 and 3.2. -- nosy: +storchaka ___ Python tracker

[issue16002] AIX buildbot compile errors

2012-09-25 Thread Trent Nelson
Trent Nelson added the comment: Hi Stefan, quick question: how did you invoke ./configure on the AIX box? The reason for asking is that a7/arsenic is a little quirky, you need to run a zsh subroutine via `_xlc 12` to set up the right CC env (see ~/buildslave/start.zsh). Once you've done that

[issue16047] Tools/freeze no longer works in Python 3

2012-09-25 Thread Jeremy Kloth
Changes by Jeremy Kloth : -- nosy: +jkloth ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Good thought. Here is one data point: $ pypy Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 09 2012, 14:24:11) [PyPy 1.9.0] on darwin Type "help", "copyright", "credits" or "license" for more information. int() 0 int(x='10', base=8) 8 >>>

[issue16042] smtplib: unlimited readline() from connection

2012-09-25 Thread Christian Heimes
Christian Heimes added the comment: size=-1 mimics the code of the io module. The C implementation of readline() maps all negative values to "unlimited" and values >= 0 as limit. >>> sys.stdin.readline(None) Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object

[issue16042] smtplib: unlimited readline() from connection

2012-09-25 Thread R. David Murray
R. David Murray added the comment: I've only taken a quick glance at this so far. Why size=-1 instead of size=None? -- ___ Python tracker ___ ___

[issue16042] smtplib: unlimited readline() from connection

2012-09-25 Thread Christian Heimes
Christian Heimes added the comment: First patch I haven't written tests yet nor implemented the size limit on the mock_socket class. -- keywords: +patch Added file: http://bugs.python.org/file27297/smtp_readline.patch ___ Python tracker

[issue16047] Tools/freeze no longer works in Python 3

2012-09-25 Thread Marc-Andre Lemburg
New submission from Marc-Andre Lemburg: The freeze tool used for compiling Python binaries with frozen modules no longer works with Python 3.x. It looks like it was never updated to the various path and symbols changes introduced with PEP 3149 (ABI tags) in Python 3.2. Even with lots of symli

[issue16042] smtplib: unlimited readline() from connection

2012-09-25 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +barry, r.david.murray ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue16042] smtplib: unlimited readline() from connection

2012-09-25 Thread Christian Heimes
Christian Heimes added the comment: RFC 821 [1] specifies rather short line lengths between 512 and 1001 chars including the trailing CRLF. A line limit of a couple of kilobyte should definitely work with all standard conform SMTP clients and servers. [1] http://www.freesoft.org/CIE/RFC/821/24

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Ezio Melotti
Ezio Melotti added the comment: Before adding tests (and possibly documentation) for edge cases like > int(base='foo') # no exception; returns 0 I'd take a look at what other implementations do. If they do something different we might still decide to keep the tests and mark them as cpython-

[issue16027] pkgutil doesn't support frozen modules

2012-09-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Can you confirm this problem still exists on 3.3? The pkgutil emulation isn't > used by runpy any more - with the migration to importlib, the interface that > runpy invokes fails outright if no l

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Georg Brandl
Georg Brandl added the comment: Transplanted to ff50579241cd. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ _

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: This "tested" in the sense if you run test_import with -O, it fails. We ought to have a buildbot running with -O. -- nosy: +benjamin.peterson ___ Python tracker ___

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4de5e4ec3cff by Benjamin Peterson in branch 'default': don't depend on __debug__ because it's baked in at freeze time (issue #16046) http://hg.python.org/cpython/rev/4de5e4ec3cff -- nosy: +python-dev ___

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Georg Brandl
Georg Brandl added the comment: Looks serious enough, yes. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: Georg, do you want to take this for 3.3, final? -- assignee: -> georg.brandl nosy: +georg.brandl priority: normal -> release blocker ___ Python tracker

[issue16035] Segmentation fault in test suite of apsw

2012-09-25 Thread Georg Brandl
Georg Brandl added the comment: Not a blocker then. -- priority: release blocker -> normal resolution: -> invalid status: open -> pending ___ Python tracker ___

[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-25 Thread R. David Murray
R. David Murray added the comment: FTR, the 3.3 commit is cce2bfe03dc5. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-25 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset b624059a8dac by Barry Warsaw in branch '2.7': - Issue #15935: Clarification of argparse docs, re: add_argument() type and http://hg.python.org/cpython/rev/b624059a8dac New changeset b738e42e664a by Barry Warsaw in branch '3.2': - Issue #15935: Clari

[issue16035] Segmentation fault in test suite of apsw

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: The cause for Stefan's traceback looks quite clear: Connection_createaggregatefunction() release the GIL (through the PYSQLITE_CON_CALL macro) before calling into sqlite3_create_function_v2, which itself calls the destructor for the old aggregate function, aka

[issue16027] pkgutil doesn't support frozen modules

2012-09-25 Thread Nick Coghlan
Nick Coghlan added the comment: Can you confirm this problem still exists on 3.3? The pkgutil emulation isn't used by runpy any more - with the migration to importlib, the interface that runpy invokes fails outright if no loader is found rather than falling back to the emulation (we only retai

[issue15935] clarify argparse docs re: add_argument() type and default arguments

2012-09-25 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Looks good to me too! Thanks; I'll apply the patch. -- assignee: docs@python -> barry ___ Python tracker ___

[issue16035] Segmentation fault in test suite of apsw

2012-09-25 Thread Benjamin Peterson
Benjamin Peterson added the comment: My guess is an extension problem (failing to aqcuire locks?) -- ___ Python tracker ___ ___ Python

[issue16025] Minor corrections to the zipfile documentation

2012-09-25 Thread Ezio Melotti
Ezio Melotti added the comment: :meth:`closed ` works too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue16035] Segmentation fault in test suite of apsw

2012-09-25 Thread Stefan Krah
Stefan Krah added the comment: I don't get a segfault, but a fatal error. Here's the back trace (unfortunately I've no time to debug this further today; sqlite is the latest version compiled from source): #0 0x771e6a75 in *__GI_raise (sig=) at ../nptl/sysdeps/unix/sysv/linux/raise.c:

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +3.3regression nosy: +brett.cannon, ncoghlan ___ Python tracker ___ ___ Python-bugs-list mail

[issue16027] pkgutil doesn't support frozen modules

2012-09-25 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Here's the fix we're applying in pyrun to make -m imports work at least for top-level modules: --- /home/lemburg/orig/Python-2.7.3/Lib/pkgutil.py 2012-04-10 01:07:30.0 +0200 +++ pkgutil.py 2012-09-24 22:53:30.982526065 +0200 @@ -273,10 +273,2

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Marco Buttu
Changes by Marco Buttu : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16046] python -O does not find *.pyo files

2012-09-25 Thread Marco Buttu
New submission from Marco Buttu: $ echo "print(__file__)" > foo.py $ python3.3 -O -m foo /home/marco/temp/foo.py $ ls foo.py __pycache__ $ rm foo.py $ mv __pycache__/foo.cpython-33.pyo foo.pyo $ rm __pycache__ -r $ ls foo.pyo # The following works in Python3.2, but not in Python 3.3.0rc3 $ pytho

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: We should also add a code-comment pointer in test_builtin to test_int (where test_int() would be located). -- ___ Python tracker ___ __

[issue16045] add more unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: [Reopening] Actually, there may still be value in this. Not all of the edge cases I mentioned are covered (e.g. calling using keyword arguments). -- resolution: invalid -> stage: committed/rejected -> test needed status: closed -> open title: create s

[issue16045] create some unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Thanks for the pointer. That should do it. :) Searching for "test_int(" completely missed test_int.py. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue16027] pkgutil doesn't support frozen modules

2012-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ncoghlan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue16045] create some unit tests for built-in int()

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, have you looked at test_int? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mail

[issue16027] pkgutil doesn't support frozen modules

2012-09-25 Thread Brett Cannon
Changes by Brett Cannon : -- versions: +Python 3.4 -Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue2600] BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: HTTPConnection now supports timeout and source_address parameters, so this is really out of date. Thanks for reporting, though! (see http://docs.python.org/dev/library/http.client.html#http.client.HTTPConnection) -- nosy: +pitrou resolution: -> out o

[issue16045] create some unit tests for built-in int()

2012-09-25 Thread Chris Jerdonek
New submission from Chris Jerdonek: The built-in function int() does not seem to have any basic unit tests (e.g. in test_builtin). It would be good to add some. Some cases (including edge cases) for possible inclusion: int() int(base='foo') # no exception; returns 0 int(x=5) int(x=5, base=10

[issue16029] pickle.dumps(xrange(sys.maxsize)) produces xrange(0)

2012-09-25 Thread Mark Dickinson
Mark Dickinson added the comment: Whoops; there's no need to iterate over pickle protocols in test_repr. New patch. -- Added file: http://bugs.python.org/file27296/xrange_reduce_repr_3.patch ___ Python tracker __

[issue12319] [http.client] HTTPConnection.putrequest not support "chunked" Transfer-Encodings to send data

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: > We had support for chunked transfer encoding for POST method recently, > which is exposed via urllib2 wrapper function. I couldn't find what you're talking about. If I look at AbstractHTTPHandler.do_request_, it actually mandates a Content-Length header for

[issue16025] Minor corrections to the zipfile documentation

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: - :meth:`close`\ d without adding any files to the archive, the appropriate + :meth:`close `\ d without adding any files to the archive, the appropriate This formatting looks odd to me when rendered (both cases). I would perhaps suggest something like, ".

[issue16030] xrange repr broken for large arguments

2012-09-25 Thread Mark Dickinson
Mark Dickinson added the comment: The patch for issue #16029 fixes this issue, too. -- components: +Interpreter Core -Library (Lib) dependencies: +pickle.dumps(xrange(sys.maxsize)) produces xrange(0) ___ Python tracker

[issue16029] pickle.dumps(xrange(sys.maxsize)) produces xrange(0)

2012-09-25 Thread Mark Dickinson
Mark Dickinson added the comment: Patch with tests. -- components: +Interpreter Core -Library (Lib) stage: needs patch -> commit review Added file: http://bugs.python.org/file27295/xrange_reduce_repr_2.patch ___ Python tracker

[issue13403] Option for XMLPRC Server to support HTTPS

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note there's already a couple of HTTPS servers in Lib/test/ssl_servers.py. I'm not sure there's anything special to do for XMLRPC except to take the core instantiation code and put it in xmlrpclib. -- nosy: +flox, loewis, pitrou stage: -> needs patch v

[issue14414] xmlrpclib leaves connection in broken state if server returns error without content-length

2012-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +flox, loewis ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: The example URL doesn't seem to work anymore. Do you have another example to test with? -- nosy: +pitrou ___ Python tracker ___ ___

[issue2126] BaseHTTPServer.py fails long POST from IE

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: Reading the original issue: "it appears that IE is sending 2 extra bytes ('\r\n') after the request data. and if you don't read those two extra bytes off, the window's socket handling gets messed up. the result is that a partial response is returned and the

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread Ronald Oussoren
Ronald Oussoren added the comment: Use the extend method to add multiple elements. Both the source and documentation indicate that 'append' is used for appending a single item and 'extend' for appending multiple items (just like with list). IMHO this is not a bug. As an aside: when you import

[issue10980] http.server Header Unicode Bug

2012-09-25 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread kirpit
kirpit added the comment: well, i've just followed the source code regardless to documentation so you may be right about appending a single element. (kind of newbie around here.) but then, append method is misbehaving about asserting the parameter, isn't it? -- ___

[issue16036] simplify int() signature docs

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: [Continuing the issue 14783 discussion] > That said, I don't have a strong opinion about this, so if people think that > x should be used, it's fine with me. I also feel that *x* should be used, since that is what the code enforces. I'm attaching a revised pa

[issue16037] httplib: header parsing is not delimited

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: 100 headers sounds more than enough for everybody. -- nosy: +pitrou ___ Python tracker ___ ___ Pytho

[issue15955] gzip, bz2, lzma: add option to limit output size

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: You don't need to know the final size. You just need to be able to pass an output size limit. This would be an easy feature to add to functions like zlib.decompress(), since they already handle sizing of the output buffer. -- nosy: +pitrou title: gzip,

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread Ronald Oussoren
Ronald Oussoren added the comment: (unassigning as this is not a mac-specific issue) BTW. Is this really a bug, the documentation says that append appends a single element : append(subelement) Add

[issue16044] xml.etree.ElementTree.Element: append method iterator param is broken

2012-09-25 Thread kirpit
New submission from kirpit: xml.etree.ElementTree.Element's append method doesn't support iterator/sequence parameters as it's supposed to, for the version 1.3.0. Python 2.7.3 (default, Sep 14 2012, 09:52:31) [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on darwin Type "

[issue16035] Segmentation fault in test suite of apsw

2012-09-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I can't build apsw here: gcc -pthread -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DEXPERIMENTAL=1 -DNDEBUG=1 -DAPSW_FORK_CHECKER=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -Isrc -I/home/antoine/opt/include/python3.3m -c src/apsw.c -o bui

[issue16015] Incorrect startup header in tutorial

2012-09-25 Thread Chris Jerdonek
Chris Jerdonek added the comment: Fixed, and thanks for the report! (Ezio, I didn't add "code-block:: sh" because it resulted in some undesired highlighting in the interpreter portion when I tried it.) -- resolution: -> fixed stage: -> committed/rejected status: open -> closed _

[issue16015] Incorrect startup header in tutorial

2012-09-25 Thread Roundup Robot
Roundup Robot added the comment: New changeset d2df5bc89fc9 by Chris Jerdonek in branch '3.2': Issue #16015: Make welcome message more realistic in tutorial example. http://hg.python.org/cpython/rev/d2df5bc89fc9 New changeset fcb5bc824e3e by Chris Jerdonek in branch 'default': Issue #16015: Merg

[issue16037] httplib: header parsing is not delimited

2012-09-25 Thread Christian Heimes
Christian Heimes added the comment: The readline() limitation in _read_status() was added at some point in the 3.2 line. Python 3.1 has an unlimited readline(). -- ___ Python tracker __

  1   2   >