[issue4676] python3 closes + home keys

2009-04-03 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Thanks for the research on the home key toggle. Let's take that to issue3851, it seems it's different from the rest of this issue. -- nosy: +kbk superseder: -> IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution off

[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.

2009-04-03 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Weeble found the problem: it's the numlock key interacting with a bug. I can reproduce it when I latch numlock. http://bugs.python.org/msg80478 -- nosy: +weeble resolution: works for me -> accepted status: pending -> open __

[issue5678] typo in future_builtins documentation

2009-04-03 Thread R. David Murray
R. David Murray added the comment: Thanks. Fixed in r71123. -- nosy: +r.david.murray priority: -> low resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: -Python 3.0, Python 3.1 ___ Python tracker

[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.

2009-04-03 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: This wasn't backported to 2.5 as it's trivial and life is short. I have a clean install of 3.0.1 from the msi installer, running on an eeePC 1000HA, XP Home, tk 8.5. If I type a string at the >>> prompt in the IDLE shell and hit the home key, the cursor goes t

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-04-03 Thread Ismail Donmez
Ismail Donmez added the comment: Sure thing, I am waiting for alpha2. Regards. -- status: pending -> open ___ Python tracker ___ ___

[issue5110] Printing Unicode chars from the interpreter in a non-UTF8 terminal raises an error (Py3)

2009-04-03 Thread Ezio Melotti
Ezio Melotti added the comment: What I'm proposing is not to change the default error handler to 'backslashreplace', but just the behavior of sys.displayhook. -- ___ Python tracker _

[issue5527] multiprocessing won't work with Tkinter (under Linux)

2009-04-03 Thread Aki
Aki added the comment: Hello Jani Hakala, Thank you for your suggestions. Yes, from Tkconstants import * would ease the pain. The second suggestion, importing gui in another file didn't work well with my code as I'm using a class to host both gui process and non-gui process such that separating

[issue1680159] Misleading exception from unicode.__contains__

2009-04-03 Thread R. David Murray
R. David Murray added the comment: Still gives the same message in 2.7a0. Looks to be simple enough to fix: just stop masking the UnicodeDecode and TypeError messages produced by the PyUnicode_FromObject call in the PyUnicode_Contains method. Test and patch attached. If you have no objection,

[issue5645] test_memoryio fails for py3k on windows

2009-04-03 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue1169679] modules missing from list of Carbon modules

2009-04-03 Thread R. David Murray
R. David Murray added the comment: Duplicate of 896199, fixed in r70719. -- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Some Carbon modules missing from documentation ___ Python

[issue5645] test_memoryio fails for py3k on windows

2009-04-03 Thread Hirokazu Yamamoto
Hirokazu Yamamoto added the comment: I'm sure, but with following test code, def run(module): print("///") print("//", module) memio = module.StringIO(newline=None) # The C StringIO decodes newlines in write() calls, but the Python # implementatio

[issue4491] email.Header.decode_header() doesn't work if encoded-word was separeted by CRLF

2009-04-03 Thread Tony Nelson
Tony Nelson added the comment: See patch in issue1079. I don't think email.header can require whitespace until it decodes parsed headers, as whitespace is not always required. -- nosy: +barry, tony_nelson versions: +Python 2.7 ___ Python tracker

[issue1079] decode_header does not follow RFC 2047

2009-04-03 Thread Tony Nelson
Tony Nelson added the comment: I think the problem is best viewed as headers are not being parsed according to RFC2822 and decoded after that, so the recognition of encoded words should be looser, and not require whitespace around them, as it is not required in all contexts. Patch and test, tes

[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray
R. David Murray added the comment: Doc patch applied in r71116. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thanks! Here is the updated patch. -- Added file: http://bugs.python.org/file13607/move-iomodule-in-subdir-4.diff ___ Python tracker ___ _

[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray
R. David Murray added the comment: Oh, yeah, other 3.1 differences are that the unicode test is uncommented and updated, and a test is added to make sure nulls are handled correctly. -- ___ Python tracker _

[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray
R. David Murray added the comment: > Is this about correct? Do any test cases need to be updated or added? I > notice that something called BytesIO is imported from io but not used. Were > some test cases removed which used to involve that class or is that a 2to3 > artifact? The set of test

[issue5683] Speed up cPickle's pickling generally

2009-04-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: After also renaming the files, there is a slight bug in PCbuild/pythoncore.vcproj. Here is a subpatch incorporating the changes to this only file. -- Added file: http://bugs.python.org/file13606/pythoncore.patch ___

[issue1633600] using locale does not display the intended behavior

2009-04-03 Thread R. David Murray
R. David Murray added the comment: rdmur...@backup:~/trunk>echo $LC_ALL tr_TR rdmur...@backup:~/trunk>./python Python 2.7a0 (unknown, Apr 3 2009, 19:56:38) [GCC 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import str

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Or perhaps these are really meant as the new file names? Initially I thought the purpose was initially to move the files into a subdir. -- ___ Python tracker __

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some failures: _iomodule.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source : '..\..\Modules\_io\_iomodule.c' : No such file or directory textio.c c1 : fatal error C1083: Impossible d'ouvrir le fichier source : '..\..\Modules\_io\textio.c' : No suc

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Have you tested PCbuild changes? As, this is the part I am the most > unsure about. Ok, unless someone beats me to it, I'm gonna fire a Windows VM and test this. -- ___ Python tracker

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Have you tested PCbuild changes? As, this is the part I am the most unsure about. -- ___ Python tracker ___ __

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think you can commit! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue2389] Array pickling exposes internal memory representation of elements

2009-04-03 Thread Collin Winter
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5391] mmap: read_byte/write_byte and object type

2009-04-03 Thread STINNER Victor
STINNER Victor added the comment: #5666 is closed. I finally prefers getarg('c') (byte string of lenght 1). -- ___ Python tracker ___

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2009-04-03 Thread Collin Winter
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13604/move-iomodule-in-subdir-2.diff ___ Python tracker ___ ___ Pyth

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff ___ Python tracker ___ ___ Python

[issue5634] cPickle error in case of recursion limit

2009-04-03 Thread Collin Winter
Changes by Collin Winter : -- nosy: +collinwinter ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine wrote: > - in Makefile.pre.in, it seems the IO_OBJS definition might need updating I updated the patch to also fix IO_OBJS. Also, I added stringio.c to IO_OBJS. > Please note, when committing, it would be good to use "svn mv" for the > actual mo

[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread R. David Murray
R. David Murray added the comment: Nope. Sorry I forgot to change the priority. -- priority: release blocker -> normal ___ Python tracker ___ ___

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine, you're too quick. :-) By the way, the patch is fairly large due to the renaming. So, here's quick-and-dirty summary of the important changes. PCbuild/pythoncore.vcproj: Renamed the paths and added a tag for the _io directory. PC/VS7.1/pytho

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some comments: - there are some unrelated pickle changes in your patch - in Makefile.pre.in, it seems the IO_OBJS definition might need updating Otherwise I don't have any objections. Please note, when committing, it would be good to use "svn mv" for the actual

[issue5683] Speed up cPickle's pickling generally

2009-04-03 Thread Collin Winter
New submission from Collin Winter : This patch simplifies cPickle's complicated internal buffering system. The new version uses a single buffer closer to the Pickler object, flushing to a file object only when necessary. This avoids the overhead of several indirection layers for what are frequent

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff ___ Python tracker ___ ___ Python-b

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2009-04-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2009/4/3 Michael Foord : > > Michael Foord added the comment: > > Running out of time for 2.7 as well... How so? The first 2.7 alpha probably won't be until the end of summer. -- ___ Python tracker

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Where's the patch? -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : Here is a patch that moves the source files of the _io module (and closely related modules) into subdirectory of Modules. The new file hierarchy proposed is the following: Modules/ _io/ _iomodule.h _iomodule.c iobase.c file

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2009-04-03 Thread Michael Foord
Michael Foord added the comment: Running out of time for 2.7 as well... -- nosy: +michael.foord ___ Python tracker ___ ___ Python-bugs

[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord
Michael Foord added the comment: And actually your conditionally_undo_setup() call in setUp is incorrect. It should in an except block that re-raises rather than a finally block (which will do the cleanup even in non-exceptional circumstances). Easy code to get wrong... --

[issue5527] multiprocessing won't work with Tkinter (under Linux)

2009-04-03 Thread Jani Hakala
Jani Hakala added the comment: You can do something like import gui gui.start() in your Panel.draw() and 'from Tkinter import *' in the gui module which should contain your GUI-related code. Or you could just do 'from Tkconstants import *' in your tk_test.py -- __

[issue5681] Add a simple pickle optimizer to cPickle

2009-04-03 Thread Collin Winter
New submission from Collin Winter : Bah, hit enter too soon. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ _

[issue5681] Add a simple pickle optimizer to cPickle

2009-04-03 Thread Collin Winter
Changes by Collin Winter : -- components: Extension Modules files: cpickle_writes.patch keywords: needs review, patch nosy: alexandre.vassalotti, collinwinter severity: normal status: open title: Add a simple pickle optimizer to cPickle type: performance versions: Python 2.7, Python 3.1

[issue5680] Command-line arguments when running in IDLE

2009-04-03 Thread Matthew Barnett
New submission from Matthew Barnett : Patch idle-args.diff adds a dialog for entering command-line arguments for a script from within IDLE itself. -- components: IDLE files: idle-args.diff keywords: patch messages: 85341 nosy: mrabarnett severity: normal status: open title: Command-line

[issue5442] [3.1alpha1] test_importlib fails on Mac OSX 10.5.6

2009-04-03 Thread Brett Cannon
Brett Cannon added the comment: If you could, Ismail, can you verify this either from svn or when the next release of 3.1 comes out and update this issue? -- status: closed -> pending ___ Python tracker ___

[issue5666] Py_BuildValue("c") should return bytes?

2009-04-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: Applied the patch in r71107. The issues these depend on can be fixed now. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue5594] IDLE startup configuration

2009-04-03 Thread Kurt B. Kaiser
Changes by Kurt B. Kaiser : -- assignee: -> kbk nosy: +kbk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue5527] multiprocessing won't work with Tkinter (under Linux)

2009-04-03 Thread Aki
Aki added the comment: Hello Jani Hakala, Thank you very much for working on the case I created. And, sorry for not getting back to you. I have confirmed observation that the problem is fixed under Linux if Tkinter is imported after fork(). However, this remains a problem for me and most othe

[issue1672568] silent error in email.message.Message.get_payload

2009-04-03 Thread Renaud Blanch
Renaud Blanch added the comment: Daniel: i can't remember the exact scenario (i filled this bug 2 years ago !) after having a look back at email.message.Message.get_payload, i remember the problem: the decoding errors are silented by the method and you have no way to know if the decoding has bee

[issue4847] csv fails when file is opened in binary mode

2009-04-03 Thread Benjamin Peterson
Benjamin Peterson added the comment: So this is a doc bug? If so, need it still block tomorrow's release? -- nosy: +benjamin.peterson ___ Python tracker ___ _

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Collin Winter
Collin Winter added the comment: Amaury, I can't reproduce the issue you're seeing with empty dicts. Here's what I'm doing: dhcp-172-19-19-199:trunk collinwinter$ ./python.exe Python 2.7a0 (trunk:71100M, Apr 3 2009, 14:40:49) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyri

[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.

2009-04-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: The bug reported here is that on Windows XP, on my machine, in 2.5 and still in multiple releases of 3.0 and 3.0.1, pressing Home sends the cursor DIRECTLY to the left margin, before '<<<', and never stops at the beginning of the text, after '>>> '. I am sorry

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Collin Winter
Collin Winter added the comment: FYI, I just added a pickle_dict microbenchmark to perf.py. Using this new microbenchmark, I see these results (perf.py -r -b pickle_dict): pickle_dict: Min: 2.092 -> 1.341: 56.04% faster Avg: 2.126 -> 1.360: 56.37% faster Significant (t=216.895643, a=0.95) I st

[issue5345] cStringIO class name typo

2009-04-03 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord
Changes by Michael Foord : -- type: behavior -> feature request ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2009-04-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: As you said, the Home key issue is #3851, which makes is clearer that it appears to be Windows only. I should have specified that here. -- ___ Python tracker _

[issue5665] Add more pickling tests

2009-04-03 Thread Collin Winter
Changes by Collin Winter : Removed file: http://bugs.python.org/file13571/pickle_tests.patch ___ Python tracker ___ ___ Python-bugs-list mailin

[issue5665] Add more pickling tests

2009-04-03 Thread Collin Winter
Collin Winter added the comment: Updated the patch to include a regrtest xpickle resource, which restricts if the backwards compat tests will be run. For normal development, the existing tests should be fine; you only need these tests if you're mucking with the pickle output. Added backwards co

[issue5665] Add more pickling tests

2009-04-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: The buildbots should be running with the resource enabled (run the full set of tests, every time). If we need the reproducible results with the resource disabled, then a random seed (different for each successful run) can be saved in a logfile so that a part

[issue4487] Add utf8 alias for email charsets

2009-04-03 Thread Tony Nelson
Changes by Tony Nelson : -- versions: +Python 2.6, Python 2.7 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue4487] Add utf8 alias for email charsets

2009-04-03 Thread Tony Nelson
Tony Nelson added the comment: This seems entirely reasonable, helpful, and in accord with the mapping of ascii to us-ascii. I recommend accepting this patch or a slightly fancier one that would also do "utf_8". There are pobably other encoding names with the same issue of being accepted by Py

[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-04-03 Thread Michael Foord
Michael Foord added the comment: Closing. The patch as suggested should not be applied. Instead tearDown should be called in a finally block in the setUp for this specific use case. I've created a new issue (#5679) for the cleanUp idea which I think is good. -- ___

[issue2578] additional unittest type equality methods

2009-04-03 Thread Michael Foord
Michael Foord added the comment: Fair point. :-) -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue2578] additional unittest type equality methods

2009-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: assertMultiLineEqual might be reasonable as a default assertEqual for unicode. I wouldn't want to do it for bytes (py 2.x string). -- ___ Python tracker ___

[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord
Michael Foord added the comment: >From your example this would completely remove the need for the conditional checking in the cleanup code. Only resources actually allocated would be in the stack. -- ___ Python tracker

[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord
Michael Foord added the comment: This is a nice (simple to use and understand) pattern for resource allocation / deallocation. Supporting the cleaning up of resources when setUp fails (without duplicating clean up code) is just one use case. (I agree setUp failure is unusual.) It provides a cl

[issue5679] cleanUp stack for unittest

2009-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm used to doing this using a finally clause in the setUp() method (if I do it at all, I'm not used to setUp failing). I guess this would be a convenience to avoid the need for this pattern? I'm not sure we really need a list of cleanup callbacks. Got po

[issue3851] IDLE: Pressing "Home" on Windows places cursor before ">>>" instead of after. Solution offered.

2009-04-03 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: Rev 62545 to 2.6 was forward ported to 3.0 on 4May, r62716. I'm using py3k HEAD and it works the same as 2.6: pressing Home toggles beween the left margin and the start of the code text. It works the same way on Linux and Windows XP. Won't fix, because this i

[issue5679] cleanUp stack for unittest

2009-04-03 Thread Michael Foord
New submission from Michael Foord : Proposal to add a cleanUp stack to unittest.TestCase. This is a list of callables to be called (LIFO) to cleanup resources. If there are items on the stack it should be called even if setUp fails. Otherwise it should be called after tearDown. Similar functiona

[issue5665] Add more pickling tests

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Raymond, how would you reconcile your random approach with the fact that buildbots only display errors after a second verification run? -- ___ Python tracker __

[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface

2009-04-03 Thread Kurt B. Kaiser
Kurt B. Kaiser added the comment: As far as typing in the comment widget goes - it works fine if you don't add CR at the end of the lines until you go back and edit it by inserting some text. Then the faulty wordwrapping kicks in, and it has to be fixed by removing all the extra spaces

[issue5665] Add more pickling tests

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > test_xpickle currently takes over three minutes on my MacBook Pro to > test compatibility with Python 2.4, 2.5 and 2.6, and adding tests for > the pickle module will at least double that, if not push it well above > 10 minutes. Ouch! A couple of minutes is al

[issue2578] additional unittest type equality methods

2009-04-03 Thread Michael Foord
Michael Foord added the comment: Why is assertMultiLineEqual not the default assert method for basestring? Even for small strings the output is useful. -- ___ Python tracker ___

[issue5646] test_importlib fails for py3k on Windows

2009-04-03 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue5665] Add more pickling tests

2009-04-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: We took a similar issue in test_decimal and came up with a better approach to using the resource flag. If the resource is not enabled, the tester runs a random subset of the tests. Over time, that means that all the tests will get run even if testers are ro

[issue5665] Add more pickling tests

2009-04-03 Thread Collin Winter
Collin Winter added the comment: test_xpickle currently takes over three minutes on my MacBook Pro to test compatibility with Python 2.4, 2.5 and 2.6, and adding tests for the pickle module will at least double that, if not push it well above 10 minutes. That's why I recommend using the resource

[issue5665] Add more pickling tests

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: How much is "very slow"? If it's less than 10-15 seconds I think it's ok. -- nosy: +pitrou ___ Python tracker ___ __

[issue5665] Add more pickling tests

2009-04-03 Thread Collin Winter
Collin Winter added the comment: I've made test_xpickle support Python 2.4 because it uses Python 2.4, 2.5 and 2.6 to check that we haven't broken backwards compatibility with those versions. I made AbstractCompatTests use cPickle because that's what I've been changing :) I can add tests for th

[issue5671] Speed up pickling of lists in cPickle

2009-04-03 Thread Collin Winter
Collin Winter added the comment: I've added a microbenchmark to perf.py called pickle_list. Running that on this change (perf.py -r -b pickle_list): pickle_list: Min: 1.126 -> 0.888: 26.86% faster Avg: 1.154 -> 0.906: 27.43% faster Significant (t=115.404547, a=0.95) That's probably the upper b

[issue1705393] Select() failure (race condition)

2009-04-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: This older post http://bytes.com/groups/python/786579-python-2-2-1-select describes a similar problem where select() is used on a buffered file object (a pipe to another process) IMO it should be documented that select() does not work so well for objects

[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-04-03 Thread Michael Foord
Michael Foord added the comment: OK, so the patch as submitted *isn't* for the cleanUp suggestion (d'oh - I should have read it before posting the last comment). One possibility is that this bug is closed as won't fix (the patch as provided should definitely not be applied as it is a big change

[issue5538] tearDown in unittest should be executed regardless of result in setUp

2009-04-03 Thread Michael Foord
Michael Foord added the comment: +1 on adding a cleanUp list where entries are executed unconditionally even on failure of setUp. If there is consensus that this is a good thing (looks like it to me from the discussion here) then I can apply the patch to head. I'll review it first and post any

[issue5640] Wrong print() result when unicode error handler is not 'strict'

2009-04-03 Thread Walter Dörwald
Walter Dörwald added the comment: Indeed this patch does fix the bug. Go ahead and check it in. -- ___ Python tracker ___ ___ Python-b

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13597/pickle_batch_dict_exact_py3k-4.diff ___ Python tracker ___ __

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13596/pickle_batch_dict_exact_py3k-3.diff ___ Python tracker ___ __

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Sigh... silly me again. There is some other junk in my last patch. -- Added file: http://bugs.python.org/file13598/pickle_batch_dict_exact_py3k-5.diff ___ Python tracker

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Silly me, I had changed the PyDict_Size call in outer loop for Py_SIZE and this is of course totally wrong. Here's a good patch (I am pretty sure now! ;-) I ran the whole test suite and I saw no failures. Collin, you can go ahead and commit both patches.

[issue2057] difflib: add patch capability

2009-04-03 Thread Stefan van der Walt
Changes by Stefan van der Walt : -- nosy: +stefanv ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue2527] Pass a namespace to timeit

2009-04-03 Thread Stefan van der Walt
Changes by Stefan van der Walt : -- nosy: +stefanv ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue5654] Add C hook in PyDict_SetItem for debuggers

2009-04-03 Thread Guido van Rossum
Guido van Rossum added the comment: John, I'm adding a +0 to cancel out Raymond's -1. I've read your motivation and, like you, hope/expect that benchmarking will show this has no real impact. But I need data to decide. Once there are benchmark results I'll revise my view. A good place to star

[issue5678] typo in future_builtins documentation

2009-04-03 Thread Friedrich Weber
New submission from Friedrich Weber : Hi, from http://docs.python.org/library/future_builtins.html: .. function:: oct(object) Works like the builtin :func:`oct`, but instead of :meth:`__oct__` it will use the :meth:`__index__` method on its argument to get an integer that is then conv

[issue1654429] thread join() with timeout hangs on Windows 2003 x64

2009-04-03 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: I reproduce the problem with python 2.5, and it seems corrected with python 2.6.1. 2.5 now only accept security fixes: closing as "out of date". -- nosy: +amaury.forgeotdarc resolution: -> out of date status: open -> closed _

[issue5671] Speed up pickling of lists in cPickle

2009-04-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: A micro-benchmark of Collin's patch: python -m timeit -s "import cPickle; l=range(150)" "cPickle.dumps(l, protocol=-1)" * before: 12.1 usec per loop * after: 10.1 usec per loop => 15% faster on a favorable case -- nosy: +pitrou _

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Would it would be sufficient to add a function in the pickletools capable of converting old Python 2 pickles to the new format in Python 3? Alternatively, we could add a compatibility Unpickler class that would override the find_class method to do the name

[issue2389] Array pickling exposes internal memory representation of elements

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Ah, I just remembered the smart way I had devised some time ago to handle this issue without changing the constructor of array.array. The trick would be to add a __reduce__ method to array.array. This method would return a special constructor function, the