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

2009-04-02 Thread Hye-Shik Chang
Hye-Shik Chang hyes...@gmail.com added the comment: Right. Here I upload a patch to fix the addressed problem on cjkcodecs. Please test whether the patch corrects the behavior. -- keywords: +patch Added file: http://bugs.python.org/file13572/cjkcodecs-fix-statefulenc.diff

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

2009-04-02 Thread Hye-Shik Chang
Hye-Shik Chang hyes...@gmail.com added the comment: Sorry. I just found that the fix breaks few other test units. I'll check. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5640 ___

[issue5585] implement initializer for multiprocessing.BaseManager.start()

2009-04-02 Thread lekma
lekma lekma...@gmail.com added the comment: thanks guys -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5585 ___ ___ Python-bugs-list mailing

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

2009-04-02 Thread Hyeshik Chang
Hyeshik Chang hyes...@gmail.com added the comment: Uploaded a revised patch that solved the newer problem. -- Added file: http://bugs.python.org/file13573/cjkcodecs-fix-statefulenc-2.diff ___ Python tracker rep...@bugs.python.org

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

2009-04-02 Thread Hyeshik Chang
Changes by Hyeshik Chang hyes...@gmail.com: Removed file: http://bugs.python.org/file13572/cjkcodecs-fix-statefulenc.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5640 ___

[issue5565] Strange behavior when I logout() with IMAP4_SSL

2009-04-02 Thread Philipp Tölke
Philipp Tölke toelke...@model.in.tum.de added the comment: Just FYI, this issue is in python2.6, too. Only, that in 2.6 the GC does not collect the objects immediately, so that very soon I have a galore of connections in the CLOSE_WAIT-State. And I checked, I can not read anymore data out of

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

2009-04-02 Thread Jani Hakala
Jani Hakala jahak...@iki.fi added the comment: The script tk_test.py produces the window with one button after one removes the line 'from Tkinter import *' and adds line 'from Tkinter import Tk, Button' inside Panel.draw() as a first line. So importing Tkinter after the fork seems to solve the

[issue5659] logging.FileHandler encoding parameter does not work as expected

2009-04-02 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: This was a regression in 2.6, previously reported in issue #5170, and was fixed in trunk in r69447 and in the release26-maint branch in r69448. -- resolution: - fixed status: open - closed ___

[issue1634770] Please provide rsync-method in the urllib[2] module

2009-04-02 Thread Senthil
Senthil orsent...@gmail.com added the comment: Rsync is a tool, which can be written using urllib2. urllib2 is a library adhering to certain SPECs (Internet RFCs). Do not see a reason to include tools in urllib2. Closing it as wont-fix. Thanks. -- resolution: - wont fix status: open -

[issue4573] zsh-style subpattern matching for fnmatch/glob

2009-04-02 Thread Tim Golden
Tim Golden m...@timgolden.me.uk added the comment: Is there mileage for glob.glob to grow a dialect param, with a default value to keep it backwards compatible? Otherwise, presumably, proponents of some other xsh variant will come forward with their scheme of matching, and regex-followers with

[issue5499] only accept byte for getarg('c') and unicode for getarg('C')

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Ooops, I read converterr(a unicode character, ...), but it should be converterr(an unicode character, ...) ;-) Thanks benjamin.peterson, it will help other issues like #5391 and #5410. --

[issue5410] msvcrt bytes cleanup

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: issue5499 is fixed, so msvcrt_wchar.patch can now be used :-) Anyone available for a review and/or _a test_? I don't have Windows, so it's hard for me to test my patch. -- ___ Python

[issue5391] mmap: read_byte/write_byte and object type

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: @ocean-city: Can you update your patch to leave Py_BuildValue(c, ...) and PyArg_ParseTuple(args, c:write_byte, ...) unchanged, since #5499 is fixed? -- ___ Python tracker

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread Hirokazu Yamamoto
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: This is related to #5499. PyArg_ParseTuple treats c as bytes of 1 length now, but Py_BuildValue still treats c as unicode of 1 length. -- components: Interpreter Core files: py3k_build_value.patch keywords: patch

[issue5391] mmap: read_byte/write_byte and object type

