[issue13122] Out of date links in the sidebar of the documentation index of versions 3.1 and 3.2

2011-10-08 Thread Georg Brandl
Georg Brandl added the comment: Nobody said 3.2 was not stable... -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue13060] allow other rounding modes in round()

2011-10-08 Thread Mark Dickinson
Mark Dickinson added the comment: I'm warming to this idea. We already have several round-to-integer functions (but not round-to-an-arbitrary-number-of-decimal-places) available in the math module (under the names floor, ceil and trunc). This *does* seem to be a common need, and it's easy t

[issue10517] test_concurrent_futures crashes with "--with-pydebug" on RHEL5 with "Fatal Python error: Invalid thread state for this thread"

2011-10-08 Thread Charles-François Natali
Charles-François Natali added the comment: Hello, > Did anyone test this fix for case of fork() being called from Python sub > interpreter? > Not specifically, unless it's part of the test suite. Anyway, unless this problem is systematic - which I doubt - it probably wouldn't have helped. >

[issue10141] SocketCan support

2011-10-08 Thread Charles-François Natali
Charles-François Natali added the comment: Working fine on the buildbots and Vinay's box, closing! -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker __

[issue13131] FD leak in urllib2

2011-10-08 Thread Valery Khamenya
New submission from Valery Khamenya : Explanation from dablitz's comment at https://bugs.pypy.org/issue867 : urllib2 in the stdlib leaks fd's if an exception is raised while opening a connection. The issue occurs due to a socket being opened then an exception being raised before an object wit

[issue8087] Unupdated source file in traceback

2011-10-08 Thread Diego Mascialino
Diego Mascialino added the comment: On Fri, Oct 7, 2011 at 5:25 PM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > I'm not sure this is useful to have.  If you changed your code you know that > you have to reload, so why would you want a warning that tells you that you > changed

[issue8087] Unupdated source file in traceback

2011-10-08 Thread Ezio Melotti
Ezio Melotti added the comment: > The source line showed in the traceback could not be the same line executed. My point is that when I see an error and modify the source to fix it, then I know that I'll have to reload. If for some reason I forget to reload, I'll get the wrong line in the tra

[issue13131] FD leak in urllib2

2011-10-08 Thread Valery Khamenya
Valery Khamenya added the comment: by the way, timeout parameter should be set to 0.2 as for my 13Mbit ADSL line. With 0.002 it is not reproducible for my environment -- ___ Python tracker ___

[issue11812] transient socket failure to connect to 'localhost'

2011-10-08 Thread Charles-François Natali
Charles-François Natali added the comment: > Attached patch reads the name of the server socket instead of using > HOST or 'localhost'. > By the way, why do we use 'localhost' instead of '127.0.0.1' for > support.HOST? '127.0.0.1' doesn't depend on the DNS configuration of > the host (especiall

[issue13132] distutils sends non-RFC compliant HTTP request

2011-10-08 Thread Mitchell Hashimoto
New submission from Mitchell Hashimoto : In ``Lib/distutils/command/register.py`` as well as ``upload.py``, the following code exists to build the HTTP request body to send to the cheese shop server: body.write('\nContent-Disposition: form-data; name="%s"'%key) body.write("\n\n") RFC2

[issue13132] distutils sends non-RFC compliant HTTP request

2011-10-08 Thread Mitchell Hashimoto
Mitchell Hashimoto added the comment: Patch attached. -- keywords: +patch Added file: http://bugs.python.org/file23345/issue13132.patch ___ Python tracker ___ __

[issue8087] Unupdated source file in traceback

2011-10-08 Thread Diego Mascialino
Diego Mascialino added the comment: > So to me, your warning will only be useful in the case where I modified the > source, forgot to reload and got the same error again with a wrong line > displayed. Also note that reloading is not so common; usually you just > restart your application and t

[issue12192] Doc that collection mutation methods return item or None

2011-10-08 Thread Mike Hoy
Mike Hoy added the comment: Created a patch based on suggestions here. -- keywords: +patch Added file: http://bugs.python.org/file23346/return-none.diff ___ Python tracker ___ _

[issue13130] test_gdb: attempt to dereference a generic pointer

