[issue2775] Implement PEP 3108

2011-12-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Brett, issue 2919 had a patch that merges profile/cProfile for a while now but nobody test it yet. All I need it someone to download the patch, install it, test it on some random script and tell me if it works. I don't need more. -- __

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Ops! I meant issue13564. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: ftplib's sendfile support is not tracked as issue13559. Considerations I made there should apply here as well. -- ___ Python tracker ___ ___

[issue13564] ftplib and sendfile()

2011-12-08 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : In attachment. This is actually just an excuse to store the patch somewhere and possibly collect opinions as I don't really think this should go in because: - it's UNIX only - as such, deciding whether using sendfile() should probably be done silently (n

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2011/12/8 Giampaolo Rodola' : > > Giampaolo Rodola' added the comment: > > This is not possible for two reasons: > > - on most POSIX systems, sendfile() works with mmap-like ("regular") files > only, while HTTPConnection.send() accepts any file-like object

[issue13563] Make use of with statement in ftplib

2011-12-08 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : Patch in attachment. -- files: ftplib.patch keywords: patch messages: 149074 nosy: giampaolo.rodola, pitrou priority: normal severity: normal status: open title: Make use of with statement in ftplib versions: Python 3.3 Added file: http://bugs.pyth

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: This is not possible for two reasons: - on most POSIX systems, sendfile() works with mmap-like ("regular") files only, while HTTPConnection.send() accepts any file-like object as long as it provides a read() method - after read()ing a chunk of data from t

[issue13505] Bytes objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2011-12-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: sbt, the bug is not that the encoding is inefficient. The problem is we cannot unpickle bytes streams from Python 3 using Python 2. -- ___ Python tracker __

[issue13562] Notes about module load path

2011-12-08 Thread Nam Nguyen
New submission from Nam Nguyen : A doc patch to remind Python embedder to set sys.path prior to Py_Initialize. This is to ensure a controlled module load path to work around these issues: http://bugs.python.org/issue12989 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983 -- a

[issue13561] os.listdir documentation should mention surrogateescape

2011-12-08 Thread Michael Foord
New submission from Michael Foord : Where os.listdir encounters undecodable bytes from the filesystem it uses the surrogateescape handler. As the resulting strings are invalid they can't be encoded without an errorhandler, and so can't be printed (for example). This should be documented.

[issue6321] Reload Python modules when running programs

2011-12-08 Thread Roger Serwy
Roger Serwy added the comment: Should this issue be closed? It is related to #4691. -- nosy: +serwy ___ Python tracker ___ ___ Python-

[issue7676] IDLE shell shouldn't use TABs

2011-12-08 Thread Roger Serwy
Roger Serwy added the comment: Here's a simple patch to fix this bug. The ">>> " prompt causes the first level of indented code to use 8 spaces. Further indented code should use 4 spaces, but still uses 8 spaces likely due to the bug described in #8285. -- keywords: +patch nosy: +ser

[issue4691] IDLE Code Caching Windows

2011-12-08 Thread Roger Serwy
Roger Serwy added the comment: Given Amaury's last message, should this issue be closed as being resolved? -- nosy: +serwy ___ Python tracker ___

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: v.2 looks great to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue8515] idle "Run Module" (F5) does not set __file__ variable

2011-12-08 Thread Roger Serwy
Roger Serwy added the comment: I've encountered this bug several times myself. I applied this patch and it corrects the issue. -- nosy: +serwy versions: +Python 2.7, Python 3.2, Python 3.3 -Python 2.6 ___ Python tracker

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 87c6be1e393a by Victor Stinner in branch 'default': Issue #13441: Don't test the hu_HU locale on Solaris to workaround a mbstowcs() http://hg.python.org/cpython/rev/87c6be1e393a -- ___ Python tracker

[issue6715] xz compressor support

2011-12-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: > Ok, I've e-mailed the owners. Thanks. I was just thinking I should send a reminder, in case they missed the note in my announcement on python-dev. > Will someone write an entry in the "what's new" file for 3.3? Done -- __

[issue6715] xz compressor support

2011-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 66df5ace0eee by Nadeem Vawda in branch 'default': What's New in Python 3.3: Add entry for lzma module (issue #6715). http://hg.python.org/cpython/rev/66df5ace0eee -- ___ Python tracker

[issue13543] shlex with string ending in space gives "ValueError: No closing quotation"

