[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-20 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- dependencies: +Unbinding of methods ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2013-04-20 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have started a new implementation of PEP 3154 since Stefan hasn't been active on his. Moving the discussion to Issue #17810. -- dependencies: -Unbinding of methods resolution: -> out of date stage: patch review -> committed/rejected status: op

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-04-20 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I have restarted the work on PEP 3154. Stefan Mihaila had begun an implementation as part of the Google Summer of Code 2012. Unfortunately, he hit multiple roadblocks which prevented him to finish his work by the end of the summer. He previously shown

[issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS)

2013-04-20 Thread koobs
koobs added the comment: There's some work that's been in the FreeBSD bleachers since Jul 2012 to add futimens() and utimensat(), with some recent activity: RFC: futimens(2) and utimensat(2) - Jul 2012 http://lists.freebsd.org/pipermail/freebsd-arch/2012-February/012409.html RFC: futimens(2)

[issue17809] FAIL: test_expanduser when $HOME ends with /

2013-04-20 Thread koobs
New submission from koobs: test_expanduser in test.test_posixpath.PosixPathTest fails when the users $HOME ends with "/" == FAIL: test_expanduser (test.test_posixpath.PosixPathTest) -

[issue17800] Add gc.needs_finalizing() to check if an object needs finalising

2013-04-20 Thread Alex Gaynor
Changes by Alex Gaynor : -- nosy: +alex, fijall ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue17800] Add gc.needs_finalizing() to check if an object needs finalising

2013-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: Antoine came up with a scheme (see issue 17807) that should eliminate the tp_del implementation from generator objects by moving the cleanup code to the frame deallocation. This will restore Guido's original assumption that types implemented in C won't need to

[issue17807] Generator cleanup without tp_del

2013-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: Just a couple of minor comments on review. Everything else I looked for (including the path where a generator failing to stop during frame deallocation leads to reporting an unraisable exception) seemed fine. One aspect I find interesting is that we've had other

[issue17717] Set up nasm from external.bat

2013-04-20 Thread Zachary Ware
Zachary Ware added the comment: Could you elaborate on what you mean to be done? All I've ever had to do was run the nasm installer and add the install location to PATH. -- ___ Python tracker _

[issue17808] No code example for Event object in threading module

2013-04-20 Thread Andriy Mysyk
Andriy Mysyk added the comment: Example added to threading.rst For example, the following code demonstrates a controlled thread termination using an event object. The event is used to request the termination of several threads. import threading import time stopevent = threading.Event() cl

[issue17808] No code example for Event object in threading module

2013-04-20 Thread Andriy Mysyk
Andriy Mysyk added the comment: See the patch with a code example attached. -- assignee: -> docs@python components: +Documentation keywords: +patch nosy: +docs@python Added file: http://bugs.python.org/file29963/bug17808.patch ___ Python tracker

[issue17808] No code example for Event object in threading module

2013-04-20 Thread Andriy Mysyk
Andriy Mysyk added the comment: I will create a code example by the end of Sunday, April 21. -- ___ Python tracker ___ ___ Python-bugs

[issue17808] No code example for Event object in threading module

2013-04-20 Thread Andriy Mysyk
New submission from Andriy Mysyk: Documentation for Event objects in threading module could be more clear with a code example. http://docs.python.org/3.4/library/threading.html#event-objects -- messages: 187486 nosy: amysyk priority: normal severity: normal status: open title: No code

[issue17807] Generator cleanup without tp_del

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch with added tests. -- Added file: http://bugs.python.org/file29962/gen3.patch ___ Python tracker ___ __

[issue17736] Misleading method comment in _elementtree.c : get_attrib_from_keywords

2013-04-20 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +eli.bendersky stage: -> patch review versions: -Python 3.2, Python 3.5 ___ Python tracker ___ __

[issue17717] Set up nasm from external.bat

2013-04-20 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +terry.reedy, zach.ware ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue17742] Add _PyBytesWriter API

2013-04-20 Thread STINNER Victor
STINNER Victor added the comment: I'm not completly satisfied of bytes_writer-2.patch. Most encoders work directly on a pointer (char*). If I want to keep the code using pointers (because it is efficient), I have to resynchronize the writer and the pointer before and after calling writer metho