2011-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Following patch seems to fix it: diff --git a/Tools/gdb/libpython.py b/Tools/gdb/libpython.py --- a/Tools/gdb/libpython.py +++ b/Tools/gdb/libpython.py @@ -1152,7 +1152,7 @@ class PyUnicodeObjectPtr(PyObjectPtr): field_str = field_str.cast(

[issue12192] Doc that collection mutation methods return item or None

2011-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 352d075839f7 by Georg Brandl in branch 'default': Closes #12192: Document that mutating list methods do not return the instance (original patch by Mike Hoy). http://hg.python.org/cpython/rev/352d075839f7 -- nosy: +python-dev resolution: -

[issue13130] test_gdb: attempt to dereference a generic pointer

2011-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset ef1f0434c79c by Antoine Pitrou in branch 'default': Fix test_gdb following the small unicode struct change in c25262e97304 (issue #13130) http://hg.python.org/cpython/rev/ef1f0434c79c -- nosy: +python-dev _

[issue13130] test_gdb: attempt to dereference a generic pointer

2011-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Let's wait for the buildbots. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending ___ Python tracker ___

[issue13112] backreferences in comprehensions

2011-10-08 Thread yoch
yoch added the comment: Okay, thanks ;) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue13130] test_gdb: attempt to dereference a generic pointer

2011-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Seems to have cleared the buildbot failures. -- status: pending -> closed ___ Python tracker ___ __

[issue13125] test_all_project_files() expected failure

2011-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could you arrange to silence stdout/stderr in non-verbose mode? $ ./python -m test -uall test_lib2to3 [1/1] test_lib2to3 ParseError on file /home/antoine/cpython/default/Lib/lib2to3/main.py bad input: type=22, value='=', context=('', (81, 38)) ParseError on fi

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-08 Thread Valery Khamenya
New submission from Valery Khamenya : The attached file reproduces 3 types of FD leaks and leads to the error like: IOError: [Errno 24] Too many open files: '/tmp/1019' For example if executed with pypy. -- components: IO, Library (Lib) files: zipfiletest.py messages: 145182 nosy: Vale

[issue13131] FD leak in urllib2

2011-10-08 Thread Valery Khamenya
Valery Khamenya added the comment: the problem seems to be fixed with the patch attached. Thanks go to fijal@freenode -- keywords: +patch Added file: http://bugs.python.org/file23348/urllib2.patch ___ Python tracker

[issue13131] FD leak in urllib2

2011-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue13131] FD leak in urllib2

2011-10-08 Thread Ezio Melotti
Ezio Melotti added the comment: Pay attention not to introduce regressions like the one in #12576 while fixing this. I'm not sure there are similar tests for urllib2 -- if not they should be added. -- nosy: +ezio.melotti stage: -> patch review __

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-08 Thread Meador Inge
Meador Inge added the comment: I can't reproduce this problem in either 2.7.2 or 3.3.0a0. > For example if executed with pypy. Do you mean that this problem is only reproducible when the attached script is run with pypy? -- nosy: +meador.inge ___ P

[issue13134] speed up finding of one-character strings

2011-10-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : In stringlib/fastsearch, instead of using our own loops, we can use memchr() (and, if available, memrchr()) when looking for one-character strings. memchr() is generally quite optimized; on this Linux/glibc machine, I get speedups of 5x-10x: ./python -m ti

[issue13134] speed up finding of one-character strings

2011-10-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- keywords: +patch Added file: http://bugs.python.org/file23349/memchr.patch ___ Python tracker ___ ___ P

[issue13134] speed up finding of one-character strings

2011-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: With MSVC there seems to be no difference, meaning Windows probably has a naïve memchr() implementation. -- ___ Python tracker ___ ___

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-08 Thread Valery Khamenya
Valery Khamenya added the comment: "I can't reproduce this problem in either 2.7.2 or 3.3.0a0." You probably mean CPython implementation of Python. No, I didn't mean this implementation. "Do you mean that this problem is only reproducible when the attached script is run with pypy?" I can't s

[issue13134] speed up finding of one-character strings

2011-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch with a couple of tests. -- Added file: http://bugs.python.org/file23350/memchr2.patch ___ Python tracker ___

[issue13135] Using type() as a constructor doesn't support new class keyword arguments