2011-12-08 Thread ekorn
ekorn added the comment: FYI, Min RK commented on the IPython issue: https://github.com/ipython/ipython/issues/1109#issuecomment-3071470 In short, shlex.shlex('blob f(" ")', posix=False) fails, whereas shlex.shlex('blob f( " ")', posix=False) "The problem appears to be that Python source obv

[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize

2011-12-08 Thread STINNER Victor
Changes by STINNER Victor : -- keywords: +patch Added file: http://bugs.python.org/file23886/pyunicode_decodelocale.patch ___ Python tracker ___ _

[issue13560] Add PyUnicode_DecodeLocale and PyUnicode_DecodeLocaleAndSize

2011-12-08 Thread STINNER Victor
New submission from STINNER Victor : To decode byte string from the locale encoding (LC_CTYPE), PyUnicode_DecodeFSDefault() can be used, but this function uses a constant encoding set at startup (the locale encoding at startup). The right method is currently to call _Py_char2wchar() and then P

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Ezio Melotti
Changes by Ezio Melotti : Added file: http://bugs.python.org/file23885/issue13549-2.diff ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-08 Thread STINNER Victor
STINNER Victor added the comment: Changeset 489ea02ed351 changed PyUnicode_FromWideChar() and PyUnicode_FromUnicode(): raise a ValueError if a character in not in range [U+; U+10]. test__locale errors: == ERROR: test

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 93bab8400ca5 by Victor Stinner in branch 'default': Issue #13441: Log the locale when localeconv() fails http://hg.python.org/cpython/rev/93bab8400ca5 -- ___ Python tracker

[issue13547] Clean Lib/_sysconfigdata.py and Modules/_testembed

2011-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8ed2c4d4df62 by Stefan Krah in branch '3.2': Issue #13547: clean Lib/_sysconfigdata.py and Modules/_testembed http://hg.python.org/cpython/rev/8ed2c4d4df62 New changeset 053c95ad09cf by Stefan Krah in branch 'default': Merge fix for issue #13547. h

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Comments: 1. The first sentence is a bit too opinionated for my taste. Consider: map(f, seq) [f(x) for x in seq] The map is *more* concise, by 8 chars, than the list comp and, in *my* opinion, clearer and easier to read without the extra boilerplate and extr

[issue11149] [PATCH] Configure should enable -fwrapv for clang

2011-12-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7efad6256e58 by Stefan Krah in branch '3.2': Issue #11149: Also enable -fwrapv if $CC is a full path http://hg.python.org/cpython/rev/7efad6256e58 New changeset e48df59af394 by Stefan Krah in branch 'default': Merge second fix for issue #11149. htt

[issue13405] Add DTrace probes

2011-12-08 Thread Stan Cox
Stan Cox added the comment: The patch works for systemtap except for one minor nit. pydtrace.h, created by stap from pydtrace.d, is stap specific. Could pydtrace.h not be included in /Include so that it is always created at build time in /Include? If PyEval_GetFrame() were passed via func

[issue13558] multiprocessing package incompatible with PyObjC

2011-12-08 Thread Ned Deily
Ned Deily added the comment: (Reference original discussion in pyobjc-dev mailing list archived here: http://comments.gmane.org/gmane.comp.python.pyobjc.devel/5965) -- ___ Python tracker

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue13559] Use sendfile where possible in httplib

2011-12-08 Thread Benjamin Peterson
New submission from Benjamin Peterson : HTTPConnection.send() should use os.sendfile when possible to avoid copying data into userspace and back. -- components: Library (Lib) keywords: easy messages: 149052 nosy: benjamin.peterson priority: normal severity: normal stage: needs patch sta

[issue13558] multiprocessing package incompatible with PyObjC

2011-12-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +ned.deily versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13558] multiprocessing package incompatible with PyObjC

2011-12-08 Thread Trevor Bentley
New submission from Trevor Bentley : The multiprocessing package appears to spawn a new process by calling only fork(). Apple's CoreFoundation libraries (and possibly more, I do not know the full extent) *require* new processes to be spawned with the full fork()+exec*() combo. When using PyO

[issue13557] exec of list comprehension fails on NameError

2011-12-08 Thread Stephan R.A. Deibel
New submission from Stephan R.A. Deibel : Calling exec() on code that includes a list comprehension that references a defined local variable x fails incorrectly on "NameError: global name 'x' not defined". -- files: execlistcomp.py messages: 149050 nosy: sdeibel priority: normal severi

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread Charles-François Natali
Charles-François Natali added the comment: > my computer has 122GB free RAM 122, or 1.22? > Well, replace cPickle by pickle and it works. cPickle makes some direct call to malloc()/realloc()/free(), contrarily to pickle which uses pymalloc. This could lead to heap fragmentation. What does t

