[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: +def __eq__(self, other): +r = (type(self) == type(other)) +if r: +return r I think this should be "if not r". -- ___ Python tracker __

[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-03 Thread Lance Hepler
Lance Hepler added the comment: Hello all, sorry to be a bother, but what's the progress on this issue? I have a codebase that requires resolution of this issue to enable multiprocessing. What are the remaining outstanding problems herein preventing the attached patches from being merged? --

[issue12880] ctypes: clearly document how structure bit fields are allocated

2011-10-03 Thread Meador Inge
Meador Inge added the comment: Added some comments in rietveld. P.S. watch out for trailing whitespace when writing patches. Use 'make patchcheck' to help find bad whitespace formatting. -- ___ Python tracker __

[issue12880] ctypes: clearly document how structure bit fields are allocated

2011-10-03 Thread Meador Inge
Meador Inge added the comment: On Fri, Sep 30, 2011 at 12:19 PM, Vlad Riscutia wrote: > I believe this is the better thing to do rather than detailing how GCC and > MSVC allocated their bitfields because that would just > encourage people to use this feature incorrectly. So clearly documenti

[issue12881] ctypes: segfault with large structure field names

2011-10-03 Thread Meador Inge
Meador Inge added the comment: Fixed. Opened issue13096 and issue13097 for the other crashers. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue13097] ctypes: segfault with large number of callback arguments

2011-10-03 Thread Meador Inge
New submission from Meador Inge : Reproducible in 2.7 and tip: [meadori@motherbrain cpython]$ ./python Python 3.3.0a0 (default:61de28fa5537+d05350c14e77+, Oct 3 2011, 21:47:04) [GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux Type "help", "copyright", "credits" or "license" for more informati

[issue13096] ctypes: segfault with large POINTER type names

2011-10-03 Thread Meador Inge
Meador Inge added the comment: There is similar crasher to this one that can be reproduced like: [meadori@motherbrain cpython]$ ./python Python 3.3.0a0 (default:61de28fa5537+d05350c14e77+, Oct 3 2011, 21:47:04) [GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux Type "help", "copyright", "credi

[issue13096] ctypes: segfault with large POINTER type names

2011-10-03 Thread Meador Inge
New submission from Meador Inge : Reproducible in 2.7 and tip: [meadori@motherbrain cpython]$ ./python Python 3.3.0a0 (default:61de28fa5537+d05350c14e77+, Oct 3 2011, 21:47:04) [GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux Type "help", "copyright", "credits" or "license" for more informati

[issue12881] ctypes: segfault with large structure field names

2011-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa3ebc2dfc15 by Meador Inge in branch '2.7': Issue #12881: ctypes: Fix segfault with large structure field names. http://hg.python.org/cpython/rev/aa3ebc2dfc15 New changeset d05350c14e77 by Meador Inge in branch '3.2': Issue #12881: ctypes: Fix seg

[issue1887] distutils doesn't support out-of-source builds

2011-10-03 Thread Matt Joiner
Changes by Matt Joiner : -- nosy: +anacrolix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12053] Add prefetch() for Buffered IO (experiment)

2011-10-03 Thread John O'Connor
John O'Connor added the comment: Here is an update with the C implementation. I think a working prototype will be helpful before another round on python-dev. I'm not sure how to handle unseekable, non-blocking streams where the read returns before `skip` bytes are exhausted. If prefetch() r

[issue13081] Crash in Windows with unknown cause

2011-10-03 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- type: -> crash ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13095] Support for splitting lists/tuples into chunks

2011-10-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: These have been rejected before. There is always a trade-off in adding tools such as this -- it can take more time to learn and remember them than to write a trivial piece of code to do it yourself. Another issue is that people tend to disagree on how to

[issue4765] IDLE fails to "Delete Custom Key Set" properly

2011-10-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Note the config-main.cfg contains all custom configurations and appears if you make any one of them. Mine currently says [EditorWindow] font = lucida sans unicode [General] autosave = 1 So deleting it is a hack workaround until the bug is fixed. --

[issue13071] IDLE accepts, then crashes, on invalid key bindings.

2011-10-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: While this issue and #4765 are about the same effect, with a similar workaround, Amaury has indentified a separate bug in the custom key mechanism. So I retitled it to refer to that bug. -- title: IDLE refuses to open on windows 7 -> IDLE accepts, the

[issue13081] Crash in Windows with unknown cause

2011-10-03 Thread Santoso Wijaya
Santoso Wijaya added the comment: Without the aforementioned minidump library, you can also kick off the Python interpreter using a debugger (or have a debugger break into an already-running one) [1]. When the crash happens--presumably the debugger will break at this point--you can export the

[issue7689] Pickling of classes with a metaclass and copy_reg

2011-10-03 Thread Brent Payne
Changes by Brent Payne : -- nosy: +Brent.Payne ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: What did you do to solve the problem? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread jfalskfjdsl;akfdjsa;l laksfj;aslkfdj;sal
jfalskfjdsl;akfdjsa;l laksfj;aslkfdj;sal added the comment: ok i have solved the problem it was the same as issue 4765 -- ___ Python tracker ___ ___

[issue12210] test_smtplib: intermittent failures on FreeBSD

2011-10-03 Thread Stefan Krah
Stefan Krah added the comment: I haven't seen this in a while, so let's assume it's fixed. -- resolution: -> out of date stage: -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12156] test_multiprocessing.test_notify_all() timeout (1 hour) on FreeBSD 7.2

2011-10-03 Thread Charles-François Natali
Charles-François Natali added the comment: test_multiprocessing frequently hangs on FreeBSD < 8 buildbots, and this probably has to do with the limit on the max number of POSIX semaphores: """ == ERROR: test_notify_all (test.te

[issue13001] test_socket.testRecvmsgTrunc failure on FreeBSD 7.2 buildbot

2011-10-03 Thread Charles-François Natali
Changes by Charles-François Natali : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: > The main underlying problem is that the internal macros are defined in a > way that made sense a long time ago, but no longer do ever since (for > example) the Unicode lowercase property stopped being synonymous with > GC=Ll and started also including all cod

[issue13070] segmentation fault in pure-python multi-threaded server

2011-10-03 Thread Victor Semionov
Victor Semionov added the comment: Any plans to fix this in the next release? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13081] Crash in Windows with unknown cause

2011-10-03 Thread Brian Curtin
Brian Curtin added the comment: I recently created "minidumper" to write Visual Studio "MiniDump" files of interpreter crashes, but it's currently only available on 3.x. If I port it to 2.x, you could add "import minidumper;minidumper.enable()" to the top of your script, then we could probabl

[issue13081] Crash in Windows with unknown cause

2011-10-03 Thread Amorilia
Amorilia added the comment: I'm the author of the application. The tool is written in pure Python, and only uses libraries from stdlib. It would be really nice to have a simple standalone script to reproduce the crash, however I am still trying to reproduce it myself. So far no success.

[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-03 Thread Tom Christiansen
Tom Christiansen added the comment: Ezio Melotti wrote on Mon, 03 Oct 2011 04:15:51 -: >> But it still has to happen at compile time, of course, so I don't know >> what you could do in Python. Is there any way to change how the compiler >> behaves even vaguely along these lines? > I

[issue13095] Support for splitting lists/tuples into chunks

2011-10-03 Thread Cal Leeming
Cal Leeming added the comment: Oh - and while we are at it - how about having merge_list() and unique_list() as part of the core too?? def unique_list(seq): # Dave Kirby # Order preserving seen = set() return [x for x in seq if x not in seen and not seen.add(x)] def merge_lis

[issue13095] Support for splitting lists/tuples into chunks

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: This sounds like the grouper() recipe of itertools. You could try to convince Raymond and see if he wants to include it in itertools. -- nosy: +ezio.melotti, rhettinger versions: +Python 3.3 ___ Python tracker

[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: The patch needs to take versioning into account. It seems that NamedSequences where added in 4.1, and NameAliases in 5.0. So for the moment, when using 3.2 (i.e. when self is not NULL), it is fine to lookup neither. Please put an assertion into makeunicodeda

[issue13095] Support for splitting lists/tuples into chunks

2011-10-03 Thread Cal Leeming
New submission from Cal Leeming : After a while of digging around, I noticed that the core libs don't provide an easy way of splitting a list/tuple into chunks - as per the following discussion: http://www.aspwinhost.com/In-what-way-do-you-split-an-list-into-evenly-sized-chunks-on-Python/ The

[issue12555] PEP 3151 implementation

2011-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch update against latest default. There shouldn't be anything interesting to see. -- ___ Python tracker ___ ___

[issue12555] PEP 3151 implementation

2011-10-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file23307/554524a74bbe.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12555] PEP 3151 implementation

2011-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Should the input of OSError be checked? It could, but pre-PEP it is not, so I assumed it's better to minimize compatibility-breaking changes. -- ___ Python tracker ___

[issue13045] socket.getsockopt may require custom buffer contents

2011-10-03 Thread Artyom Gavrichenkov
Artyom Gavrichenkov added the comment: Hi Charles-François, I've attached an update for the previous patch. Now there's no more overloading for the third argument and socket.getsockopt accepts one more optional argument -- a buffer to use as an input to kernel. I can provide a manual sample

[issue13001] test_socket.testRecvmsgTrunc failure on FreeBSD 7.2 buildbot

2011-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4378bae6b8dc by Charles-François Natali in branch 'default': Issue #13001: Fix test_socket.testRecvmsgTrunc failure on FreeBSD < 8, which http://hg.python.org/cpython/rev/4378bae6b8dc -- nosy: +python-dev __

[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: The patch is pretty much complete, it just needs a review (I left some comments on the review page). One thing that can be added is some compression for the names of the named sequences. I'm not sure I can reuse the same compression used for the other names ea

[issue12753] \N{...} neglects formal aliases and named sequences from Unicode charnames namespace

2011-10-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: >> There are no official English titling rules and as you noted, >> publishers vary. > > If there aren't any rules, then how come all book and movie titles always > look the same? :) Can we please leave the English language out of this issue? Else I will as

[issue13045] socket.getsockopt may require custom buffer contents

2011-10-03 Thread Charles-François Natali
Charles-François Natali added the comment: Hello, method:: socket.getsockopt(level, optname[, optarg]) The overloading of the third parameter is confusing: it can already be an integer value or a buffer size, I don't think that adding a third possibility is a good idea. It might be better to

[issue13045] socket.getsockopt may require custom buffer contents

2011-10-03 Thread Artyom Gavrichenkov
Changes by Artyom Gavrichenkov : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue13045] socket.getsockopt may require custom buffer contents

2011-10-03 Thread Artyom Gavrichenkov
Changes by Artyom Gavrichenkov : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue11816] Refactor the dis module to provide better building blocks for bytecode analysis

2011-10-03 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue13094] Need Programming FAQ entry for the behavior of closures

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: Maybe with a different name is less confusing: lambda return_value=each: return_value This copies the value of 'each' in a variable called 'return_value' that is local to the lambda. Since the copy happens when the lambdas are defined, 'return_value' has then

[issue13045] socket.getsockopt may require custom buffer contents

2011-10-03 Thread Artyom Gavrichenkov
Changes by Artyom Gavrichenkov : -- nosy: +python-dev ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue13094] Need Programming FAQ entry for the behavior of closures

2011-10-03 Thread Tomáš Dvořák
Tomáš Dvořák added the comment: Thank you all very much for the super-quick responses. I'm used to smalltalk, so the python variable binding behaviour is unnatural to me, but I guess there must have been some reasons for making it behave this way. Ezio, the "lambda each=each: each" trick w

[issue13094] Need Programming FAQ entry for the behavior of closures

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: To understand better what's going on, try to change the value of 'each' after the 3 prints and then call again the 3 methods: you will see that they now return the new value of each. This is because the lambdas refer to global 'each' (that at the end of the lo

[issue13094] Need Programming FAQ entry for the behavior of closures

2011-10-03 Thread R. David Murray
Changes by R. David Murray : -- title: setattr misbehaves when used with lambdas inside for loop -> Need Programming FAQ entry for the behavior of closures ___ Python tracker __

[issue13094] setattr misbehaves when used with lambdas inside for loop

2011-10-03 Thread R. David Murray
R. David Murray added the comment: Sorry. It is intended behavior. The lambda 'each' is bound to the local 'each', and by the time the lambda's execute, the value of 'each' is 'baz'. I'm going to turn this into a doc bug, because while I'm pretty sure this is documented *somewhere*, I don't

[issue13094] setattr misbehaves when used with lambdas inside for loop

2011-10-03 Thread Tomáš Dvořák
New submission from Tomáš Dvořák : I have this python script, and run it in python 2.7.2 (installed from EPD_free 7.1-2 (32-bit), but I guess this has nothing to do with EPD. 8<---fail.py-- class X(object): pass x = X() items = ["foo", "bar", "baz"] for each in items: setattr(

[issue13072] Getting a buffer from a Unicode array uses invalid format

2011-10-03 Thread Stefan Krah
Stefan Krah added the comment: STINNER Victor wrote: > > # Not implemented formats. Ugly, but inevitable. This is the same as > > # issue #2531: equality is also used for membership testing and must > > # return a result. > > a = array.array('u', 'xyz') > > v = memoryview(a) > > self.assertNotE

[issue13072] Getting a buffer from a Unicode array uses invalid format

2011-10-03 Thread STINNER Victor
STINNER Victor added the comment: > The automatic conversion of 'u' to 'I' or 'L' causes test_buffer > (PEP-3118 repo) to fail: > > > # Not implemented formats. Ugly, but inevitable. This is the same as > # issue #2531: equality is also used for membership testing and must > # return a result. >

[issue670664] HTMLParser.py - more robust SCRIPT tag parsing

2011-10-03 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. : -- nosy: -fdrake ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue12911] Expose a private accumulator C API

2011-10-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > That's another possibility. But we'd have to expose a > > C API anyway, and this one is as good as any other. > > No, it's not: it's additional clutter. If new API needs to be added, > adding it for existing structures is better. Notice that you don't > *n

[issue12911] Expose a private accumulator C API

2011-10-03 Thread Martin v . Löwis
Martin v. Löwis added the comment: > It's not a container type, just a small C struct that > gets allocated on the stack. Think of it as a library, like stringlib. That's what I call a container type: a structure with a library :-) > That's another possibility. But we'd have to expose a > C

[issue6632] Include more fullwidth chars in the decimal codec

2011-10-03 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +tchrist ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue13072] Getting a buffer from a Unicode array uses invalid format

2011-10-03 Thread Stefan Krah
Stefan Krah added the comment: >It would be better to use a format for a Py_UCS4 string, but struct doesn't >support such type. PEP-3118 suggests for the extended struct syntax: 'c' -> ucs-1 (latin-1) encoding 'u' -> ucs-2 'w' -> ucs-4 -- ___ Pyth

[issue12458] Tracebacks should contain the first line of continuation lines

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: This is an interesting proposal. The line number comes from Python/traceback.c:120: tb->tb_lineno = PyFrame_GetLineNumber(frame); and this function is defined in Objects/frameobject.c:35: int PyFrame_GetLineNumber(PyFrameObject *f) { if (f->f_trace)

[issue13072] Getting a buffer from a Unicode array uses invalid format

2011-10-03 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue13072] Getting a buffer from a Unicode array uses invalid format

2011-10-03 Thread Stefan Krah
Stefan Krah added the comment: The automatic conversion of 'u' to 'I' or 'L' causes test_buffer (PEP-3118 repo) to fail: # Not implemented formats. Ugly, but inevitable. This is the same as # issue #2531: equality is also used for membership testing and must # return a result. a = array.array(

[issue7425] Improve the robustness of "pydoc -k" in the face of broken modules

2011-10-03 Thread Ned Deily
Ned Deily added the comment: It turns out that the proposed fix here for pydoc was independently added in the early days of Python 3 but was not backported. That fix for 2.7 plus a fix-in-progress for Issue7367 (for both 2.7 and 3.x) and additional test cases (also in progress) should addres

[issue12804] "make test" fails on systems without internet access

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: FWIW there's also support.open_urlresource that can be used to download test data. open_urlresouce calls requires('urlfetch') and skips the test when the resource is not enabled. For instance, test_normalization uses it: try: testdata = support.open_urlres

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This issue is very similar to issue5707: it is possible to define a custom key binding to "" or "": just click the Alt box and don't select a letter. There is no check, it's possible to save this buggy key binding, and IDLE won't start anymore. IDLE sh

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread Ezio Melotti
Ezio Melotti added the comment: Are you using some "unusual" keyboard layout? -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13071] IDLE refuses to open on windows 7

2011-10-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Are you using the .msi installer from python.org? Or one from activestate or enthought? -- ___ Python tracker ___ _