2011-10-08 Thread Marty Alchin
New submission from Marty Alchin : PEP 3115 introduced keyword arguments to class definitions and changed metaclasses to use them instead. Unfortunately, `type()` doesn't seem to have been updated to accept those keyword arguments as well. What this amounts to is that using `type()` as a const

[issue13133] FD leaks in ZipFile.read(), ZipFile.extract() and also using explicit arc_member.close()

2011-10-08 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Yes, in 2.7 many parts of the stdlib relies on reference counting to close files. But 3.2 introduced a ResourceWarning which is emitted (in debug mode) each time a __del__ closes a valuable resource like a file or a socket. This was done exactly for t

[issue13136] speed-up conversion between unicode widths

2011-10-08 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch speeds up _PyUnicode_CONVERT_BYTES by unrolling its loop. Example micro-benchmark: ./python -m timeit -s "a='x'*1;b='\u0102'*1000;c='\U0010'" "a+b+c" -> before: 10 loops, best of 3: 14.9 usec per loop -> after: 10 loops, best of 3

[issue13136] speed-up conversion between unicode widths

2011-10-08 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > New submission from Antoine Pitrou : > > This patch speeds up _PyUnicode_CONVERT_BYTES by unrolling its loop. > > Example micro-benchmark: > > ./python -m timeit -s "a='x'*1;b='\u0102'*1000;c='\U0010'" "a+b+c" > > -> be

[issue13136] speed-up conversion between unicode widths

2011-10-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Before going further with this, I'd suggest you have a look at your > compiler settings. They are set by the configure script: gcc -pthread -c -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes-I. -I./Include-DPy_BUILD_CORE -o Objec

[issue13137] from __future__ import division breaks ad hoc numeric types

2011-10-08 Thread Blair
New submission from Blair : I believe that the use of __future__.division may have unintended consequences with user types that define division. The following fails: from __future__ import division class NumericType(object): def __init__(self,x):

[issue13137] from __future__ import division breaks ad hoc numeric types

2011-10-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: You have to implement __truediv__. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker ___ ___

[issue13135] Using type() as a constructor doesn't support new class keyword arguments

2011-10-08 Thread Benjamin Peterson
Benjamin Peterson added the comment: That's not true. You simply call the metaclass itself. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker ___

[issue13135] Using type() as a constructor doesn't support new class keyword arguments

2011-10-08 Thread Marty Alchin
Marty Alchin added the comment: Hrm, that does seem to satisfy the case I was immediately concerned with, but I was thinking there was another issue with it, but now I'm having trouble pinning down an example. I'll just assume I was getting ahead of myself. Thanks for the sanity lesson.

[issue13138] ElementTree's Element.iter() lacks versionadded

2011-10-08 Thread Andreas Stührk
New submission from Andreas Stührk : See http://docs.python.org/whatsnew/2.7.html#updated-module-elementtree-1-3 -- assignee: docs@python components: Documentation files: Element_iter_versionadded.patch keywords: patch messages: 145199 nosy: Trundle, docs@python priority: normal severity

[issue13136] speed-up conversion between unicode widths

2011-10-08 Thread Meador Inge
Meador Inge added the comment: On Sat, Oct 8, 2011 at 5:34 PM, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > >> Before going further with this, I'd suggest you have a look at your >> compiler settings. > > They are set by the configure script: > > gcc -pthread -c -Wno-unused-res

[issue10399] AST Optimization: inlining of function calls

2011-10-08 Thread Meador Inge
Changes by Meador Inge : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13139] multiprocessing.map skips finally blocks

2011-10-08 Thread Daniel Wagner-Hall
New submission from Daniel Wagner-Hall : import random from multiprocessing import Pool from time import sleep def Process(x): try: print x sleep(random.random()) raise Exception('Exception: ' + x) finally: print 'Finally: ' + x Pool(3).map(Process, ['1','2','3']) Expect a