[issue6715] xz compressor support

2011-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le jeudi 08 décembre 2011 à 17:40 +, Nadeem Vawda a écrit : > Nadeem Vawda added the comment: > > > I’ll commit my doc patch to all branches later. > > OK, great. > > > I checked the 4 red 3.3 builbots and they can’t build _lzma. > > For the record, the

[issue6715] xz compressor support

2011-12-08 Thread Nadeem Vawda
Nadeem Vawda added the comment: > I’ll commit my doc patch to all branches later. OK, great. > I checked the 4 red 3.3 builbots and they can’t build _lzma. For the record, the 3.x buildbots that currently aren't able to build the _lzma module are: * x86 Ubuntu Shared * sparc solaris10 gcc *

[issue13556] When tzinfo.utcoffset is out-of-bounds, the exception message is misleading

2011-12-08 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone : When a timezone produces an out-of-bounds utc offset, the resulting exception always claims that the offset was 1440, rather than whatever it was. Example: from datetime import timedelta, datetime, tzinfo class X(tzinfo): def utcoffset(self, time)

[issue13511] ./configure --includedir, --libdir accept multiple

2011-12-08 Thread Ray
Ray added the comment: Compiling using the includedir/libdir flags with colon as separators for the multiple directories got me an error after performing 'make': Makefile:782: *** target pattern contains no `%'. Stop. Additionally, I would like to emphasize the fact that I could not find ano

[issue1757072] Zipfile robustness

2011-12-08 Thread R. David Murray
R. David Murray added the comment: I'm pretty sure that what you are reporting has been fixed by the 'garbage' fix I mentioned (which might better be called the 'more flexible handling of comments' patch). Though not in 2.5 (or 2.6) since they are no longer in maintenance. If you could conf

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Ezio Melotti
Ezio Melotti added the comment: > - I’d recommend a few whitespace beautifications, > like in ``for x in [1,2,3]`` and ``range(1,6)``. Leaving the space out in [1,2,3] makes the expression a bit more readable IMHO*. > I think there is an example that makes that line more > understandable, but

[issue1757072] Zipfile robustness

2011-12-08 Thread James C. Ahlstrom
James C. Ahlstrom added the comment: I received a bug report from a user. He had a zip file created by Mac OS 10.5.8 that the zipfile module claimed was not a valid zip file. The traceback went to function _EndRecData(fpin). The file had a valid comment appended, but recorded a comment len

[issue6715] xz compressor support

2011-12-08 Thread Éric Araujo
Éric Araujo added the comment: I’ll commit my doc patch to all branches later. I checked the 4 red 3.3 builbots and they can’t build _lzma. -- ___ Python tracker ___ ___

[issue5689] Support xz compression in tarfile module

2011-12-08 Thread Éric Araujo
Éric Araujo added the comment: Patch looks great. I did a review on Rietveld. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Éric Araujo
Éric Araujo added the comment: I welcome improvements to this part of the docs. Nested list comps had me quite confused at first: I had to write and execute them to understand how it worked. So, the patch looks good to me. Remarks: - I’d recommend a few whitespace beautifications, like in

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: docs@python -> ezio.melotti keywords: +patch nosy: +eric.araujo, terry.reedy stage: needs patch -> commit review Added file: http://bugs.python.org/file23882/issue13549.diff ___ Python tracker

[issue5905] strptime fails in non-UTF locale

2011-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, it seems defined here: $ grep HAVE_WCSFTIME pyconfig.h 1071:#define HAVE_WCSFTIME 1 > Attached patch should fix this issue. I'm sorry, I can't test the patch, because my Linux distro (Mageia) doesn't have the "fr_FR.ISO8859-15" locale anymore :-(

[issue13546] sys.setrecursionlimit() crashes IDLE

2011-12-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: 'e' is "used" in the comment above: "isinstance(e, ValueError) used to fail"... I agree to use the modern 'as' syntax. -- ___ Python tracker

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Ezio Melotti
Ezio Melotti added the comment: This section could be clearer imho. First of all there's nothing special about "nested" list comprehensions. In [expr for elem in seq], expr might be any expression -- including a listcomp. As with any other expression, the nested listcomp will be executed for

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Is there a way to reproduce that doesn't involve numpy? -- components: +Extension Modules -None nosy: +pitrou ___ Python tracker ___ __

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread maniram maniram
maniram maniram added the comment: Have you checked the system monitor after all cPickle can use more memory than 1GB. -- ___ Python tracker ___ ___

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-08 Thread Stefan Krah
Stefan Krah added the comment: localeconv_wchar.c runs fine on Ubuntu with hu_HU and fi_FI. I tried on OpenSolaris, but I only have UTF-8 locales. The package with ISO locales seems to be SUNWlang-cs-extra, but Oracle took down http://pkg.opensolaris.org/release/ . --

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Mind you, I'm not at all sure about that use of 'apprehension'... -- ___ Python tracker ___ ___ Pyt

[issue13549] Incorrect nested list comprehension documentation

2011-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Isn't the documentation that you refer to about *nested* list comprehensions, rather than list comprehensions with multiple 'for' clauses? E.g.,: [number for row in matrix for number in row] is not a nested list comprehension: it's merely a list compreh

[issue13546] sys.setrecursionlimit() crashes IDLE

2011-12-08 Thread Mark Dickinson
Mark Dickinson added the comment: Style nit: how about 'except ValueError as e' instead of 'except ValueError, e' (Actually, why do we need e?) -- nosy: +mark.dickinson ___ Python tracker

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread Philipp Lies
Philipp Lies added the comment: Well, replace cPickle by pickle and it works. So if there is a memory allocation problem cPickle should be able to handle it, especially since it should be completely compatible to pickle. -- ___ Python tracker

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread maniram maniram
maniram maniram added the comment: Maybe Ubuntu doesn't think it is safe to allocate the memory. -- nosy: +maniram.maniram ___ Python tracker ___ ___

[issue13555] cPickle MemoryError when loading large file (while pickle works)

2011-12-08 Thread Phillies
New submission from Phillies : When I try to load a large file (>1GB) cPickle crashes with a MemoryError: $python test.py Traceback (most recent call last): File "/tmp/test.py", line 8, in A2 = cPickle.load(f2) MemoryError test.py contains following code: import numpy as np import cPickle

[issue1062] nice to have a way to tell if a socket is bound

2011-12-08 Thread maniram maniram
maniram maniram added the comment: oops should be class sock(socket.socket): _bind = socket.socket.bind def bind(self,*args): self.is_bound = True self._bind(self,*args) -- ___ Python tracker

[issue1062] nice to have a way to tell if a socket is bound

2011-12-08 Thread maniram maniram
maniram maniram added the comment: perhaps you can subclass socket.socket and make a function wrapper around bind and connect that sets a variable if called like: class sock(socket.socket): def bind(self,*args): self.is_bound = True -- nosy: +maniram.maniram __

[issue5905] strptime fails in non-UTF locale

2011-12-08 Thread STINNER Victor
STINNER Victor added the comment: Oh! I think that I understood the problem: if HAVE_WCSFTIME is not defined, timemodule.c uses strftime(), instead of wcsftime(), encode input format and decode the format. It uses UTF-8 to encode/decode, whereas the right encoding is the locale encoding. Atta

[issue7136] Idle File Menu Option Improvement

2011-12-08 Thread maniram maniram
maniram maniram added the comment: +1 on renaming New Window to New File -- nosy: +maniram.maniram ___ Python tracker ___ ___ Python-b

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-08 Thread STINNER Victor
STINNER Victor added the comment: See also the issue #7442. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5689] Support xz compression in tarfile module

2011-12-08 Thread STINNER Victor
STINNER Victor added the comment: Some comments about 2011-12-08-tarfile-lzma.diff: > elif self.buf.startswith(b"\x5d\x00\x00\x80") or self.buf.startswith(b"... Micro-optimization: you can use self.buf.startswith((b"\x5d\x00\x00\x80", b"\xfd7zXZ")) here. > raise ValueError("mode must be 'r'

[issue5689] Support xz compression in tarfile module

2011-12-08 Thread Lars Gustäbel
Lars Gustäbel added the comment: For those who want to test it first, I post the current state of the patch here. It is ready for commit, there are no failing tests. If nobody objects, I will apply it this weekend. -- Added file: http://bugs.python.org/file23880/2011-12-08-tarfile-lzm

[issue13441] TestEnUSCollation.test_strxfrm() fails on Solaris

2011-12-08 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org