2009-04-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Yes, here is the patch. But I noticed Py_BuildValue('c') still returns unicode. To pass the test, #5666 is needed. -- dependencies: +Py_BuildValue(c) should return bytes? Added file:

[issue5391] mmap: read_byte/write_byte and object type

2009-04-02 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file13575/py3k_mmap_bytes_cleanup_with_getarg_c.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391

[issue5391] mmap: read_byte/write_byte and object type

2009-04-02 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Added file: http://bugs.python.org/file13576/py3k_mmap_bytes_cleanup_with_getarg_c.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391

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

2009-04-02 Thread Atsuo Ishimoto
Atsuo Ishimoto ishim...@gembook.org added the comment: I tested with py3k branch and worked fine. Thank you. -- versions: +Python 2.6, Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5640

[issue5667] Interpreter fails to initialize when IO encoding is one of CJK on build dir

2009-04-02 Thread Hyeshik Chang
New submission from Hyeshik Chang hyes...@gmail.com: When a developer uses one of CJK encodings, interpreter crashes while its initialization on build dir (not on installed base). % LC_ALL=ko_KR.eucKR ./python Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError:

[issue5667] Interpreter fails to initialize on build dir when IO encoding is one of CJK

2009-04-02 Thread Hyeshik Chang
Changes by Hyeshik Chang hyes...@gmail.com: -- title: Interpreter fails to initialize when IO encoding is one of CJK on build dir - Interpreter fails to initialize on build dir when IO encoding is one of CJK ___ Python tracker

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5666 ___ ___

[issue5641] Local variables not freed when Exception raises in function called from cycle

2009-04-02 Thread Glin
Glin g...@seznam.cz added the comment: I'm not talking about exception variable, but about the variables in local scope of function job() (in my example it is the variable 'a' of class A). Sorry, if I did not make myself clear. -- status: closed - open

[issue1590864] import deadlocks when using PyObjC threads

2009-04-02 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: I don't understand why the function-level imports cannot be removed. Wouldn't it be possible to do something like this: from errno import ENOENT as _ENOENT, ENOTDIR as _ENOTDIR def _execvpe(file, args, env=None): pass # Use _ENOENT

[issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build

2009-04-02 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Raymond: My guess is that this is caused because the binary was build on OSX 10.5, where 'printf(%zd)' works file for negative numbers, and the tests was run on OSX 10.4, where the same printf statement doesn't work correctly. I'll

[issue5668] file stdin on disk creates garbage output in stack trace

2009-04-02 Thread Zbyszek Szmek
New submission from Zbyszek Szmek zbys...@in.waw.pl: When running interactively, python checks for existence of file stdin when trying to display a stack trace with code input from stdin. # cat stdin asdf asdf asdf # python Python 2.5.2 (r252:60911, Jun 25 2008, 17:58:32) [GCC 4.3.1] on

[issue5269] OS X Installer: add options to specify universal build type and deployment target

2009-04-02 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: Raymond: I had intended to assign the issue to myself but I obviously need more training with dropdown menu's (your name is just above mine in the assigned-to menu). -- assignee: - ronaldoussoren nosy: -rhettinger status:

[issue4015] [patch] make installed scripts executable on windows

2009-04-02 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: Added file: http://bugs.python.org/file13577/executable.scripts.on.nt.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4015 ___

[issue4015] [patch] make installed scripts executable on windows

2009-04-02 Thread anatoly techtonik
anatoly techtonik techto...@gmail.com added the comment: I've updated the script to parse unlimited number of parameters on NT, to return %errorcode% and to fallback to default Python compiler. It is based on similar workarounds we've made for SCons in

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Let's try grep on py3k: grep 'Py_BuildValue([^]*c' $(find -name *.c) Py_BuildValue(c) is used for: - mmap.read_byte() result - curses window.getkey() result: this method returns also unicode string = your patch breaks getkey()!

[issue5666] Py_BuildValue(c) should return bytes?

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: C format, but... it doesn't exist for Py_BuildValue Ooops, it does exist but it looks that nobody uses it. It's also not documented :-( I wrote a new patch: - document C format for Py_BuildValue (fix also a typo) - use C format

[issue5391] mmap: read_byte/write_byte and object type

2009-04-02 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: So mmap object.read_byte() gives a byte string of 1 byte, ok. Port from Python2 will be easier. The patch looks correct, thanks for updating it. We know have to wait for #5666 :-) --

[issue5391] mmap: read_byte/write_byte and object type

2009-04-02 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Yes, you can do m.write_byte(ba) but on the other hand you cannot do a = babc m.write_byte(a[1]) instead you should do a = babc m.write_byte(a[1:2]) This is trade off, though. I'll update with getarg('b') version to

[issue5391] mmap: read_byte/write_byte and object type

2009-04-02 Thread Hirokazu Yamamoto
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp: Removed file: http://bugs.python.org/file13215/py3k_mmap_and_bytes.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___

[issue2578] additional unittest type equality methods

2009-04-02 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Bikeshedding a bit - the 'assertGreaterEqual' and 'assertLessEqual' method names grate on me a little. My brain has to do a double take in order to correctly insert the implied 'Or'. This reaction is made worse when these two methods are

[issue1741130] struct.pack(I, foo); struct.pack(L, foo) should fail

2009-04-02 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1741130 ___ ___

[issue5619] Pass MS CRT debug flags into subprocesses

2009-04-02 Thread Martin v. Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: Since you object to a command line parameter, how about an environment variable? PYTHONUNATTENDED could be used in the library startup to turn off any conceivable dialogue boxes and would be passed on to child processes. This could

[issue5641] Local variables not freed when Exception raises in function called from cycle

2009-04-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I know, but that object is kept alive by the frame object that is kept alive by the exception assigned to e. -- status: open - closed ___ Python tracker rep...@bugs.python.org

[issue2625] mailbox.MH.get_message() treats result of get_sequences() as list of tuples

2009-04-02 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Fixed in 71046. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2625

[issue5658] make html in doc fails because Makefile assigns python to PYTHON

2009-04-02 Thread Mitchell Model
Mitchell Model m...@acm.org added the comment: It strikes me as an inconsistency because I wouldn't expect the build process to differ from Python 3.0 to 3.1 except for fixing bugs. A developer, or someone trying to keep up with the most recent versions, who had been successfiully making the

[issue5634] cPickle error in case of recursion limit

2009-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Georg, I think that your recent change in r71024 implements the same idea directly in PyErr_ExceptionMatches. Can you confirm this and close the issue? -- assignee: - georg.brandl nosy: +amaury.forgeotdarc, georg.brandl

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Jim Fulton
Jim Fulton j...@zope.com added the comment: Looking back, I think Zope and Medusa should have adopted and evolved their own copy of asynchat a long time ago... This statement is puzzling. No big deal, but I'm curious why you say this. -- nosy: +j1m

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Jim Fulton
Jim Fulton j...@zope.com added the comment: For the record, afaict, Zope wasn't broken by this. Supervisor isn't part of Zope. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___

[issue5658] make html in doc fails because Makefile assigns python to PYTHON

2009-04-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Even Python 3.0 didn't install its built executable as python. We just made that decision, which was done for Python 3.0 because it couldn't be considered stable, permanent. -- ___ Python tracker

[issue5215] change value of local variable in debug

2009-04-02 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Committed in r71006. -- nosy: +georg.brandl resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5215 ___

[issue3722] print followed by exception eats print with doctest

2009-04-02 Thread Georg Brandl
Changes by Georg Brandl ge...@python.org: -- priority: - low type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3722 ___

[issue3722] print followed by exception eats print with doctest

2009-04-02 Thread Chris Withers
Chris Withers ch...@simplistix.co.uk added the comment: Hey Georg, I agree with the priority, but I'm still not convinced this is just a feature request. The piece of documentation that Tim is referring to is a tiny footnote in the doctest docs, and, as I said previously, I'm not sure

[issue1590864] import deadlocks when using PyObjC threads

2009-04-02 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: First, because os is such a common module that hiding some uncommon imports at the module level helps with startup costs. Second, this is not a bug as the code is not behaving in an improper manner. The import lock is doing what it is supposed to

[issue5646] test_importlib fails for py3k on Windows

2009-04-02 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Can you svn up and run them again? Some stuff has changed if you are running against 3.1a1. -- assignee: - brett.cannon components: +Library (Lib) -Tests, Windows nosy: +brett.cannon priority: - critical type: - behavior

[issue5646] test_importlib fails for py3k on Windows

2009-04-02 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: Thanks, Kristján, for the quick response. I will see if I can figure why the heck this is differing on Vista (almost all the code is platform-agnostic Python so this will be an interesting thing to try to fix). -- stage: - test needed

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Tres Seaver
Tres Seaver tsea...@users.sourceforge.net added the comment: Sidnei da Silva had to put some straddling code in the Zope2 trunk to workaround the 2.6 changes to asyncore / asynchat: - http://svn.zope.org/Zope/?rev=91981view=rev - http://svn.zope.org/Zope/?rev=92023view=rev -- nosy:

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

2009-04-02 Thread Kurt B. Kaiser
Kurt B. Kaiser k...@shore.net added the comment: The issue of the cursor moving to the left of in the shell is separate. See also #3851. The current action of the home key, released in 2.6, is from patch 1196903. @tjreedy, if in 2.6 you type syzygy and hit home, the cursor moves to the

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

2009-04-02 Thread Kurt B. Kaiser
Kurt B. Kaiser k...@shore.net added the comment: Why doesn't someone fix this comment widget?? It was like this on SF, too. Guess I've got to dive in at some point...second guessing the wrapping drives me nuts! -- ___ Python tracker

[issue5604] imp.find_module() mixes UTF8 and MBCS

2009-04-02 Thread Andrew Svetlov
Andrew Svetlov andrew.svet...@gmail.com added the comment: Martin, can you review latest patch and apply it if this one is correct. I want to start working on conversion import.c to use unicode strings (we spoke about Tuesday) this weekend. It will be nice if I will have synchronized svn

[issue2578] additional unittest type equality methods

2009-04-02 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: Nick Coghlan ncogh...@gmail.com added the comment: Bikeshedding a bit - the 'assertGreaterEqual' and 'assertLessEqual' method names grate on me a little. My brain has to do a double take in order to correctly insert the implied 'Or'. This

[issue5669] Extra heap nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: It would be useful in many cases if heapq.nlargest and heapq.nsmallest grew an optional boolean parameter, say `ties` (defaulting to False) that when True, it would return more than `n` items if there are ties. To illustrate: s =

[issue5669] Extra heap nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: The second call should of course be: for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s,ties=True) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
Changes by George Sakkis george.sak...@gmail.com: -- title: Extra heap nlargest/nsmallest option for including ties - Extra heapq nlargest/nsmallest option for including ties ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread Raymond Hettinger
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I haven't seen this come up before. Am curious about your use cases. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669

[issue3166] Make conversions from long to float correctly rounded.

2009-04-02 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Updated patch; applies cleanly to current trunk. No significant changes. Note that there's now a new reason to apply this patch: it ensures that the result of a long-float conversion is independent of whether we're using 30-bit digits or

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Guido van Rossum
Guido van Rossum gu...@python.org added the comment: [Guido] Looking back, I think Zope and Medusa should have adopted and evolved their own copy of asynchat a long time ago... [Jim] This statement is puzzling.  No big deal, but I'm curious why you say this. ISTR that Zope has or had

[issue5658] make html in doc fails because Makefile assigns python to PYTHON

2009-04-02 Thread Mitchell Model
Mitchell Model m...@acm.org added the comment: OK -- -- --- Mitchell -- Added file: http://bugs.python.org/file13583/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5658

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Jim Fulton
Jim Fulton j...@zope.com added the comment: On Apr 2, 2009, at 1:27 PM, Guido van Rossum wrote: Guido van Rossum gu...@python.org added the comment: [Guido] Looking back, I think Zope and Medusa should have adopted and evolved their own copy of asynchat a long time ago... [Jim] This

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

2009-04-02 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: David I've added some unit tests for embedded newlines, and py3k csv David passes (on linux at least) when newline='' is used. Unless David someone can provide a test case that fails when newline='' is David used, I propose we fix the

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: There's nothing special about my use cases; I'd even go as far as to suggest that this is more often than not the desired behavior in general. Say that you have to select the top 3 chess players and there are two players with equal Elo

[issue5646] test_importlib fails for py3k on Windows

2009-04-02 Thread Brett Cannon
Brett Cannon br...@python.org added the comment: I committed a fix in r71057 where instead of hard-coding the paths I moved over to os.path.join(). Let me know if that fixes it. As for the deletion hole that Vista has, it could be added to test.test_support.unlink(), but talking here at PyCon

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: In that case, I think it best to leave nsmallest/nlargest as-is. By appending ties to the result, it becomes harder to implement policy decisions on what to do with those ties (perhaps listing them separately or splitting

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Tres Seaver
Tres Seaver tsea...@agendaless.com added the comment: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guido van Rossum wrote: ISTR that Zope has or had significant monkeypatches to at least one of asyncore/asynchat. The resulting coupling between Zope and asyn* has meant that the de-facto API

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

2009-04-02 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: David I also deleted the unicode discussion (since CSV obviously David handles unicode now) ... Maybe there should be a simple example showing use of the encoding parameter to open() to encode Unicode on write and decode to Unicode on read?

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: That should have been: last = result[-1]; [last]*s.count(last). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669

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

2009-04-02 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: As reported in a comment for #2704, the Home key misbehaves on WinXP for 3.0.1. The 2.6 fix was either not forward ported or otherwise disabled. I removed 2.5 since that is now on security fix only status. -- nosy: +kbk versions:

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

2009-04-02 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Kurt, do not type hard returns except at the end of code lines and paragraphs. As I said in my previous comment, the HOME key works as I said both in 2.5 AND in 3.0 (and still in 3.0.1). If it was fixed in 2.6, fine, but that fix was either

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

2009-04-02 Thread R David Murray
R David Murray rdmur...@bitdance.com added the comment: On Thu, 2 Apr 2009 at 17:55, Skip Montanaro wrote: This thread is getting a bit long. Can someone summarize how the expected usage of the csv module is supposed to change? If I read things correctly, instead of requiring (in the

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Collin Winter
New submission from Collin Winter coll...@gmail.com: The attached patch adds another version of cPickle.c's batch_dict(), batch_dict_exact(), which is specialized for type(x) is dict. This provides a nice performance boost when pickling objects that use dictionaries: Pickle: Min: 2.216 - 1.858:

[issue5659] logging.FileHandler encoding parameter does not work as expected

2009-04-02 Thread Kuno
Kuno k...@frob.nl added the comment: Ah! Good to know that it has been fixed already. Thank you. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5659 ___

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: In that case, I think it best to leave nsmallest/nlargest as-is. By appending ties to the result, it becomes harder to implement policy decisions on what to do with those ties (perhaps listing them separately or splitting their

[issue2578] additional unittest type equality methods

2009-04-02 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Am I the only person who wishes all the assert* and fail* methods would simply go away in favor of simply using the assert statement? Skip -- ___ Python tracker rep...@bugs.python.org

[issue2578] additional unittest type equality methods

2009-04-02 Thread Michael Foord
Michael Foord mich...@voidspace.org.uk added the comment: Why do you need the assert methods to go away in order to use assert statements? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2578

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: That should have been: last = result[-1]; [last]*s.count(last). Nice, though that's not equivalent if the objects' identity is significant for what happens next (which typically is the case when ties are preserved). The sorted/bisect

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
Changes by George Sakkis george.sak...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Without taking a very detailed look, the patch looks good. Are there already tests for pickling of dict subclasses? Otherwise, they should be added. -- nosy: +pitrou ___ Python tracker

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: I recommend posting an ASPN recipe. That's what I do with a lot of ideas that are under development or that don't clear the bar for going into the standard library. -- ___ Python

[issue2578] additional unittest type equality methods

2009-04-02 Thread Skip Montanaro
Skip Montanaro s...@pobox.com added the comment: Michael Why do you need the assert methods to go away in order to use Michael assert statements? You don't, but use of assert statements seems a hell of a lot more Pythonic to me than all the assert* or fail* method names which I can never

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: By the way, could the same approach be applied to lists and sets as well? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5670 ___

[issue2578] additional unittest type equality methods

2009-04-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: You don't, but use of assert statements seems a hell of a lot more Pythonic to me than all the assert* or fail* method names which I can never remember. Two problems: 1. they are optimized away in -Oxxx mode 2. they don't provide good reporting

[issue5671] Speed up pickling of lists in cPickle

2009-04-02 Thread Collin Winter
New submission from Collin Winter coll...@gmail.com: The attached patch adds another version of cPickle.c's batch_list(), batch_list_exact(), which is specialized for type(x) is list. This provides a nice performance boost when pickling objects that use lists. This is similar to the approach

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Josiah Carlson
Josiah Carlson josiahcarl...@users.sourceforge.net added the comment: I'm not defending the documentation, I'm merely reposting it. The documentation for asyncore says, The full set of methods that can be overridden in your subclass follows: The documentation for asynchat says, To make

[issue5672] Implement a way to change the python process name

2009-04-02 Thread Marcelo Fernández
New submission from Marcelo Fernández fernandez...@yahoo.com.ar: As python gains more popularity, more and more applications run under CPython in a common user desktop. The problem is that if a user has 2 or more python apps running there is no way to identify them correctly from the generic

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Collin Winter
Collin Winter coll...@gmail.com added the comment: On Thu, Apr 2, 2009 at 12:20 PM, Antoine Pitrou rep...@bugs.python.org wrote: Antoine Pitrou pit...@free.fr added the comment: By the way, could the same approach be applied to lists and sets as well? Certainly; see

[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192

2009-04-02 Thread Tony Nelson
Tony Nelson tony_nel...@users.sourceforge.net added the comment: The OP's diagnosis of a buffer boundary problem is correct, but incomplete. The problem can be reproduced by calling feedparser FeedParser.feed() directly, or as my patch test does, by calling BufferedSubFile.push() directly. The

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: FWIW, an easy way to pare down millions of entries to dozens is to use a bigger heap: from heapq import nsmallest def nsmallest_with_ties(n, iterable, scale=2): ext = n * scale s = nsmallest(ext, iterable)

[issue5673] Add timeout option to subprocess.Popen

2009-04-02 Thread Reid Kleckner
New submission from Reid Kleckner r...@mit.edu: I was looking for a way to run a subprocess with a timeout. While there are a variety of solutions on Google, I feel like this functionality should live in the standard library module. Apparently Guido thought this would be good in 2005 but no

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Certainly; see http://bugs.python.org/issue5671 for the list version. It doesn't make as big an impact on the benchmark, though. How about splitting the benchmark in parts: - (un)pickling lists - (un)pickling dicts - (un)pickling sets (etc.)

[issue1641] asyncore delayed calls feature

2009-04-02 Thread Jim Fulton
Jim Fulton j...@zope.com added the comment: On Apr 2, 2009, at 3:35 PM, Josiah Carlson wrote: Josiah Carlson josiahcarl...@users.sourceforge.net added the comment: I'm not defending the documentation, I'm merely reposting it. The documentation for asyncore says, The full set of methods

[issue5673] Add timeout option to subprocess.Popen

2009-04-02 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___

[issue5630] Update CObject API so it is safe and regular

2009-04-02 Thread Larry Hastings
Larry Hastings la...@hastings.org added the comment: Having slept on it, I agree that we only need one API to create an object. Since passing in a context will be relatively rare, users who need that can use PyCObject_SetContext(). I'll remove PyCObject_FromVoidPtrWithContext() in my next

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: I recommend posting an ASPN recipe. That's what I do with a lot of ideas that are under development or that don't clear the bar for going into the standard library. Will do. Thanks for the quick turnaround! --

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Here's a test case for your recipe dataset = [9] * 100 + [0,1,2,3,4,5,6,8] for i in range(1, 20): print nsmallest(i, dataset, ties=True) -- ___ Python tracker

[issue5142] pdb feature request: Ability to skip standard lib modules and other selected packages/modules

2009-04-02 Thread Maru Newby
Maru Newby mne...@thesprawl.net added the comment: Added a skip keyword argument to Bdb and Pdb class constructors to allow skipping of modules based on a list of glob-style matches (see fnmatch), as per the following example: import pdb;Pdb(skip=['django.command*']).set_trace() --

[issue5671] Speed up pickling of lists in cPickle

2009-04-02 Thread Raymond Hettinger
Raymond Hettinger rhettin...@users.sourceforge.net added the comment: Out of curiousity, are you also benchmarking against marshal and json? ISTM, that there is always one of them that will be the fastest and that the others should mimic that approach. -- nosy: +rhettinger

  1   2   >