[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread kxroberto
New submission from kxroberto : With transition from Python2.5 to Python2.6 on current Debian stable I noticed that the python2.6 executable has now 2x size of python2.5's. Half of lib-dynload/* obviously have been embedded into the executable by default. While most of the selections may be so

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread maniram maniram
maniram maniram added the comment: +1 -- nosy: +maniram.maniram ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I didn't know about `make patchcheck`, next time I will use it, thanks. -- ___ Python tracker ___ _

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread maniram maniram
maniram maniram added the comment: Remove the "needs patch" keyword since this bug has a patch. -- nosy: +maniram.maniram ___ Python tracker ___

[issue13573] csv.writer uses str() for floats instead of repr()

2011-12-11 Thread Mark Dickinson
Mark Dickinson added the comment: +1 for fixing this. -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Nick Coghlan
Nick Coghlan added the comment: Explicitly spelling out __qualname__ like that makes the tests a bit too sensitive to otherwise irrelevant details of the test layout. I suggest using comparisons like "self.assertEqual(wrapper.__qualname__, f.__qualname__)" and "self.assertNotEqual(wrapper.__q

[issue13479] pickle too picky on re-defined classes

2011-12-11 Thread kxroberto
kxroberto added the comment: Well, "==" whould allow the wanted feature by exception through meta classes for concerned classes: >>> class X: ... a=1 ... >>> Y=X >>> class X: ... a=1 ... >>> Y==X False >>> class XCompare(type): ... def __eq__(self, other): ... print "

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Fixed tests. -- Added file: http://bugs.python.org/file23912/13544_2.patch ___ Python tracker ___ _

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt added the comment: I already have a patch for the descriptor types which lazily calculates the __qualname__. However test.test_sys also needs fixing because it tests that these types have expected sizes. I have not got round to builtin_function_or_method though. -- keywords: +p

[issue13574] refresh example in doc for Extending and Embedding

2011-12-11 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: +eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt added the comment: Updated patch which fixes test.test_sys.SizeofTest. (It also adds __qualname__ to member descriptors and getset descriptors.) -- Added file: http://bugs.python.org/file23914/descr_qualname.patch ___ Python tracker

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I see this effect in the stock ubuntu 10.04 python 2.6. I can't see it in my selfcompiled binaries for Solaris 10 and 2.7 ubuntu. The reason seems to be that my compilated code uses the python shared libs, while the stock Ubuntu 10.04 python 2.6 is staticall

[issue13579] string.Formatter doesn't understand the !a conversion specifier

2011-12-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 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.

[issue8900] IDLE crashes if Preference set to At Startup -> Open Edit Window

2011-12-11 Thread Roger Serwy
Roger Serwy added the comment: Attached is a patch to fix the bug. When selecting "Open" from the File Menu, "ishanderrunning" is empty. Unbind/Bind requests are handled synchronously. When pressing "Ctrl+O", "ishandlerrunning" is no longer empty, and the actual bind/unbind events get append

[issue13569] Loggers cannot be pickled

2011-12-11 Thread Vinay Sajip
Vinay Sajip added the comment: So, if I understand your last comment correctly, it's OK to close this issue, so I'm going to. If I misunderstood, then please feel free to reopen. -- resolution: -> invalid status: open -> closed ___ Python tracker

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread R. David Murray
R. David Murray added the comment: So isn't this saying that this is a problem with the distribution packaging and not with CPython itself? -- nosy: +barry, r.david.murray ___ Python tracker _

[issue13559] Use sendfile where possible in httplib

2011-12-11 Thread Kasun Herath
Changes by Kasun Herath : -- nosy: +kasun ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread kxroberto
kxroberto added the comment: "Of course, as soon as we use sockets, we will bring SSL in" Indeed, as it is now. Suggestions: * urllib.URLOpener.open_https shall always exist, but fail on runtime. non-existance with strange "AttributeError" is inelegant..bogus. Note: concept of late import

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

2011-12-11 Thread sbt
sbt added the comment: > I don't really know that much about pickle, but Antoine mentioned that > 'bytearray' > works fine going from 3.2 to 2.7. Given that, can't we just compose 'bytes' > with > 'bytearray'? Yes, although it would only work for 2.6 and 2.7. codecs.encode() seems to be ava

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread kxroberto
kxroberto added the comment: "Can you try to compile python using the shared lib" yes I can try lot of things, but I'd need to do this on many machines. Yet I didn't create this issue for some local purpose ;-) 99% of Pythons are installed by apt-get, .msi etc. And now this turns out as bigg

[issue13581] help() appears to be broken; doesn't display __doc__ for class type when called as help(type)