[issue3693] Obscure array.array error message

2013-04-20 Thread Ezio Melotti
Changes by Ezio Melotti : -- stage: needs patch -> commit review versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ ___ Python-bu

[issue17807] Generator cleanup without tp_del

2013-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file29960/gen2.patch ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue17807] Generator cleanup without tp_del

2013-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file29959/gen2.patch ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue17468] Generator memory leak

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've opened issue17807 for an alternative generator cleanup scheme which solves the present issue. -- ___ Python tracker ___ __

[issue17807] Generator cleanup without tp_del

2013-04-20 Thread Antoine Pitrou
New submission from Antoine Pitrou: This experimental patch proposes to defer generator cleanup to the frame itself. In this scheme, the generator frame's tp_clear throws the GeneratorExit if necessary, so as to call cleanup code. The generator doesn't have any tp_del anymore, as it is now imp

[issue17806] Add keyword args support to str/bytes.expandtabs()

2013-04-20 Thread Ezio Melotti
New submission from Ezio Melotti: The attached patch adds keyword args support to str/bytes.expandtabs(): >>> 'a\tb'.expandtabs(tabsize=8) 'a b' >>> b'a\tb'.expandtabs(tabsize=8) b'a b' -- assignee: ezio.melotti components: Interpreter Core files: expandtabs.diff keywords: pa

[issue17670] Improve str.expandtabs() doc

2013-04-20 Thread Ned Deily
Changes by Ned Deily : Added file: http://bugs.python.org/file29957/issue17670_doc_rev_2.patch ___ Python tracker ___ ___ Python-bugs-list mai

[issue17742] Add _PyBytesWriter API

2013-04-20 Thread STINNER Victor
STINNER Victor added the comment: > It may eventually get one, though. If a use case for the "read-only hack" comes, the hack can be added again later. It's better to start with something simple and extend it with new use cases. -- ___ Python track

[issue17670] Improve str.expandtabs() doc

2013-04-20 Thread Ned Deily
Ned Deily added the comment: Another round based on comments. I also just noticed that the current doc incorrectly claims that tabs are replaced by *zero* or more spaces. Return a copy of the string where all tab characters are replaced by one or more spaces, depending on the current co

[issue17742] Add _PyBytesWriter API

2013-04-20 Thread R. David Murray
R. David Murray added the comment: It may eventually get one, though. -- nosy: +r.david.murray ___ Python tracker ___ ___ Python-bugs-

[issue17618] base85 encoding

2013-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are some bugs in ascii85 end base85 implementations (see in Rietveld for details). Besides, ascii85 implementation was too slow. I've prepared a patch that corrects errors and speeds up encoding and decoding. Microbenchmarks: ./python -m timeit -r 1 -

[issue17742] Add _PyBytesWriter API

2013-04-20 Thread STINNER Victor
STINNER Victor added the comment: > The patch contains a special case for writing only one bytes object. > This is very unlikely case. The patch only modify a few functions to make them use the new _PyBytesWriter API. Other functions can use it. A few examples: - PyBytes_FromObject() - bina

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-20 Thread Mike Lundy
Mike Lundy added the comment: On top of your patch? Yeah, I think so. (I wrote it the way I did so it could handle syslog configuration changes, but that's kind of an uncommon case). Thanks! -- ___ Python tracker

[issue16754] Incorrect shared library extension on linux

2013-04-20 Thread kent
Changes by kent : -- nosy: +Thekent ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mail

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-20 Thread STINNER Victor
STINNER Victor added the comment: I guess that test_extract_unicode_filenames_skip.patch will not fix the failing test. The test fails because u"\xf6.txt" cannot be encoded to sys.getfilesystemencoding() (which is ASCII on the FreeBSD buildbot). You should test u"\xf6.txt". You should move th

[issue17762] platform.linux_distribution() should honor /etc/os-release

2013-04-20 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue17804] streaming struct unpacking

2013-04-20 Thread Phil Connell
Changes by Phil Connell : -- nosy: +pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the explanation. I guess I don't like the code duplication that this patch adds. Perhaps a macro hiding the "memo_get" code blocks? Also, adding your explanation as a comment would be nice too. -- ___ Pyt

