[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS
Filip Gruszczyński grusz...@gmail.com added the comment: Pleasure :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13544 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6570] Tutorial clarity: section 4.7.2, parameters and arguments
Ezio Melotti ezio.melo...@gmail.com added the comment: Terry, does the latest patch look good to you? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6570 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Antoine Pitrou pit...@free.fr added the comment: Very high-level comments on your patch: - why an empty dtrace module? - I'm worried that you're adding lots of delicate code inside critical core functions. Perhaps most of it can be factored out in separate functions living in another (dtrace-specific) C file? I don't think we really want to maintain some asm(nop) in the GC module, and I'm not even talking about the madness in ceval.c. - instead of generating code data (line numbers etc.) up front, why not generate and cache it lazily? that way, it would only be generated when the probes are really used (IIUC) For higher-level benchmarks, I suggest you take a look at http://hg.python.org/benchmarks/ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Antoine Pitrou pit...@free.fr added the comment: I'm not convinced by the decorator approach. Why not simply add with self.lock at the beginning of each protected method? It would actually save a function call indirection. -- stage: - patch review versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Charles-François Natali neolo...@free.fr added the comment: Alan, I would open a new issue tracking this one and posting a patch there, if I were you. Previous DTRACE attempts failed because trying to make everybody happy. I don't want to repeat the mistake. Sorry, but I'm -1. I don't feel comfortable with adding a such amount of intrusive code, which will have to be maintained as the interpreter evolves, to add probes just for Solaris derivatives, which is, with all due respect, really a niche platform. So If we merge this, this should at least support SystemTap upfront. In fact this instrumentalization can be used to locate hotspots in python interpreter and maybe improve overall performance. You can already go a really long way with just strace and oprofile, I don't really but the performance optimization argument. Also, I must admit I'm quite skeptical about the real benefit of explicit probes for user-land, especially for CPython which isn't used for performance-critical systems... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Giampaolo Rodola' g.rod...@gmail.com added the comment: Are you suggesting to enable thread-synchronization by default and get rid of explicit synchronized argument? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7867] Proposed FAQ entry on pass-by-? semantics and the meaning of 'variable' in python
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +rprosser versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7867 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Antoine Pitrou pit...@free.fr added the comment: Are you suggesting to enable thread-synchronization by default and get rid of explicit synchronized argument? That would be even better indeed, if you find out that there's no significant performance degradation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
anatoly techtonik techto...@gmail.com added the comment: 2011/12/12 Charles-François Natali rep...@bugs.python.org Charles-François Natali neolo...@free.fr added the comment: Alan, I would open a new issue tracking this one and posting a patch there, if I were you. Previous DTRACE attempts failed because trying to make everybody happy. I don't want to repeat the mistake. Sorry, but I'm -1. I don't feel comfortable with adding a such amount of intrusive code, which will have to be maintained as the interpreter evolves, to add probes just for Solaris derivatives, which is, with all due respect, really a niche platform. So If we merge this, this should at least support SystemTap upfront. Is SystemTap an alternative to DTrace? I see that SystemTap is only for Linux, while DTrace is available also on MacOS and FreeBSD. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13577] __qualname__ is not present on builtin methods and functions
Antoine Pitrou pit...@free.fr added the comment: Ok, a couple of further (minor) issues: - I don't think AssertionError is the right exception type. TypeError should be used when a type mismatches (e.g. not an unicode object); - you don't need to check for d_type being NULL, since other methods don't; - if type_qualname == NULL, the original error should be retained. Otherwise, looks good, thank you. -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Giampaolo Rodola' g.rod...@gmail.com added the comment: This is what I get by using bench.py script attached to issue13451: CURRENT VERSION (NO LOCK) test_cancel: time=0.67457 : calls=1 : stdev=0.0 test_empty : time=0.00025 : calls=1 : stdev=0.0 test_enter : time=0.00302 : calls=1 : stdev=0.0 test_queue : time=6.31787 : calls=1 : stdev=0.0 test_run : time=0.00741 : calls=1 : stdev=0.0 LOCK WITH DECORATOR (no synchronization) test_cancel: time=0.70455 : calls=1 : stdev=0.0 test_empty : time=0.00050 : calls=1 : stdev=0.0 test_enter : time=0.00405 : calls=1 : stdev=0.0 test_queue : time=6.23341 : calls=1 : stdev=0.0 test_run : time=0.00776 : calls=1 : stdev=0.0 LOCK WITHOUT DECORATOR (always synchronized) test_cancel: time=0.69625 : calls=1 : stdev=0.0 test_empty : time=0.00053 : calls=1 : stdev=0.0 test_enter : time=0.00397 : calls=1 : stdev=0.0 test_queue : time=6.36999 : calls=1 : stdev=0.0 test_run : time=0.00783 : calls=1 : stdev=0.0 Versions #2 and #3 have the same cost, so it's better to get rid of the explicit argument and always use the lock (version #3). Differences between #1 and #3 suggest that introducing the lock obviously have a cost though. It's not too high IMO, but I couldn't say whether it's acceptable or not. Maybe it makes sense to provide it as a separate class (SynchronizedScheduler). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Antoine Pitrou pit...@free.fr added the comment: Versions #2 and #3 have the same cost, so it's better to get rid of the explicit argument and always use the lock (version #3). Differences between #1 and #3 suggest that introducing the lock obviously have a cost though. It's not too high IMO, but I couldn't say whether it's acceptable or not. It looks quite negligible to me. Nobody should be affected in practice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13580] Pre-linkage of CPython =2.6 binary on Linux too fat (libssl, libcrypto)
kxroberto kxrobe...@users.sourceforge.net 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 careless.) I don't know of any evidence that software slowness has to do with code size. When code isn't called, it doesn't pollute the instruction caches and hence shouldn't affect execution speed. With slowness under the subject here I mean long startup time (and slowness by overall memory impact on small systems like laptops, non-cutting edge hardware, even embedded systems.). Thats what is mainly unpleasant and what seems to not improve appropriately overall. Developers carelessly link bigger and bigger libraries which eats the hardware gains ... There are however some good efforts: For example when Google came out with Chrome (and many after fast responding apps), fast startup time was the striking issue. And the old browsers meanwhile were challenged by that, and improved as well. Please keep Python fast as well. I'm using it since 1.5.2, and that careless fatty degeneration is one of the main things I don't like. Python is a universal language. Most Python progs are small scripts. Overall I wonder why you post here on the main topic resource usage, when you don't care about issues of magnitude 2x memory usage. Why not close this topic for Python at all with your arguments? I understand the concern about py2exe and similar distribution systems (although distribution size should be much less important nowadays than 10 years ago). But, really, it's a separate issue. that is not really a separate issue (because module decoupling is a pre-requisite therefor, a sort of show stopper). And as mentioned its by far not the only issue. For example each cgi script (which has to respond fast and does only a small job), which does import cgi and a few lines; or a script which just uses e.g., urllib string format functions ... : the whole thing is drawn. Well, CGI scripts are a wasteful way to do programmatic page serving. If you care about performance, you should have switched to something like FastCGI or mod_wsgi. And how about other scripts ;-) I'm sure you find everywhere something how you can make all app programmers busy and not take care of the few cheap fixes mentioned in the system to make Python faster und usable easily for everybody. I created this issue to improve Python and make experience significantly faster. You seem to me being too interested in closing issues fast. If you care about performance You have this sort of black-white arguments which are green and somehow really I think, you are perhaps misplaced in this category resource usage. Also the linkage of _ssl solely against a detailed version of libssl/libcrypto is still questionable. I don't know the reasons (if any). Perhaps you can open a separate issue about that? Yet the issue of this library is here now. Why procrastinate? This sentence sounds like you want to dictate us what and how we should work on. That won't fly, sorry. The reason we want to avoid tackling multiple issues in a single tracker entry is simply so that the entries stay readable and searchable. (and, really, most projects' bug trackers work that way, for the same reasons) You are free to divide the issue if you really think its worth multiple. But why close it swift-handed before that is sorted out / set up? I indeed wonder about that careless style here meanwhile. Its not as it was years ago. To me this issues seem to belong rather so close together, that the possible fix should perhaps be made in one go. (The Debians would have gone rather deep into issues when they really created that fine tuning on their own. almost can't believe. There's nothing magical about libssl that would make us link it statically to the executable; it's far too optional a dependency for that. Perhaps Debian has its own bootstrapping requirements that mandate it, or perhaps they simply made a mistake and nobody complained before? Why don't you open an issue on their bug tracker, or at least try to contact them? You would get a definite answer about it. So are you definitely saying/knowing, there is really no such mentioned optimized module selection (~50% of so modules since Python2.5 on Debian) somewhere in the Python build files? (I ask first here to not create unnecessary lots of issues) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8684] improvements to sched.py
Giampaolo Rodola' g.rod...@gmail.com added the comment: New patch in attachment. I'll commit it later today. -- nosy: +rhettinger Added file: http://bugs.python.org/file23925/sched-thread-safe.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8684 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13577] __qualname__ is not present on builtin methods and functions
sbt shibt...@gmail.com added the comment: Patch which add __qualname__ to builtin_function_or_method. Note that I had to make a builtin staticmethod have __self__ be the type instead of None. -- Added file: http://bugs.python.org/file23926/method_qualname.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13451] sched.py: speedup cancel() method
Giampaolo Rodola' g.rod...@gmail.com added the comment: Thread locks introduced in issue8684 should make this change more robust. If this patch is reasonable, I'd like to commit it before the one in issue8684 for simplicity. Raymond? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13577] __qualname__ is not present on builtin methods and functions
sbt shibt...@gmail.com added the comment: Ok, a couple of further (minor) issues: - I don't think AssertionError is the right exception type. TypeError should be used when a type mismatches (e.g. not an unicode object); - you don't need to check for d_type being NULL, since other methods don't; - if type_qualname == NULL, the original error should be retained. Fixed. (I suspect, though, that caching the value of __qualname__ is an unnecessary optimisation.) -- Added file: http://bugs.python.org/file23927/descr_qualname.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9856] Change object.__format__(s) where s is non-empty to a TypeError
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berkerpeksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13580] Pre-linkage of CPython =2.6 binary on Linux too fat (libssl, libcrypto)
Antoine Pitrou pit...@free.fr added the comment: Overall I wonder why you post here on the main topic resource usage, when you don't care about issues of magnitude 2x memory usage. Because you are talking about a fixed overhead of a mere 2MB (IIUC), which is moreover shared between all processes using libssl/libcrypto (and chances are these libraries are already loaded by something else on your system - crypto is useful after all - so Python would actually not add anything substantial in that regard). It is IMHO not interesting at all, but still, you are welcome to post an issue about it if you are concerned. On the other hand, we do care about resource usage issues when they are about dynamic memory consumption, e.g. reducing the size of objects. Or, of course, memory leaks. [...] You have this sort of black-white arguments which are green and somehow really I think, you are perhaps misplaced in this category resource usage. [...] I indeed wonder about that careless style here meanwhile. Its not as it was years ago. Nobody here is interested in exchanging personal attacks, I'm afraid. You are free to divide the issue if you really think its worth multiple. But why close it swift-handed before that is sorted out / set up? It *is* sorted out. You complained about libssl being linked into the executable and it turned out to be Debian-specific. Just because you think there is some kind of big picture problem involved doesn't make it ok to turn this issue into a catch-all for all related issues. So are you definitely saying/knowing, there is really no such mentioned optimized module selection (~50% of so modules since Python2.5 on Debian) somewhere in the Python build files? (I ask first here to not create unnecessary lots of issues) Let's say that I don't know about such a selection, and neither probably do other core developers on this issue, otherwise they would already have chimed in. There is certainly no such documented or tested thing, anyway, so even if there were I wonder why the Debian people would decide to use it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13587] Correcting the typos error in Doc/howto/urllib2.rst
New submission from Bithin A bithin2...@gmail.com: In the documentation 'HOWTO Fetch Internet Resources Using urllib2' there is a correction under the heading 'Basic Authentication' In the line 'The header looks like : ``Www-authenticate: SCHEME realm=REALM``. ' the word 'Www-authenticate' should be written as 'WWW-Authenticate' . Link : docs.python.org/howto/urllib2.html -- assignee: docs@python components: Documentation messages: 149295 nosy: Bithin.A, docs@python priority: normal severity: normal status: open title: Correcting the typos error in Doc/howto/urllib2.rst versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13587 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2, should be removed in 3.3
Changes by Florent Xicluna florent.xicl...@gmail.com: -- dependencies: +Change object.__format__(s) where s is non-empty to a TypeError ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13577] __qualname__ is not present on builtin methods and functions
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 24238e89f938 by Antoine Pitrou in branch 'default': Issue #13577: various kinds of descriptors now have a __qualname__ attribute. http://hg.python.org/cpython/rev/24238e89f938 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2, should be removed in 3.3
Antoine Pitrou pit...@free.fr added the comment: I think most of these shouldn't be removed, as it would make porting from 2.x significantly more tedious. Things that I think can be removed: - max_buffer_size (io is new and that argument was never used by anybody) - get_prefix / set_prefix (the internal lib2to3 API is not documented AFAICT) - the argparse things (argparse is new) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13539] Return value missing in calendar.TimeEncoding.__enter__
psam pk.sam...@gmail.com added the comment: The problem was detected in a Django project, as the template engine was not able to support the original encoding. I don't have a real test code snippet, but you may try something like: isinstance(calendar.LocaleTextCalendar(locale='').formatmonth(2011,12),unicode) Note: for Windows, locale='' or locale='fra_FRA' are ok, not locale='fr_FR' or no specified locale. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13539] Return value missing in calendar.TimeEncoding.__enter__
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13577] __qualname__ is not present on builtin methods and functions
Antoine Pitrou pit...@free.fr added the comment: About method_qualname.patch: - apparently you forgot to add BuiltinFunctionPropertiesTest in test_main()? - a static method keeps a reference to the type: I think it's ok, although I'm not sure about the consequences (Guido, would you have an idea?) - about XXX Note that it is not possible to use __qualname__ to distinguish a builtin bound instance method from its unbound equivalent, I don't think it's a problem. People can e.g. check for __self__: list.append.__self__ Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'method_descriptor' object has no attribute '__self__' list().append.__self__ [] -- nosy: +gvanrossum ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13555] cPickle MemoryError when loading large file (while pickle works)
Philipp Lies p...@bethgelab.org added the comment: a) it's 122GB free RAM (out of 128GB total RAM) b) when I convert the numpy array to a list it works. So seems to be a problem with cPickle and numpy at/from a certain array size c) $ /usr/bin/time -v python test_np.py Traceback (most recent call last): File test_np.py, line 12, in module A2 = cPickle.load(f2) MemoryError Command exited with non-zero status 1 Command being timed: python test_np.py User time (seconds): 73.72 System time (seconds): 4.56 Percent of CPU this job got: 87% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:29.52 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 7402448 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 726827 Voluntary context switches: 41043 Involuntary context switches: 7793 Swaps: 0 File system inputs: 3368 File system outputs: 2180744 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 1 hth -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2, should be removed in 3.3
Changes by Florent Xicluna florent.xicl...@gmail.com: -- dependencies: -Change object.__format__(s) where s is non-empty to a TypeError Added file: http://bugs.python.org/file23928/issue13248_argparse_io_lib2to3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2, should be removed in 3.3
Changes by Florent Xicluna florent.xicl...@gmail.com: Removed file: http://bugs.python.org/file23905/issue13248_obsolescence.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2, should be removed in 3.3
Florent Xicluna florent.xicl...@gmail.com added the comment: I removed object.__format__ from the patch because it is not planned for removal in 3.3, but in 3.4 (see issue #9856). I've fixed the documentation *versionchanged* and split the patch in two. The first is less controversial. The second might be delayed a little to ease the migration from 2.x to 3.x. -- Added file: http://bugs.python.org/file23929/issue13248_obsolescence_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13577] __qualname__ is not present on builtin methods and functions
sbt shibt...@gmail.com added the comment: - apparently you forgot to add BuiltinFunctionPropertiesTest in test_main()? Yes. Fixed. - a static method keeps a reference to the type: I think it's ok, although I'm not sure about the consequences (Guido, would you have an idea?) Interestingly, in the stdlib METH_STATIC is only used by (str|bytes|bytearray).maketrans and _multiprocessing.win32.*. -- Added file: http://bugs.python.org/file23930/method_qualname.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13577 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13585] Add contextlib.CleanupManager
Nikolaus Rath nikol...@rath.org added the comment: On 12/11/2011 10:17 PM, Raymond Hettinger wrote: Raymond Hettinger raymond.hettin...@gmail.com 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 ''' Oh, of course. That is fixed in the patch. I couldn't find a way to edit the message in the tracker. The part of my note that should be clear is that the idea and code need to prove itself before being added to the standard library. So far, there has been zero demand for this and I've not seen code like it being used in the wild. AFAICT, it is not demonstrably better than a straight-forward try/finally. I think it has the same advantages over try...finally as any use of 'with' has. CleanupManager would allow to use 'with' instead of 'try..finally' in many cases where this is currently not possible, so unless the introduction of 'with' itself was a mistake, I think this is just taking a step along the path that has already been chosen. Best, -Nikolaus -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Jesús Cea Avión j...@jcea.es added the comment: According to Stan Cox, this patch almost work with SystemTap. Moreover, there are work porting DTrace to Linux. DTrace helping to improve performance is secondary. The real important thing is the observability. It is difficult to understand the advantages without experimenting directly, but possibilities are endless. Just an example: Yesterday I was kind of worried about the memory cost in the last version. I know that the extra memory used is around 2*n, where n is the bytecode size. But what is that in a real world cost?. I wrote the following dtrace script: unsigned long int tam; unsigned int num; pid$target::PyCode_New:entry { self-flag=1; } pid$target::PyCode_New:return { self-flag=0; } pid$target::PyMem_Malloc:entry /self-flag/ { self-tam=arg0; tam+=arg0; num+=1; printf(\%d %d\, num, tam); } pid$target::PyMem_Malloc:return /self-flag/ { pos[arg1]=self-tam; self-tam=0; } pid$target::PyMem_Free:entry /pos[arg0]/ { num-=1; tam-=pos[arg0]; pos[arg0]=0; } This code bookkeeps details about the extra allocations/deallocations at import/reload() time. Note that this code DOESN'T use the new Python probes. You could use them, for instance, to know which module/function is doing the lion share of imports. You launch this code with dtrace -s SCRIPT.d -c COMMAND. Some real world examples: - Interactive interpreter invocation: 517 blocks, 95128 bytes. - BitTorrent tracker with persistence (DURUS+BerkeleyDB) backend: 2122 blocks, 439332 bytes. - Fully functional LMTP+POP3 server written in Python, with persistence (DURUS+BerkeleyDB) backend: 2182 blocks, 422288 bytes. - RSS to Twitter gateway, with OAuth: 2680 blocks, 556636 bytes. Surprising the import weight that brings feedparser and bitly libraries. So the memory hit seems pretty reasonable. And I can verify it without ANY change in Python. In this case I am launching python inside dtrace because I want to see the complete picture, from the very beginning. But usually you plug a long running python process for a while, without stopping it at all, and when you are done, you shutdown the tracing script... without ANY disturbance of the running python program, that keeps working. For instance, your server code is being slow for some reason *NOW*. You use DTrace to study what the program is doing just NOW. You don't have to stop the program, add debug code to it an launch again and WAIT until the problem happens again, determine that your debug code is not helping, changing it, repeat... This is observability. Difficult to explain. Life sucks when you are used to it and you don't have it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13571] Backup files support in IDLE
Roger Serwy roger.se...@gmail.com added the comment: I rarely have IDLE crash on Linux. If you're experiencing these issues on Windows, see #13582. -- nosy: +serwy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13571 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13580] Pre-linkage of CPython =2.6 binary on Linux too fat (libssl, libcrypto)
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: I just checked the file python2.6_2.6.6-8.diff.gz from the Debian python2.6 package: http://packages.debian.org/squeeze/python2.6 This diff file contains a patch to build _hashlib and _ssl extensions statically that modifies Modules/Setup.dist So it was definitely Debian choice to link to libssl. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13580 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Antoine Pitrou pit...@free.fr added the comment: - Interactive interpreter invocation: 517 blocks, 95128 bytes. Note that http://bugs.python.org/issue13390 also proposes to count allocations in the interpreter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13390] Hunt memory allocations in addition to reference leaks
anatoly techtonik techto...@gmail.com added the comment: How different is the performance cost of this solution compared to inserting DTrace probe for the same purpose? -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13390] Hunt memory allocations in addition to reference leaks
STINNER Victor victor.stin...@haypocalc.com added the comment: How different is the performance cost of this solution compared to inserting DTrace probe for the same purpose? DTrace is only available on some platforms (Solaris and maybe FreeBSD?). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Jesús Cea Avión j...@jcea.es added the comment: - why an empty dtrace module? This is preliminary. I am thinking about dynamic probes, something like logging module but using dtrace. Still experimenting, not sure is actually possible. Martin V Löwis suggested to use sys.flags. Undecided yet. - I'm worried that you're adding lots of delicate code inside critical core functions. Perhaps most of it can be factored out in separate functions living in another (dtrace-specific) C file? I don't think we really want to maintain some asm(nop) in the GC module, and I'm not even talking about the madness in ceval.c. ceval.c madness is greatly reduced in the last version. I was not happy with it either. I am open to suggestions... The point of DTrace probes is its very low overhead. If I change macros to external function calls, your performance will be suffer. That said, I am open to suggestions, more understandable code, etc. - instead of generating code data (line numbers etc.) up front, why not generate and cache it lazily? that way, it would only be generated when the probes are really used (IIUC) This case is special. This data is used by the kernel, when a DTrace script does a jstack(). At this moment you can not CALL anything. You don't even have loops or if. Example: your program seems hangup, aparently. You can write a single line DTrace script to dump the jstack and see what your program is doing, even if it stuck in, let say, a function call. At this moment you can't call ANYTHING. So I precalculate the line offsets at import time, and use the table here. There is little else I can do, in kernel context. For higher-level benchmarks, I suggest you take a look at http://hg.python.org/benchmarks/ Good suggestions. I will check it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13390] Hunt memory allocations in addition to reference leaks
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13390] Hunt memory allocations in addition to reference leaks
anatoly techtonik techto...@gmail.com added the comment: On Mon, Dec 12, 2011 at 6:11 PM, STINNER Victor rep...@bugs.python.orgwrote: STINNER Victor victor.stin...@haypocalc.com added the comment: How different is the performance cost of this solution compared to inserting DTrace probe for the same purpose? DTrace is only available on some platforms (Solaris and maybe FreeBSD?). Solaris http://en.wikipedia.org/wiki/Solaris_(operating_system), Mac OS Xhttp://en.wikipedia.org/wiki/Mac_OS_X , FreeBSD http://en.wikipedia.org/wiki/FreeBSD, NetBSDhttp://en.wikipedia.org/wiki/NetBSD , Oracle Linux http://en.wikipedia.org/wiki/Oracle_Linux according to http://en.wikipedia.org/wiki/DTrace#Supported_platforms, but that doesn't relate to the question. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13390 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Jesús Cea Avión j...@jcea.es added the comment: - Interactive interpreter invocation: 517 blocks, 95128 bytes. Note that http://bugs.python.org/issue13390 also proposes to count allocations in the interpreter. The thing is, I get this data WITHOUT touching python interpreter, using a DTrace script, and when I am done and I kill the script, any malloc/free overhead will disappear. And the program keeps running... Notice too, that the data I am showing is the extra memory I am using for the dtrace stack helper, not all python memory (if you check the dtrace script, I only contabilize PyMem_Malloc() when called from PyCode_New()). DTrace allows me to be quirurgic. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
Antoine Pitrou pit...@free.fr added the comment: Notice too, that the data I am showing is the extra memory I am using for the dtrace stack helper, not all python memory (if you check the dtrace script, I only contabilize PyMem_Malloc() when called from PyCode_New()). DTrace allows me to be quirurgic. I am not disputing the flexibility of dtrace. However, it is also platform-specific, and needs you to learn a dedicated programming language and API. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13572] import _curses fails because of UnicodeDecodeError('utf8' codec can't decode byte 0xb5 ...') on ARM Ubuntu 3.x
Brett Cannon br...@python.org added the comment: This fails for me on OS X Snow Leopard using LLVM 3.0. And I agree with your initial guess, Victor: I don't see how importlib could possibly be the issue here since it's using load_dynamic() and not loading some Python source itself. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13572 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13588] Change name of internal closure functions in importlib
New submission from Brett Cannon br...@python.org: The internal closure functions (eg. wrapper functions used by decorators) should not use generic names like inner() or wrapper(), but descriptive names so that they make sense when read in a traceback. IOW, you shouldn't have to look up the source code to figure out what decorator's wrapper is found in the traceback. -- components: Library (Lib) keywords: easy messages: 149315 nosy: brett.cannon priority: low severity: normal stage: needs patch status: open title: Change name of internal closure functions in importlib type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: terminate abruptly? I thought that print(file=None) silently returned, without printing but without an error. A delayed popup to display (otherwise discarded) output is a nice feature, though. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13582] IDLE and pythonw.exe stderr problem
Roger Serwy roger.se...@gmail.com added the comment: You can try triggering bug #8900 quite simply. From a shell or an editor, press Ctrl+N and then Ctrl+O. Open a file and watch IDLE terminate abruptly. Also, see #12274. If you want to play with this problem further, try adding a raise Exception to a constructor for one of the extensions. Running IDLE using python.exe will display a traceback in the console, but IDLE keeps running. However, IDLE won't even bring up a window when using pythonw.exe; it just fails to launch from the user's perspective. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13582 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13405] Add DTrace probes
anatoly techtonik techto...@gmail.com added the comment: On Mon, Dec 12, 2011 at 6:26 PM, Antoine Pitrou rep...@bugs.python.orgwrote: I am not disputing the flexibility of dtrace. However, it is also platform-specific, and needs you to learn a dedicated programming language and API. If it is flexible, then I won't see any problems to create a pythonic interface for it. If you want to inspect Python in real-time from itself - that's I believe is another story. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13405 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13555] cPickle MemoryError when loading large file (while pickle works)
Charles-François Natali neolo...@free.fr added the comment: @Antoine Couldn't this be linked to #11564 (pickle not 64-bit ready)? AFAICT this wasn't fixed in 2.7. Basically, an integer overflow, and malloc() would bail out when asked a ridiculous size. @Philipp I'd be curious to see the last lines of $ ltrace -e malloc python test_np.py you'll probably see a call to malloc() return NULL. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2, should be removed in 3.3
Éric Araujo mer...@netwok.org added the comment: Given the discussions we’ve had this month and a few months earlier about people porting directly to 3.2 or 3.3, I think the second patch needs to wait for 3.4 or 3.5. (I have no opinion on the first patch, not being a customer of lib2to3 or pyio.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13555] cPickle MemoryError when loading large file (while pickle works)
Charles-François Natali neolo...@free.fr added the comment: @Antoine Couldn't this be linked to #11564 (pickle not 64-bit ready)? Basically, an integer overflow, and malloc() would bail out when asked a ridiculous size. AFAICT this wasn't fixed in 2.7. @Philipp I'd be curious to see the last lines of $ ltrace -e malloc python test_np.py you'll probably see a call to malloc() return NULL. Also, depending on Antoine's answer, trying with default (3.3) could be useful. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13555] cPickle MemoryError when loading large file (while pickle works)
Changes by Charles-François Natali neolo...@free.fr: -- Removed message: http://bugs.python.org/msg149321 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13248] deprecated in 3.2, should be removed in 3.3
Ezio Melotti ezio.melo...@gmail.com added the comment: I think it would be better to decide in what version each thing will be removed and then mark them with the deprecated-removed directive in the doc. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13248 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13539] Return value missing in calendar.TimeEncoding.__enter__
Éric Araujo mer...@netwok.org added the comment: I don’t know this module well, so I’m adding Georg, who last changed that method, and other people from #10092 to the nosy list. -- nosy: +JJeffries, Retro, christian.heimes, georg.brandl, ixokai, r.david.murray, tim.golden, twouters ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13539 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Éric Araujo mer...@netwok.org added the comment: Thanks for the idea Jesús, even though I didn’t get the change to use it :) Filip: Is there a reasons for using a nonlocal count rather than e.g. self.count? Otherwise the test looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5689] Support xz compression in tarfile module
Éric Araujo mer...@netwok.org added the comment: Lars, as part of a small doc patch I want to change this in tarfile.rst: The :mod:`tarfile` module makes it possible to read and write tar archives, including those using gzip or bz2 compression. -(:file:`.zip` files can be read and written using the :mod:`zipfile` module.) +Use the :mod:`zipfile` module to read or write :file:`.zip` files, or the +higher-level functions in :ref:`shutil archiving-operations`. Any objection? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5689 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13555] cPickle MemoryError when loading large file (while pickle works)
Antoine Pitrou pit...@free.fr added the comment: Couldn't this be linked to #11564 (pickle not 64-bit ready)? Well, I don't know anything about numpy, but: 196 * 24 4704 196 * 24 * 8 # assuming 8 bytes per float 37632 2**31 2147483648 So it seems unlikely to be the explanation. After all the report says 1GB for the file size, which is still comfortably in the capabilities of a 32-bit module. Philipp, perhaps you could try to run Python under gdb and try to diagnose where the MemoryError occurs? Also, posting the disassembly (using pickletools.dis()) of a very small equivalent pickle (e.g. of randn(2,3)) could help us know what is involved. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13588] Change name of internal closure functions in importlib
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berkerpeksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13555] cPickle MemoryError when loading large file (while pickle works)
Antoine Pitrou pit...@free.fr added the comment: Oh, what's more interesting is that it works here (Python 2.7.1 and numpy 1.6.1 under Mageia with 8GB RAM). Looking at a pickle disassembly, the only remarkable thing is the presence of a long binary string (the raw serialization of all IEEE floats), which shouldn't give any problem to cPickle (and indeed doesn't). What is your numpy version, Philipp? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13555 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11175] allow argparse FileType to accept encoding and errors arguments
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berkerpeksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11175 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11468] Improve unittest basic example in the doc
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berkerpeksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Antoine Pitrou pit...@free.fr added the comment: Filip: Is there a reasons for using a nonlocal count rather than e.g. self.count? Otherwise the test looks good. Eric, please, could we stop such pointless nitpicking about one's stylistic preferences? nonlocal is as good as any other solution here, and reviewing is not supposed to be a pedantry contest. There are tons of serious issues to be solved where your energy would be better spent, IM(NSH)O. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Filip Gruszczyński grusz...@gmail.com added the comment: I haven't given it much thought, when I was making the choice of using nonlocal rather than self.count. I was rather excited to see, if the change will work as I wanted it to. If you believe it would be better to use an attribute, I'll be happy to change it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Jesús Cea Avión j...@jcea.es added the comment: Well, if this is going to be applied to 2.7, nonlocal is invalid syntax there. I guess that being able to use the same test in 2.7 and 3.2/3.3 would be nice. Style, but justified. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5689] Support xz compression in tarfile module
Lars Gustäbel l...@gustaebel.de added the comment: Please, go ahead! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5689 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13588] Change name of internal closure functions in importlib
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Antoine Pitrou pit...@free.fr added the comment: Well, if this is going to be applied to 2.7, nonlocal is invalid syntax there. Ah, good point. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Filip Gruszczyński grusz...@gmail.com added the comment: I'll send a patch, when I get home from work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11468] Improve unittest basic example in the doc
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I'll be updating this example shortly, but it is intentional that it include only assertEqual, assertTrue, and assertRaises. Those three are the minimum necessary to get up and running (which is the whole point of the BASIC example). -- assignee: docs@python - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Let's just start with a working 2.7 patch and go from there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS
Antoine Pitrou pit...@free.fr added the comment: I suppose the status can be switched to closed? -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13544 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13575] old style classes still alive
Antoine Pitrou pit...@free.fr added the comment: +1. -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13505] Bytes objects pickled in 3.x with protocol =2 are unpickled incorrectly in 2.x
Antoine Pitrou pit...@free.fr added the comment: Only worry is that codecs.latin_1_encode.__module__ is '_codecs', and _codecs is undocumented. It seems we have to choose between two evils here. Given that the codecs.latin_1_encode produces more compact pickles, I'd say go for it. Note that for the empty bytes object (b), the encoding can be massively simplified by simply calling bytes() with no argument. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13505 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13394] Patch to increase aifc lib test coverage with couple of minor fixes
Changes by Oleg Plakhotnyuk oleg...@gmail.com: Removed file: http://bugs.python.org/file23734/test_aifc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13544] Add __qualname__ to functools.WRAPPER_ASSIGNMENTS
Meador Inge mead...@gmail.com added the comment: Yup, oversight on my part. Thanks. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13544 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13394] Patch to increase aifc lib test coverage with couple of minor fixes
Oleg Plakhotnyuk oleg...@gmail.com added the comment: Sounds perfectly reasonable. Here goes the first patch with pure test coverage. -- Added file: http://bugs.python.org/file23931/test_aifc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13575] old style classes still alive
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 021e5bb297d1 by Florent Xicluna in branch 'default': Issue #13575: there is only one class type. http://hg.python.org/cpython/rev/021e5bb297d1 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13575] old style classes still alive
Changes by Florent Xicluna florent.xicl...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13575 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11468] Improve unittest basic example in the doc
Ezio Melotti ezio.melo...@gmail.com added the comment: The patch includes only assertEqual, assertTrue, and assertRaises and, except a s/functions/methods/ in the first line, looks good to me. -- stage: needs patch - commit review versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13589] Aifc float serialization fix
New submission from Oleg Plakhotnyuk oleg...@gmail.com: 1. Fixed _write_float to handle infinity, NaN and negative numbers correctly. 2. Renamed _write_long to _write_ulong because it actually writes unsigned value. 3. Added _read_ushort as counterpart of _write_ushort. This is never used anywhere except test that ushorts are written correctly. But it seems right to me to have both read and write function in the same module. -- components: Library (Lib) files: aifc_numbers_fix.patch keywords: patch messages: 149343 nosy: Oleg.Plakhotnyuk, ezio.melotti, r.david.murray priority: normal severity: normal status: open title: Aifc float serialization fix versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file23932/aifc_numbers_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13589] Aifc float serialization fix
Oleg Plakhotnyuk oleg...@gmail.com added the comment: Patch must be applied after http://bugs.python.org/file23931/test_aifc.patch from issue 13394. Not sure if review tool can handle this correctly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13589] Aifc float serialization fix
Oleg Plakhotnyuk oleg...@gmail.com added the comment: Second patch goes to issue 13589 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13394] Patch to increase aifc lib test coverage with couple of minor fixes
Oleg Plakhotnyuk oleg...@gmail.com added the comment: Second patch goes to issue 13589 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13589] Aifc float serialization fix
Changes by Oleg Plakhotnyuk oleg...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11468] Improve unittest basic example in the doc
Raymond Hettinger raymond.hettin...@gmail.com added the comment: Ezio, please leave this one for me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13585] Add contextlib.CleanupManager
Changes by Nikolaus Rath nikol...@rath.org: Added file: http://bugs.python.org/file23933/CleanupManager_patch_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13394] Patch to increase aifc lib test coverage with couple of minor fixes
Changes by Oleg Plakhotnyuk oleg...@gmail.com: Removed file: http://bugs.python.org/file23931/test_aifc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13394] Patch to increase aifc lib test coverage with couple of minor fixes
Changes by Oleg Plakhotnyuk oleg...@gmail.com: Added file: http://bugs.python.org/file23934/test_aifc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13585] Add contextlib.CleanupManager
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13589] Aifc float serialization fix
Oleg Plakhotnyuk oleg...@gmail.com added the comment: Forget about patch must be applied before thing. I've made independent patch. :-) -- Added file: http://bugs.python.org/file23935/aifc_numbers_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13589] Aifc float serialization fix
Changes by Oleg Plakhotnyuk oleg...@gmail.com: Removed file: http://bugs.python.org/file23932/aifc_numbers_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13589 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11647] function decorated with a context manager can only be invoked once
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13516] Gzip old log files in rotating handlers
Raul Morales raul...@gmail.com added the comment: I use a similar code in my scripts, but I thought it could be useful to have this feature built into python. If you prefer subclassing for compression, what about a compressing subclass built into logging package? If you think it is a good feature, I will be able to work on it next week, and to add support for other formats. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13521] Make dict.setdefault() atomic
Filip Gruszczyński grusz...@gmail.com added the comment: I have tried to port patch to python2.7, but apparently I must be doing something wrong, because while most tests pass, several fail (including tests for unittest itself). I would like to continue working on this test, but incoming week is pretty intensive for me. Is it ok if I returned to working on this during the weekend? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13521 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9856] Change object.__format__(s) where s is non-empty to a TypeError
Florent Xicluna florent.xicl...@gmail.com added the comment: Patch is ready for python 3.4 :-) -- keywords: +patch nosy: +flox Added file: http://bugs.python.org/file23936/issue9856_python-3.4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9856 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13585] Add contextlib.CleanupManager
Sven Marnach s...@marnach.net added the comment: There is actually a second thread on python-ideas on a very similar topic, see http://mail.python.org/pipermail/python-ideas/2011-December/013021.html The two main advantages of the proposed CleanupManager over try/finally blocks are 1. You can add a clean-up function conditionally. In a try/finally block, you would need a flag, which would scatter the single idea more across the code. Example: with CleanupManager() als mngr: if f is None: f = open(some_file) mngr.register(f.close) # do something with f (possibly many lines of code) seems much clearer to me than f_needs_closing = False if f is None: f = open(some_file) f_needs_closing = True try: # do something with f (possibly many lines of code) finally: if f_needs_closing: f.close() The first version is also much more in the spirit of context managers. You state at the beginning we open the file, and guarantee that it will be closed, and we know right from the start that we don't have to bother with it again. 2. CleanupManager could replace several nested try/finally blocks, which again might lead to more readable code. On the other hand, people who never saw ContextManager before will have to look it up, which will impair readability for those people. Adding this as a cookbook recipe first seems like a good idea. -- nosy: +smarnach ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13585] Add contextlib.CleanupManager
Nikolaus Rath nikol...@rath.org added the comment: On 12/12/2011 03:31 PM, Sven Marnach wrote: Adding this as a cookbook recipe first seems like a good idea. This is the second time that this is mentioned, so I would be very grateful if someone could elucidate what adding as a cookbook recipe means :-). Is there an official Python cookbook somewhere? Best, -Nikolaus -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13585] Add contextlib.CleanupManager
Eric Snow ericsnowcurren...@gmail.com added the comment: Check out: http://code.activestate.com/recipes/ -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13516] Gzip old log files in rotating handlers
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I have worked out a possible approach. I will post about it soon, and add a link to it from this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13516 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13590] Prebuilt python-2.7.2 binaries for macosx can not compile c extensions
New submission from K Richard Pixley r...@noir.com: Install the Python-2.7.2 mac installer for Lion on Lion. Then attempt easy_install -U psutil. I get: za-dc-dev/bin/easy_install -U psutil install_dir /Users/rich/projects/za-packages/za-dependency-checker/za-dc-dev/lib/python2.7/site-packages/ Searching for psutil Reading http://pypi.python.org/simple/psutil/ Reading http://code.google.com/p/psutil/ Best match: psutil 0.4.0 Downloading http://psutil.googlecode.com/files/psutil-0.4.0.tar.gz Processing psutil-0.4.0.tar.gz Running psutil-0.4.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7euim1/psutil-0.4.0/egg-dist-tmp-QRoCe6 unable to execute gcc-4.2: No such file or directory error: Setup script exited with error: command 'gcc-4.2' failed with exit status 1 make: *** [za-dc-dev/lib/python2.7/site-packages/psutil-1.1.2-py2.7.egg] Error 1 There is no binary named gcc-4.2 on my system. I'm running the latest Xcode, (4.2.1). And gcc in my PATH is a 4.2 binary: r...@fuji-land.noir.com type gcc gcc is hashed (/usr/bin/gcc) r...@fuji-land.noir.com gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I see no reference to gcc-4.2 in psutils source nor in distutils. From this I guess that the python configuration is looking for the same compiler that was used to produce the package, (presumably on osx-10.6). Other developers tell me that they have a gcc-4.2 on osx-10.6. And indeed, downloading and building python-2.7.2 from source results in a python that can download and compile psutil. -- assignee: ronaldoussoren components: Extension Modules, Macintosh messages: 149356 nosy: ronaldoussoren, teamnoir priority: normal severity: normal status: open title: Prebuilt python-2.7.2 binaries for macosx can not compile c extensions type: compile error versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13590 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com