2011-12-11 Thread Christopher the Magnificent
New submission from Christopher the Magnificent : observe help(type) and type.__doc__ in Python 3.1: >>> help(type) Help on class type in module builtins: class type(object) | type(object) -> the object's type | type(name, bases, dict) -> a new type | | Methods defined here: | |

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch should add some tests for the added functionality (I'm not sure where, but perhaps test_descr is a good location). Also, just a nitpick, you can use _PyObject_GetAttrId and the _Py_IDENTIFIER macro instead of interning the "__qualname__" string your

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: >From a fresh-compiled Python 2.7: $ ldd ./python linux-vdso.so.1 => (0x7fff85cde000) libpthread.so.0 => /lib64/libpthread.so.0 (0x7f772f725000) libdl.so.2 => /lib64/libdl.so.2 (0x7f772f521000) libutil.so.1 => /lib64

[issue13564] ftplib and sendfile()

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: os.fstat wouldn't work since it succeeds with non-"regular" files, e.g. standard I/O: >>> os.fstat(0) posix.stat_result(st_mode=8592, st_ino=5, st_dev=11, st_nlink=1, st_uid=500, st_gid=5, st_size=0, st_atime=1323629303, st_mtime=1323629303, st_ctime=1323628

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt added the comment: > Note that extension (non-builtin) types will need to have their > __qualname__ fixed before their methods' __qualname__ is usable: > > >>> collections.deque.__qualname__ > 'deque' I'm confused. Isn't that the expected behaviour? Since the deque class is not nested i

[issue13496] bisect module: Overflow at index computation

2011-12-11 Thread akira
akira <4kir4...@gmail.com> added the comment: Related bug in Java: http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html Do not consider any change as trivial: http://www.solipsys.co.uk/new/BinarySearchReconsidered.html (the author ran "binary search" coding cha

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Note that extension (non-builtin) types will need to have their > > __qualname__ fixed before their methods' __qualname__ is usable: > > > > >>> collections.deque.__qualname__ > > 'deque' > > I'm confused. Isn't that the expected behaviour? Since the deq

[issue13581] help() appears to be broken; doesn't display __doc__ for class type when called as help(type)

2011-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: It fails for the same reason as issue1785: ~/python/cpython3.2$ ./python -c "import inspect; inspect.classify_class_attrs(type)" Traceback (most recent call last): File "", line 1, in File "/home/amauryfa/python/cpython3.2/Lib/inspect.py", line 321,

[issue1785] "inspect" gets broken by some descriptors

2011-12-11 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: The 'type' object now has the same issue: __abstractmethods__ appears in dir(type) but type.__abstractmethods__ fails with an AttributeError. See issue13581 -- nosy: +amaury.forgeotdarc ___ Python tracker

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread kxroberto
kxroberto added the comment: "It doesn't happen in Python 3" Yet the cheap/unnecessary pre-imports of ssl in those other mentioned socket using libs (urllib (cgi!),httplib,smtplib,pop,imap...) exist there. socket is rarely used directly, so not much difference to Py2 in effect overall. And Py

[issue13582] IDLE and pythonw.exe stderr problem

2011-12-11 Thread Roger Serwy
New submission from Roger Serwy : Running IDLE on Windows typically uses pythonw.exe. Unfortunately any error messages written to stderr will cause IDLE to terminate abruptly without an error message. This is due to __stderr__ == None. Attached is a patch against 3.3a0 for idle.pyw to redirect

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: I have written a patch and a test, but since it's changing C code, I am far from being sure if it's achieve the expected behavior in the right way. There are also tests and running whole test suite didn't bring any errors. -- keywords: +patch nosy

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Also: I'll be happy to work further on this patch, if I get some comments and advice. -- ___ Python tracker ___ __

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: If _PyDict_SetItemUsingHash is module-private, it should be declared "static". Also, better if it follows the usual naming of static functions inside that C file (i.e. "dict_some_lowercase_name"). -- stage: needs patch -> patch review ___

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > "It doesn't happen in Python 3" > > Yet the cheap/unnecessary pre-imports of ssl in those other mentioned > socket using libs (urllib (cgi!),httplib,smtplib,pop,imap...) exist > there. socket is rarely used directly, so not much difference to Py2 > in effect

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Filip Gruszczyński
Filip Gruszczyński added the comment: Done. -- Added file: http://bugs.python.org/file23918/13521_2.patch ___ Python tracker ___ ___

[issue13479] pickle too picky on re-defined classes

2011-12-11 Thread Guido van Rossum
Guido van Rossum added the comment: What you're seeing here is just one of may things that go subtly wrong when you reload a class. I don't think we should fix this one aspect while leaving so many other bugs due to the same root cause. It would be better to focus your energy on a way to imp

[issue13583] sqlite3.Row doesn't support slice indexes

2011-12-11 Thread Lucas Sinclair
New submission from Lucas Sinclair : When using the sqlite3.Row object as a row factory, one can access the resulting rows by index (such as row[1]) or by name (such as row['b']). However, the slice functionality is lost, as doing row[0:2] raises the error: "slices not implemented, yet" Here

[issue13405] Add DTrace probes

2011-12-11 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Performance report for current 3.3 tip, using "pybench". BASELINE: (original version without DTRACE patch) --- PYBENCH 2.1 ---

[issue13405] Add DTrace probes

2011-12-11 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : Added file: http://bugs.python.org/file23920/f73be85b9a7e.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue13405] Add DTrace probes

2011-12-11 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : Added file: http://bugs.python.org/file23921/43d1a819a63d.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue13405] Add DTrace probes

2011-12-11 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : Removed file: http://bugs.python.org/file23758/a9f4ae43fd85.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue13405] Add DTrace probes

2011-12-11 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : Removed file: http://bugs.python.org/file23827/2a7dedf6a65e.diff ___ Python tracker ___ ___ Python-bugs-list mail

[issue13570] Expose faster unicode<->ascii functions in the C-API

2011-12-11 Thread Martin v . Löwis
Martin v. Löwis added the comment: It's reasonable that string % formatting might have become slower... I wonder what the issue is at this point. Unless you can state a clear issue that you want to see resolved, I propose to close this report as invalid. -- __

[issue13521] Make dict.setdefault() atomic

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks ok to me. I'll let Raymond make the final call. -- ___ Python tracker ___ ___ Pytho

[issue13516] Gzip old log files in rotating handlers

2011-12-11 Thread Vinay Sajip
Vinay Sajip added the comment: Some people might want other compression methods, e.g. bz2, zip, lzma ... Have you considered subclassing the existing handler classes as in the following example? http://code.activestate.com/recipes/502265-timedcompressedrotatingfilehandler/ Possibly I could c

[issue13405] Add DTrace probes

2011-12-11 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Same calculations for 64 bit binaries: * STOCK PYTHON: --- PYBENCH 2.1 --- * using CPython 3.3.0a0 (def

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread kxroberto
kxroberto added the comment: >> "It doesn't happen in Python 3" >> >> Yet the cheap/unnecessary pre-imports of ssl in those other mentioned >> socket using libs (urllib (cgi!),httplib,smtplib,pop,imap...) exist >> there. socket is rarely used directly, so not much difference to Py2 >> in effect

[issue13584] argparse doesn't respect double quotes

2011-12-11 Thread Phillip Feldman
New submission from Phillip Feldman : I tried switching from `optparse` to `argparse`, but ended up reverting back because `argparse` does not respect double quotes. For example, `optparse` correctly parses the following, while `argparse` does not: python myprog.py --ng --INP="Demo IO" (`

[issue13580] Pre-linkage of CPython >=2.6 binary on Linux too fat (libssl, libcrypto)

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > (I often wonder why software today isn't much faster than years ago - > though the nominal speed of hardware increases tremendously. package > sizes grow, without appropriate growth of functionality. This is one > example how the rescources are wasted too care

[issue13570] Expose faster unicode<->ascii functions in the C-API

2011-12-11 Thread Stefan Krah
Stefan Krah added the comment: Sorry, the title of the issue isn't correct any more. The revised issue is that in 3.3 a) outfil.write("%s\n" % t) is about 11% slower than in Python2.7 and 8% slower than in Python3.2. On the other hand in 3.3 the hack b) outfil.write(str(t)); outfil.write('\

[issue13570] Expose faster unicode<->ascii functions in the C-API

2011-12-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > But if I understand correctly, the slowdown in string formatting is > expected, so we can indeed close this. Well, expected doesn't mean it shouldn't be improved, so finding a way to speed it up would be nice ;) (probably difficult, though) -- nosy:

[issue13577] __qualname__ is not present on builtin methods and functions

2011-12-11 Thread sbt
sbt added the comment: New version of the patch with tests and using _Py_IDENTIFIER. -- Added file: http://bugs.python.org/file23922/descr_qualname.patch ___ Python tracker ___

[issue11886] test_time.test_tzset() fails on "x86 FreeBSD 7.2 3.x": AEST timezone called "EST"

2011-12-11 Thread STINNER Victor
STINNER Victor added the comment: Hum, it's still not ok: == FAIL: test_tzset (test.test_time.TimeTestCase) -- Traceback (most recent call last): File "/u

[issue13561] os.listdir documentation should mention surrogateescape

2011-12-11 Thread STINNER Victor
STINNER Victor added the comment: Can you please write a doc patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue13248] deprecated in 3.2, should be removed in 3.3

2011-12-11 Thread STINNER Victor
STINNER Victor added the comment: .. versionchanged:: 3.2 - The *strict* parameter is deprecated. HTTP 0.9-style "Simple Responses" + The *strict* parameter is removed. HTTP 0.9-style "Simple Responses" are not supported anymore. Such change looks wrong: the parameter exists

[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x

2011-12-11 Thread STINNER Victor
STINNER Victor added the comment: @Barry: can you try to get a trace using gdb? Start python in gdb, set a breapoint on PyErr_SetObject, continue, run the Python command "import _curses", get the gdb traceback (or continue if the error is not the UTF-8 error). -- ___

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Meador Inge
Meador Inge added the comment: On Sun, Dec 11, 2011 at 4:42 AM, Nick Coghlan wrote: > Explicitly spelling out __qualname__ like that makes the tests a bit too > sensitive to otherwise irrelevant details of the test layout. > > I suggest using comparisons like "self.assertEqual(wrapper.__qualn

[issue8538] Add FlagAction to argparse

2011-12-11 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berkerpeksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Nikolaus Rath
New submission from Nikolaus Rath : I'd like to propose addding the CleanupManager class described in http://article.gmane.org/gmane.comp.python.ideas/12447 to the contextlib module. The idea is to add a general-purpose context manager to manage (python or non-python) resources that don't come

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: Here's the first part of the patch with the implementation. I'll add tests and documentation as soon as someone confirms that the idea & API is okay. -- keywords: +patch Added file: http://bugs.python.org/file23923/CleanupManager_patch_v1.diff

[issue12704] Language References does not specify exception raised by final yield()

2011-12-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: Hmm. Does the total lack responses mean agreement, disagreement or lack of interest? I'm attaching a patch against Python 3.3 in the hope of moving this forward. -- keywords: +patch Added file: http://bugs.python.org/file23924/patch_v1.diff __

[issue12704] Language Reference: Clarify behaviour of yield when generator is not resumed

2011-12-11 Thread Nikolaus Rath
Changes by Nikolaus Rath : -- title: Language References does not specify exception raised by final yield() -> Language Reference: Clarify behaviour of yield when generator is not resumed ___ Python tracker __

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: I would like to see this posted as a recipe before being put in the standard library. It needs a chance to mature and to demonstrate that people will want to use it. FWIW, the example is problematic in a couple of ways. The registration of shutil.rmtree

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Nikolaus Rath
Nikolaus Rath added the comment: Not sure what you mean with "posted as a recipe" -- are you thinking of a specific website/mailing list? Example: which one do you mean? The one in the issue or the one in the patch? With statement: what advantages do you have in mind? Try/finally: I think th

[issue13585] Add contextlib.CleanupManager

2011-12-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: ''' Example code: with CleanupManager() als mngr: tmpdir = tempfile.mkdtemp() mngr.register(shutil.rmtree(tmpdir)) <-- this makes the call right away # do stuff with tmpdir ''' The part of my note that should be clear is that the idea and code n

[issue13584] argparse doesn't respect double quotes

2011-12-11 Thread Ned Deily
Changes by Ned Deily : -- nosy: +bethard ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 963e98f5ad31 by Meador Inge in branch 'default': Issue #13544: Add __qualname__ to functools.WRAPPER_ASSIGNMENTS. http://hg.python.org/cpython/rev/963e98f5ad31 -- nosy: +python-dev ___ Python tracker

[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS

2011-12-11 Thread Meador Inge
Meador Inge added the comment: Thanks for the patch Filip. -- resolution: -> fixed stage: patch review -> committed/rejected type: -> behavior ___ Python tracker ___ _

[issue13586] Replace selected not working/consistent with find

2011-12-11 Thread Marco Scataglini
New submission from Marco Scataglini : Entering the Replace dialog (by ctrl+h or from Edit/Replace... menu) with a selection does not auto-magically have the selected text in the find field. This is not consistent with the other find functions (ctrl+f: Find...; alt+F3: Find in Files...; ctrl+F

[issue13573] csv.writer uses str() for floats instead of repr()

2011-12-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf7329190ca6 by Raymond Hettinger in branch '2.7': Issue #13573: The csv.writer now uses the repr() for floats rather than str(). http://hg.python.org/cpython/rev/bf7329190ca6 -- nosy: +python-dev ___ Py