[issue17804] streaming struct unpacking

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > - I'm no expert on the C API, but in s_iter_unpack do you not need to > check for failure of PyType_GenericAlloc before calling > PyObject_GetBuffer? Yes, good catch. > - I'm not a fan of separate iter_ functions (and there seemed to be a > general move away

[issue17804] streaming struct unpacking

2013-04-20 Thread Martin Morrison
Martin Morrison added the comment: On 20 Apr 2013, at 23:01, Martin Morrison wrote: > - I'm not a fan of separate iter_ functions (and there seemed to be a general > move away from them elsewhere in Python3; obviously here we have to maintain > backwards compat though). Perhaps a boolean keywo

[issue17805] No such class: multiprocessing.pool.AsyncResult

2013-04-20 Thread Ned Deily
Changes by Ned Deily : -- nosy: +sbt versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 ___ Python tracker ___ ___ Python-bugs

[issue17804] streaming struct unpacking

2013-04-20 Thread Martin Morrison
Martin Morrison added the comment: I like the idea of this. Two comments: - I'm no expert on the C API, but in s_iter_unpack do you not need to check for failure of PyType_GenericAlloc before calling PyObject_GetBuffer? - I'm not a fan of separate iter_ functions (and there seemed to be a gene

[issue17804] streaming struct unpacking

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, here is the benchmark script. -- Added file: http://bugs.python.org/file29955/bench_unpack.py ___ Python tracker ___ ___

[issue17804] streaming struct unpacking

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, according to a quick benchmark, iter_unpack() is 3x to 6x faster than the grouper() + unpack() recipe. (it's also a bit more user-friendly) -- ___ Python tracker ___

[issue17804] streaming struct unpacking

2013-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps we need not iter_unpack(), but a grouper (some sort of)? def grouper(seq, size): for i in range(0, len(seq), size): yield seq[i: i + size] unpack = struct.Struct('!I').unpack for chunk in grouper(data, 4): word, = unpack(chunk) ...

[issue17805] No such class: multiprocessing.pool.AsyncResult

2013-04-20 Thread Takafumi Arakaki
New submission from Takafumi Arakaki: Document mentions AsyncResult but there is no such class. http://docs.python.org/2/library/multiprocessing.html#multiprocessing.pool.AsyncResult You can check it by simply running: python -c 'from multiprocessing.pool import AsyncResult' I think it means Ap

[issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8

2013-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson, georg.brandl, larry priority: normal -> release blocker ___ Python tracker ___ __

[issue17804] streaming struct unpacking

2013-04-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +isoschiz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue17804] streaming struct unpacking

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch (still lacking docs). Comments welcome. -- keywords: +patch Added file: http://bugs.python.org/file29953/iter_unpack.patch ___ Python tracker __

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-20 Thread Vinay Sajip
Vinay Sajip added the comment: Does that mean that if I just change the default back to socktype=None, that will be good enough? -- ___ Python tracker ___ __

[issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8

2013-04-20 Thread Ned Deily
Ned Deily added the comment: Dave, any reason this shouldn't go into the imminent 2.7.5 and 3.3.2 releases? -- nosy: +ned.deily stage: patch review -> commit review versions: +Python 2.7, Python 3.3, Python 3.4 -Python 3.1, Python 3.2 ___ Python track

[issue17646] traceback.py has a lot of code duplication

2013-04-20 Thread Martin Morrison
Martin Morrison added the comment: On 20 Apr 2013, at 18:55, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > Could print_exception() in Lib/idlelib/run.py reuse new traceback functions? Actually, cleaning up code like that in Idle and the code module and import.c was what I

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch which skips test_extract_unicode_filenames if no Unicode filesystem semantics on this platform. -- Added file: http://bugs.python.org/file29952/test_extract_unicode_filenames_skip.patch ___ Python

[issue17801] Tools/scripts/gprof2html.py: `#! /usr/bin/env python32.3`

2013-04-20 Thread Ned Deily
Ned Deily added the comment: Thanks for the report! -- nosy: +ned.deily resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 ___ Python tracker

[issue17801] Tools/scripts/gprof2html.py: `#! /usr/bin/env python32.3`

2013-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0c308d65d7bc by Ned Deily in branch '2.7': Issue #17801: fix shebang line of gprof2html.py http://hg.python.org/cpython/rev/0c308d65d7bc New changeset 354e4d096c34 by Ned Deily in branch '3.3': Issue #17801: fix shebang line of gprof2html.py http://

[issue17787] Optimize pickling function dispatch in hot loops.

2013-04-20 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Are you asking why do we need to call both PyMemoTable_Get and memo_get? Or, why do we fetching the memo was moved to the save functions? For the former, there is no real reason. The extra call could be removed though profiling doesn't show this call as

[issue17804] streaming struct unpacking

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: (my initial intuition here was to use memoryview.cast() but it doesn't support non-native formats) -- nosy: +skrah ___ Python tracker ___ _

[issue17530] pprint could use line continuation for long bytes literals

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I hadn't noticed that pretty-printing a single string didn't add the parentheses as desired: >>> pprint.pprint("abcd " * 6, width=15) 'abcd abcd ' 'abcd abcd ' 'abcd abcd ' On the other hand, the added parentheses aren't needed when inside a container (li

[issue17804] streaming struct unpacking

2013-04-20 Thread Antoine Pitrou
New submission from Antoine Pitrou: For certain applications, you want to unpack repeatedly the same pattern. This came in issue17618 (base85 decoding), where you want to unpack a stream of bytes as 32-bit big-endian unsigned ints. The solution adopted in issue17618 patch (struct.Struct("!{}I"

[issue17720] pickle.py's load_appends should call append() on objects other than lists

2013-04-20 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17720] pickle.py's load_appends should call append() on objects other than lists

2013-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 37139694aed0 by Alexandre Vassalotti in branch '3.3': Isuse #17720: Fix APPENDS handling in the Python implementation of Unpickler http://hg.python.org/cpython/rev/37139694aed0 -- nosy: +python-dev ___ Py

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-20 Thread Christian Heimes
Christian Heimes added the comment: it seems like file() can't handle unicode file names on FreeBSD. The FS encoding is 'US-ASCII' on Snakebite's FreeBSD box. > /home/cpython/users/christian.heimes/2.7/Lib/zipfile.py(1078)_extract_member() -> with self.open(member, pwd=pwd) as source, \ (Pdb) s

[issue17785] Use faster URL shortener for perf.py

2013-04-20 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue17785] Use faster URL shortener for perf.py

2013-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1488e1f55f61 by Alexandre Vassalotti in branch 'default': Issue #17785: Use a faster URL shortener for perf.py http://hg.python.org/benchmarks/rev/1488e1f55f61 -- nosy: +python-dev ___ Python tracker

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14805] Support display of both __cause__ and __context__

2013-04-20 Thread Philip Jenvey
Philip Jenvey added the comment: and the code module (after #17442 is resolved) -- nosy: +pjenvey ___ Python tracker ___ ___ Python-bu

[issue4934] tp_del and tp_version_tag undocumented

2013-04-20 Thread Alex Leach
Alex Leach added the comment: I've just ran into tp_version_tag, when running the boost python testsuite and wondered what it was... Since upgrading to GCC 4.8, I've started to get a lot more warnings with Python extensions, e.g.:- boost/python/opaque_pointer_converter.hpp:122:14: warning: mis

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-20 Thread Mike Lundy
Mike Lundy added the comment: It doesn't fix it unless I change the configuration (and in some cases the code) for every SyslogHandler across all of our projects, plus every single library we use. Google around For "SysLogHandler /dev/log socktype" and then compare with "SysLogHandler /dev/log

[issue9682] socket.create_connection error message for domain subpart with invalid length is very confusing

2013-04-20 Thread R. David Murray
R. David Murray added the comment: The message in both branches of the if talk about empty labels, which is probably my fault since I got the sense of the if wrong in my suggestion. One of them should be about the label being too long. The one that should be the 'empty' message also doesn't

[issue17409] resource.setrlimit doesn't respect -1

2013-04-20 Thread Paul Price
Paul Price added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue14805] Support display of both __cause__ and __context__

2013-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And don't forget about print_exception() in Lib/idlelib/run.py. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue17646] traceback.py has a lot of code duplication

2013-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could print_exception() in Lib/idlelib/run.py reuse new traceback functions? -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue16942] urllib still doesn't support persistent connections

2013-04-20 Thread Senthil Kumaran
Senthil Kumaran added the comment: Agree with Demian Brecht. This issue is being closed in when two issues cover the requirements discussed here. * issue# 16901 - For Enhancing FileCookieJar * issue# 9740 - For supporting persistant HTTP 1.1 connections. (:-( on me) -- nosy: +orsenth

[issue17409] resource.setrlimit doesn't respect -1

2013-04-20 Thread R. David Murray
R. David Murray added the comment: There being no objection :) I've committed the patch. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue17409] resource.setrlimit doesn't respect -1

2013-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 186f6bb3e46a by R David Murray in branch '3.3': #17409: Document RLIM_INFINITY and use it to clarify the setrlimit docs. http://hg.python.org/cpython/rev/186f6bb3e46a New changeset 9c4db76d073e by R David Murray in branch '2.7': #17409: Document RLI

[issue16694] Add pure Python operator module

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've now commited the latest patch. Thank you very much, Zachary! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue16694] Add pure Python operator module

2013-04-20 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97834382c6cc by Antoine Pitrou in branch 'default': Issue #16694: Add a pure Python implementation of the operator module. http://hg.python.org/cpython/rev/97834382c6cc -- nosy: +python-dev ___ Python tra

[issue17547] "checking whether gcc supports ParseTuple __format__... " erroneously returns yes with gcc 4.8

2013-04-20 Thread Alex Leach
Alex Leach added the comment: The configure.ac patch works for me, on x86_64 Arch Linux. I just updated to GCC-4.8.0 and came across an overwhelming number of these warnings when compiling extension modules. Thanks for the simple fix David. Tested on hg branch 2.7; the testsuite completes with

[issue17800] Add gc.needs_finalizing() to check if an object needs finalising

2013-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: Yeah, I've figured out that rather than exposing __del__ if tp_del is populated, or generalising the generator special case, the simplest way to make this info accessible is to be able to ask the *garbage collector* if it thinks an object needs finalising. That

[issue17468] Generator memory leak

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > We *don't care* if the generator *would* have caught the thrown > GeneratorExit, we only care about ensuring that finally blocks are > executed (including those implied by with statements). So if there > aren't any finally clauses or with statements in the bloc

[issue17800] Expose __del__ when tp_del is populated from C code

2013-04-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't understand why we need to invent a protocol for this. The gc module already has methods and members for introspecting the collection. I don't think the gen special casing currently needs to be generalized. (What would use it?) -- __

[issue17800] Expose __del__ when tp_del is populated from C code

2013-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: Calling __del__ explicitly shouldn't be any worse than doing the same thing for any other type implemented in Python (or, in the case of generators, calling close() multiple times). What I'm mostly interested in is the "can this type cause uncollectable cycles"

[issue17468] Generator memory leak

2013-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: To get back to Anssi's original suggestion... I think Anssi's proposal to allow finalisation to be skipped for try/except/else is legitimate. It's only finally clauses that we try to guarantee will execute, there's no such promise implied for ordinary except cla

[issue17792] Unhelpful UnboundLocalError due to del'ing of exception target

2013-04-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Ezio, the problem with your patch is that it also gives a warning on this code, which is totally safe: def good(): exc = None try: bar(int(sys.argv[1])) except KeyError as e: print('ke') exc = e except ValueError as e:

[issue968063] Add fileinput.islastline()

2013-04-20 Thread Mark Lawrence
Mark Lawrence added the comment: The latest patch still applies cleanly, can we have it reviewed please. -- nosy: +BreamoreBoy versions: +Python 3.4 -Python 3.3 ___ Python tracker _

[issue17468] Generator memory leak

2013-04-20 Thread Nick Coghlan
Nick Coghlan added the comment: We can't make ordinary generators innately context managers, as it makes the error too hard to detect when you accidentally leave out @contextmanager when using a generator to write a custom one. You can already use contextlib.closing to forcibly close them when

[issue17800] Expose __del__ when tp_del is populated from C code

2013-04-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue17656] Python 2.7.4 breaks ZipFile extraction of zip files with unicode member paths

2013-04-20 Thread koobs
koobs added the comment: heads-up: Tests are still failing on FreeBSD (gcc & clang) buildbots: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%202.7/builds/472/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%2Bclang%202.7/builds

[issue17192] libffi-3.0.13 import

2013-04-20 Thread R. David Murray
Changes by R. David Murray : -- status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue17800] Expose __del__ when tp_del is populated from C code