[issue13132] distutils sends non-RFC compliant HTTP request

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: Hi Mitchell, thanks for your interest in Python. Using CLRF was requested before (#10510) and rejected on the ground that the RFC (at least for HTTP 1.0) allows LF. CRLF is preferred but not required. Hence, we deem it is not a bug. The register, upload and u

[issue12533] python-celementtree prevents me from running python develop.py to compile Imprudence Viewer

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: Closing, please reopen if there is more info. -- resolution: -> invalid stage: -> committed/rejected status: pending -> closed versions: -Python 2.7 ___ Python tracker ___

[issue12967] AttributeError distutils\log.py

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: I stand by my opinion that running setup.py from IDLE is not supported. -- resolution: -> wont fix stage: -> committed/rejected status: open -> closed type: compile error -> behavior ___ Python tracker

[issue13136] speed-up conversion between unicode widths

2011-10-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: Marc-Andre: gcc will normally not unroll loops, unless -funroll-loops is given on the command line. Then, it will unroll many loops, and do so with 8 iterations per outer loop. This typically causes significant code bloat, which is why unrolling is normally

[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: > Note the existing test doesn't actually perform a build so the new > test also doesn't, but it does check the core logic Sounds good to me. +def manifest_setup_ldargs I’d make all new methods private ones (i.e. leading underscore). > an embedded manifests T

[issue12436] Missing items in installation/setup instructions

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: > In addition to Notepad++ do you think it would be a good idea to at > least mention Vim and Emacs with a disclaimer about the learning > curve? No. If someone is looking at this page and doesn’t already have a text editor they’re familiar with, I think Notepad+

[issue13123] bdist_wininst uninstaller does not remove pycache directories

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: I don’t have a Windows VM set up yet, but I can try to write a patch in the coming weeks and ask you to test it. Deal? -- stage: -> needs patch ___ Python tracker

[issue3902] Packages containing only extension modules have to contain __init__.py

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: >> We’re working on a patch on the core-mentorship list. > I emailed the diff to the Core-Mentorship list, but since there > was no reply I will just attach it here. I added that message here to avoid someone else working on the same bug. I did not reply to the m

[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2011-10-08 Thread Mark Hammond
Mark Hammond added the comment: Thanks for the review. One note: | +def manifest_setup_ldargs | I’d make all new methods private ones (i.e. leading underscore). They aren't strictly private and are designed to be overridden by subclasses (although in practice, subclassing the compiler is

[issue7833] bdist_wininst installers fail to load extensions built with Issue4120 patch

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: > They aren't strictly private and are designed to be overridden by > subclasses OK. > I do intend forward-porting to 3.3 and also to check it is is too late > for 3.2 (a quick check before implied it might be OK, but I'm not sure) 2.7 and 3.2 are open for bug fix

[issue6164] [AIX] Patch to correct the AIX C/C++ linker argument used for 'runtime_library_dirs'

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: This was fixed in 2.7 and 3.2; no luck for 3.1. -- resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2 -Python 3.1 ___ Python tracker

[issue10945] bdist_wininst depends on MBCS codec, unavailable on non-Windows

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: haypo: > Can't you only work with Unicode and avoid the MBCS encoding? It is not code under the users’ control (i.e. setup.py) that uses MBCS, but the bdist_wininst command itself. It used to be runnable from linux, which is great to provide binary installers fo

[issue11638] pysetup un sdist crashes with weird trace if version is unicode by accident

2011-10-08 Thread Éric Araujo
Éric Araujo added the comment: Does someone want to write a test for this? We have examples of creating tarball sdists in Lib/distutils/tests/test_sdist.py, one would just need to copy one example and use a version with a unicode version. -- keywords: +easy resolution: remind -> ver

[issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute

2011-10-08 Thread Ned Deily
Ned Deily added the comment: I don't have a strong opinion about whether running setup.py in IDLE is supported. But that's not the real issue here. The problem is that the IDLE RPC proxy of the standard IO streams is incomplete, in particular, the 'errors' attribute of io.TextIOWrapper stre

[issue12967] IDLE RPC Proxy for standard IO streams lacks 'errors' attribute

2011-10-08 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: -eric.araujo, tarek ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue10359] ISO C cleanup

2011-10-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset fe0972e102cd by Éric Araujo in branch '3.2': Make C code in one distutils test comply with ISO C (#10359). http://hg.python.org/cpython/rev/fe0972e102cd New changeset 9ded1f21f0fd by Éric Araujo in branch 'default': Make C code in one packaging tes