2013-04-20 Thread Martin Morrison
Changes by Martin Morrison : -- nosy: +isoschiz ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue17646] traceback.py has a lot of code duplication

2013-04-20 Thread Martin Morrison
Martin Morrison added the comment: On 20/04/2013 03:54, Benjamin Peterson wrote: > It would be great to have a test for that. :) I was afraid you'd say that. ;-) I'll look at adding test cases to cover the functions not currently covered (seems most of the print functions aren't, and all of the

[issue17800] Expose __del__ when tp_del is populated from C code

2013-04-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: What exactly would calling such a wrapper do? -- nosy: +benjamin.peterson ___ Python tracker ___

[issue17192] libffi-3.0.13 import

2013-04-20 Thread koobs
koobs added the comment: These break what was addressed in #11729 for default, 3,x and 3.3. 2.7 seems to have made it through unscathed. I'm not sure where or how the old code was introduced, but the clang fix has been upstreamed and is correct in the pure libffi 3.0.13 sources Failure to bui

[issue6359] pyexpat.c calls trace function incorrectly for exceptions

2013-04-20 Thread Ned Batchelder
Ned Batchelder added the comment: Attached a patch which simply removes the code that invokes the trace function. -- keywords: +patch Added file: http://bugs.python.org/file29951/6539.patch ___ Python tracker __

[issue17468] Generator memory leak

2013-04-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: I realize, but if people were responsible and closed their generators, the second one would be as much of a problem. -- ___ Python tracker _

[issue14621] Hash function is not randomized properly

2013-04-20 Thread Martin Morrison
Changes by Martin Morrison : -- nosy: +isoschiz, pconnell ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue17468] Generator memory leak

2013-04-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Those are two different issues: - not calling the finalizer in a timely manner - never calling the finalizer and creating a memory leak through gc.garbage -- ___ Python tracker ___

[issue17468] Generator memory leak

2013-04-20 Thread Benjamin Peterson
Benjamin Peterson added the comment: In a sense, doing something like "with self.lock" in a generator is already a leak. Even if there wasn't a cycle, collection could be arbitrarily delayed (in partincular on non-CPython VMs). I wonder if making generators context managers which call close()

[issue17803] Calling Tkinter.Tk() with a baseName keyword argument throws UnboundLocalError

2013-04-20 Thread R. David Murray
R. David Murray added the comment: Thanks for the report and patch. It would be nice to turn that test into a unit test. I've run the test on 3.4; this appears to be a 2.7 only bug. -- nosy: +r.david.murray stage: -> test needed ___ Python tracker

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-20 Thread Vinay Sajip
Vinay Sajip added the comment: I've attached an alternative patch. The default socktype stays as socket.SOCK_DGRAM, but you can specify socktype=None to get the SOCK_DGRAM falling back to SOCK_STREAM behaviour. Can you confirm that this alternative approach works in your environment? (This pa

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-20 Thread Vinay Sajip
Changes by Vinay Sajip : Added file: http://bugs.python.org/file29950/6e46f4e08717.diff ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue17795] backwards-incompatible change in SysLogHandler with unix domain sockets

2013-04-20 Thread Vinay Sajip
Changes by Vinay Sajip : -- hgrepos: +183 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue17272] request.full_url: unexpected results on assignment

2013-04-20 Thread R. David Murray
R. David Murray added the comment: Thanks for working on this, Demian. I made some review comments, mostly style things about the tests. There's one substantial comment about the change in behaivor of the full_url property though (before patch it does not include the fragment, after the patch

  1   2   >