[issue5640] Wrong print() result when unicode error handler is not 'strict'
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5640] Wrong print() result when unicode error handler is not 'strict'
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5585] implement initializer for multiprocessing.BaseManager.start()
lekma lekma...@gmail.com added the comment: thanks guys -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5640] Wrong print() result when unicode error handler is not 'strict'
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 http://bugs.python.org/issue5640 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5640] Wrong print() result when unicode error handler is not 'strict'
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5565] Strange behavior when I logout() with IMAP4_SSL
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 the socket. Is this a bug in the ssl-implemantation? -- versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5565 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5527] multiprocessing won't work with Tkinter (under Linux)
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 problem. Importing it before the fork only makes the parent process consume more memory anyway. Maybe importing the Tkinter (and thus _tkinter) causes some initialisation to be done. If this should be done only in the process that utilises Tkinter there might be problems like this. -- components: +Tkinter nosy: +jahakala ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5527 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5659] logging.FileHandler encoding parameter does not work as expected
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5659 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1634770] Please provide rsync-method in the urllib[2] module
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 - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1634770 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4573] zsh-style subpattern matching for fnmatch/glob
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 theirs and so on. -- nosy: +tim.golden ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4573 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5499] only accept byte for getarg('c') and unicode for getarg('C')
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5499 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5410] msvcrt bytes cleanup
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 tracker rep...@bugs.python.org http://bugs.python.org/issue5410 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
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 rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5666] Py_BuildValue(c) should return bytes?
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 messages: 85184 nosy: ocean-city priority: release blocker severity: normal status: open title: Py_BuildValue(c) should return bytes? versions: Python 3.1 Added file: http://bugs.python.org/file13574/py3k_build_value.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
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: http://bugs.python.org/file13575/py3k_mmap_bytes_cleanup_with_getarg_c.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5640] Wrong print() result when unicode error handler is not 'strict'
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5667] Interpreter fails to initialize when IO encoding is one of CJK on build dir
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: unknown encoding: euc_kr zsh: abort (core dumped) LC_ALL=ko_KR.eucKR ./python The problem is that codec lookup function fails to import a relevant codec module because path to dynamic modules is added by site.py, which is a later step than standard I/O object initializations. -- components: Interpreter Core messages: 85187 nosy: hyeshik.chang priority: low severity: normal status: open title: Interpreter fails to initialize when IO encoding is one of CJK on build dir type: crash versions: Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5667] Interpreter fails to initialize on build dir when IO encoding is one of CJK
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 rep...@bugs.python.org http://bugs.python.org/issue5667 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5666] Py_BuildValue(c) should return bytes?
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5641] Local variables not freed when Exception raises in function called from cycle
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1590864] import deadlocks when using PyObjC threads
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 and _ENOTDIR in this code BTW. it is IMO rather strange to close issues as wont fix when there is a real error in supported and not deprecated code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1590864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5657] bad repr of itertools.count object with negative value on OS X 10.4 with 10.5 build
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 experiment with a fix for this over the weekend. The fix I'm thinking of right now is to patch either configure.in or pymacconfig.h to make sure that PY_FORMAT_SIZE_T is overridden when building a binary that has a DEPLOYMENT_TARGET that is smaller than 10.5. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5657 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5668] file stdin on disk creates garbage output in stack trace
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 linux2 Type help, copyright, credits or license for more information. asdf Traceback (most recent call last): File stdin, line 1, in module asdf asdf asdf NameError: name 'asdf' is not defined # strace -efile python ... open(stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/home13/zbyszek/pm/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib/python25.zip/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/plat-linux2/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/lib-tk/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/lib-dynload/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/site-packages/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/site-packages/Numeric/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/site-packages/PIL/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/site-packages/gtk-2.0/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) open(/usr/lib64/python2.5/site-packages/wx-2.8-gtk2-unicode/stdin, O_RDONLY) = -1 ENOENT (No such file or directory) This is exactly the same in python 2.4, 2.5 and 3.0. I haven't tested other versions. -- components: Interpreter Core messages: 85192 nosy: zbysz severity: normal status: open title: file stdin on disk creates garbage output in stack trace versions: Python 2.4, Python 2.5, Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5269] OS X Installer: add options to specify universal build type and deployment target
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: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4015] [patch] make installed scripts executable on windows
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4015] [patch] make installed scripts executable on windows
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 http://scons.tigris.org/source/browse/scons/branches/core/src/script/scons.bat?view=log If you look at the SCons .bat closely you'll notice the difference that it includes code to launch main application script directly from site-packages thus removing the requirement to have .py script in Scripts/ In my patch I use Template that has placeholders for product name, author and email. However, the actual data is not written and hints how to get it in place are still welcome. -- Added file: http://bugs.python.org/file13578/install_scripts.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4015 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5666] Py_BuildValue(c) should return bytes?
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()! - array.__reduce__(): i don't understand if the patch breaks anything I think that curses and array should use C format, but... it doesn't exist for Py_BuildValue. It was maybe forgotten. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5666] Py_BuildValue(c) should return bytes?
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 in array and _curses - (and leave ocean-city's changes unchanged) -- Added file: http://bugs.python.org/file13579/py3k_build_value-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5666 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
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 :-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
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 compare. -- Added file: http://bugs.python.org/file13580/py3k_mmap_bytes_cleanup_with_getarg_b.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5391 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5391] mmap: read_byte/write_byte and object type
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2578] additional unittest type equality methods
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 juxtaposed with all the other assert*Equal methods like DictEqual, ListEqual, SetEqual etc. Would it be possible to lengthen these specific names to the more explicit assertGreaterOrEqual and assertLessOrEqual? Some really nice additions to the test module here! :) -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1741130] struct.pack(I, foo); struct.pack(L, foo) should fail
Changes by Mark Dickinson dicki...@gmail.com: -- assignee: - marketdickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1741130 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5619] Pass MS CRT debug flags into subprocesses
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 then also easily be added in the build slave config script: sys.env[PYTHONUNATTENDED] = 1 That would work for me. I suppose test.bat would set this variable, right? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5619 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5641] Local variables not freed when Exception raises in function called from cycle
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 http://bugs.python.org/issue5641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2625] mailbox.MH.get_message() treats result of get_sequences() as list of tuples
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5658] make html in doc fails because Makefile assigns python to PYTHON
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 html doc in a subversion copy of Python 3.0 and wanted to move over to Python 3.1 finds this surprise if the command python is bound to Python 3. I grant you that this is a lot of ifs, and a transitional issue if we're all going to call Python 3 python3. It might even be worth mentioning in the build instructions that python should be bound to a Python 2 executable, not Python 3, because a few things, such as make html in doc, use tools that haven't been updated. Not a big deal. Just fighting for the Principle of Least Surprise, as in many of the documentation issues I've submitted. My GUI background showing. -- -- --- Mitchell -- Added file: http://bugs.python.org/file13581/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5658 ___!doctype html public -//W3C//DTD W3 HTML//EN htmlheadstyle type=text/css!-- blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 } --/styletitleRe: [issue5658] make html in doc fails because Makefile as/title/headbody divIt 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.nbsp; A developer, or someone trying to keep up with the most recent versions, who had been successfiully making the html doc in a subversion copy of Python 3.0 and wanted to move over to Python 3.1 finds this surprise if the command python is bound to Python 3. I grant you that this is a lot of ifs, and a transitional issue if we're all going to call Python 3 python3./div divbr/div divIt might even be worth mentioning in the build instructions that quot;pythonquot; should be bound to a Python 2 executable, not Python 3, because a few things, such as make html in doc, use tools that haven't been updated./div divbr/div divNot a big deal. Just fighting for the quot;Principle of Least Surprisequot;, as in many ofnbsp; the documentation issues I've submitted. My GUI background showing./div divtt-- /tt/div div-- br br nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; --- Mitchell/div /body /html___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5634] cPickle error in case of recursion limit
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5634 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5658] make html in doc fails because Makefile assigns python to PYTHON
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 rep...@bugs.python.org http://bugs.python.org/issue5658 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5215] change value of local variable in debug
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3722] print followed by exception eats print with doctest
Changes by Georg Brandl ge...@python.org: -- priority: - low type: behavior - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3722 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3722] print followed by exception eats print with doctest
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 documenting a bug makes it any less of a bug.. -- versions: +Python 2.7, Python 3.1 -Python 2.4, Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3722 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1590864] import deadlocks when using PyObjC threads
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 be doing and importing at the module level is still okay. You can open the issue again if you want, but I think this is not worth changing. -- assignee: brett.cannon - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1590864 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5646] test_importlib fails for py3k on Windows
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5646] test_importlib fails for py3k on Windows
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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: +tseaver ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
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 left of the 's'. A second 'home' moves it to the left margin. Subsequent presses toggle the cursor between those two position. While the action in the shell could be special cased, I consider this to be cosmetic - and not only that, but moving to the left border is useful when you want to mark a shell region for copy/ paste. So won't fix is my response to that 'complaint'. Now back to the subject of this patch -- priority: - normal versions: +Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
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 rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5604] imp.find_module() mixes UTF8 and MBCS
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 before making new changes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5604 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2578] additional unittest type equality methods
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 reaction is made worse when these two methods are juxtaposed with all the other assert*Equal methods like DictEqual, ListEqual, SetEqual etc. Would it be possible to lengthen these specific names to the more explicit assertGreaterOrEqual and assertLessOrEqual? No, please. Get used to it. Maybe it helps if you realize the parallel with '__ge__'? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heap nlargest/nsmallest option for including ties
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 = [4,3,5,7,4,7,4,3] for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s) ... 1 [3] 2 [3, 3] 3 [3, 3, 4] 4 [3, 3, 4, 4] 5 [3, 3, 4, 4, 4] 6 [3, 3, 4, 4, 4, 5] 7 [3, 3, 4, 4, 4, 5, 7] 8 [3, 3, 4, 4, 4, 5, 7, 7] for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s) ... 1 [3, 3] 2 [3, 3] 3 [3, 3, 4, 4, 4] 4 [3, 3, 4, 4, 4] 5 [3, 3, 4, 4, 4] 6 [3, 3, 4, 4, 4, 5] 7 [3, 3, 4, 4, 4, 5, 7, 7] 8 [3, 3, 4, 4, 4, 5, 7, 7] -- components: Library (Lib) messages: 85222 nosy: gsakkis severity: normal status: open title: Extra heap nlargest/nsmallest option for including ties type: feature request versions: Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heap nlargest/nsmallest option for including ties
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
Changes by Raymond Hettinger rhettin...@users.sourceforge.net: -- assignee: - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3166] Make conversions from long to float correctly rounded.
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 15-bit digits for longs. One problem: if long-float conversions are correctly rounded, then int-float conversions should be correctly rounded as well. (And ideally, we should have float(int(n)) == float(long(n)) for any integer n.) This problem only affects 64-bit machines: on 32-bit machines, all integers are exactly representable as floats, and the C99 standard specifies that in that case the conversion should be exact. -- Added file: http://bugs.python.org/file13582/long_as_double4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3166 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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 significant monkeypatches to at least one of asyncore/asynchat. The resulting coupling between Zope and asyn* has meant that the de-facto API of asyn* was much more than the documented API. IMO that's a sign of a poorly designed API (in asyn*). If Zope had had its own copy of asyn* (under a different name of course) that relied only on lower-level APIs (sockets and select), it could have evolved that copy directly without the need for monkeypatching. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5658] make html in doc fails because Makefile assigns python to PYTHON
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 ___!doctype html public -//W3C//DTD W3 HTML//EN htmlheadstyle type=text/css!-- blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 } --/styletitleRe: [issue5658] make html in doc fails because Makefile as/title/headbody divOK/div divtt-- /tt/div div-- br br nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; --- Mitchell/div /body /html___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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 statement is puzzling. No big deal, but I'm curious why you say this. ISTR that Zope has or had significant monkeypatches to at least one of asyncore/asynchat. Not that I'm aware of. I did add the ability to pass in alternative map objects, which is the only change we needed that I'm aware of. I think I made that change before or soon after asyncore was added to the standard library. The resulting coupling between Zope and asyn* has meant that the de-facto API of asyn* was much more than the documented API. If we were monkey patching it, it would be at our own risk, which is why we'd copy the module if we needed to. That has its own problems of course. I rue the day I forked doctest. :( IMO that's a sign of a poorly designed API (in asyn*). If Zope had had its own copy of asyn* (under a different name of course) that relied only on lower-level APIs (sockets and select), it could have evolved that copy directly without the need for monkeypatching. I've read a good argument that subclassing across implementation packages is a bad idea. If a framework offers features through subclassing, it should define the subclassing interface very carefully, which asyncore doesn't. Jim -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4847] csv fails when file is opened in binary mode
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 documentation and leave the code David alone. 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 general case) that csv files be opened in binary mode, the requirement will be that they be opened with newline=''. This will thwart any attempts by the io module at newline translation, but since the file is still opened in text mode its contents will implicitly be Unicode (or Unicode translated to bytes with a specific encoding). That encoding will also be specified in the call to open(). 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? Skip -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 rating at positions 3 and 4. Whom do you select? Without a tie-breaking method, it's only fair to select both and return 4 players in total instead of exactly 3. The current method selects arbitrarily (at least with respect to the key function) which of the equally-keyed items to return. This is necessary in some cases by external constraints (say, you can hire only 1 person) but there are quite a few cases that fairness is more important than a hard constraint on the number of returned objects. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5646] test_importlib fails for py3k on Windows
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 it sounds like it might be up to 15 seconds which is way too long to wait for a file deletion to complete. Might need to create a context manager that creates unique files every time. But all of this should be covered in another issue. -- stage: test needed - commit review status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5646 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 their prizes n-ways). A preferred approach is to use existing tools such as: last=result[1]; [last]*s.count(last). Alternatively, result=sorted(s) works well with bisect to find the cut points. Also, my instincts say that it is weird ask for n-items and get a result with potentially more than n. Looking at the source code for nsmallest/nlargest, I think this build-out would complicate the code quite a bit, so the use cases would need to be more compelling. The way the nsmallest/nlargest work is that they maintain an n-length buffer and loop over the entire input while remembering only the best-n-so-far. That approach doesn't easily extend to tracking best-n-so-far-and-all-ties. -- resolution: - rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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 of asyn* was much more than the documented API. IMO that's a sign of a poorly designed API (in asyn*). If Zope had had its own copy of asyn* (under a different name of course) that relied only on lower-level APIs (sockets and select), it could have evolved that copy directly without the need for monkeypatching. Zope does not monkeypatch asyncore or asynchat, and hasn't since at least Zope 2.5 (the oldest checkout I have, first released 2002-01-25). Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@agendaless.com Agendaless Consulting http://agendaless.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJ1QLqFXKVXuSL+CMRAhelAJ9yYgo1RXUhWR2cH8CjYRoXz/qsvACgg13O BFAiRoYP8AWVgQVWBhVhB+4= =wj2y -END PGP SIGNATURE- -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4847] csv fails when file is opened in binary mode
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? Skip -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3851] IDLE: Pressing Home on Windows places cursor before instead of after. Solution offered.
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: +Python 3.0, Python 3.1 -Python 2.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3851 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface
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 not forward ported to 3.0 or was otherwise disabled. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4847] csv fails when file is opened in binary mode
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 general case) that csv files be opened in binary mode, the requirement will be that they be opened with newline=''. This will thwart any attempts by the io module at newline translation, but since the file is still opened in text mode its contents will implicitly be Unicode (or Unicode translated to bytes with a specific encoding). That encoding will also be specified in the call to open(). I believe that is an accurate summary. 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? I will look in to this, and add an encoding example to the docs as you suggest in another email. --David -- nosy: +r.david.murray-old ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4847 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5670] Speed up pickling of dicts in cPickle
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: 19.24% faster Avg: 2.238 - 1.889: 18.50% faster Significant (t=106.874099, a=0.95) Benchmark is at http://code.google.com/p/unladen-swallow/source/browse/tests/performance/macro_pickle.py (driver is ../perf.py; perf.py was run with --rigorous -b pickle). This patch passes all the tests added in issue 5665. I would recommend reviewing that patch first. I'll port to py3k once this is reviewed for trunk. -- components: Extension Modules files: cpickle_dict.patch keywords: needs review, patch messages: 85239 nosy: collinwinter severity: normal status: open title: Speed up pickling of dicts in cPickle type: performance versions: Python 2.7 Added file: http://bugs.python.org/file13584/cpickle_dict.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5659] logging.FileHandler encoding parameter does not work as expected
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 prizes n-ways). I wouldn't worry about the further post-processing too much; it's optional and up to the client to implement if necessary (in my current use case it's not). Regardless, that's orthogonal to having a general, reliable and efficient function in the standard library that reduces an initial sequence of thousands/millions down to a dozen or two, preserving the ties. A preferred approach is to use existing tools such as: last=result[1]; [last]*s.count(last). Alternatively, result=sorted(s) works well with bisect to find the cut points. Also, my instincts say that it is weird ask for n-items and get a result with potentially more than n. That's a documentation issue, it would be explicitly addressed in the description of `ties`. I'm not proposing to change the current default behavior; the whole change would be fully backwards compatible. Looking at the source code for nsmallest/nlargest, I think this build-out would complicate the code quite a bit, so the use cases would need to be more compelling. The way the nsmallest/nlargest work is that they maintain an n-length buffer and loop over the entire input while remembering only the best-n-so-far. That approach doesn't easily extend to tracking best-n-so-far-and-all-ties. I haven't thought about the implementation yet but before I do, would a patch help reopen this ticket ? If so, I'm willing to take a stab at it. -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2578] additional unittest type equality methods
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 http://bugs.python.org/issue2578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2578] additional unittest type equality methods
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 solution doesn't have this problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
Changes by George Sakkis george.sak...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5670] Speed up pickling of dicts in cPickle
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 rep...@bugs.python.org http://bugs.python.org/issue5670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2578] additional unittest type equality methods
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 remember. S -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5670] Speed up pickling of dicts in cPickle
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2578] additional unittest type equality methods
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 in case of failure -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2578 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5671] Speed up pickling of lists in cPickle
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 taken in issue 5670, though the performance boost on our benchmark is smaller: Pickle: Min: 2.231 - 2.200: 1.39% faster Avg: 2.266 - 2.227: 1.72% faster Significant (t=10.994064, a=0.95) Benchmark is at http://code.google.com/p/unladen-swallow/source/browse/tests/performance/macro_pickle.py (driver is ../perf.py; perf.py was run with --rigorous -b pickle). Workloads involving more lists will benefit more. This patch passes all the tests added in issue 5665. I would recommend reviewing that patch first. I'll port to py3k once this is reviewed for trunk. -- components: Extension Modules files: cpickle_list.patch keywords: needs review, patch messages: 85250 nosy: collinwinter severity: normal status: open title: Speed up pickling of lists in cPickle type: performance versions: Python 2.7 Added file: http://bugs.python.org/file13585/cpickle_list.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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 practical use of the code you must subclass async_chat, providing meaningful collect_incoming_data() and found_terminator() methods. The asyncore.dispatcher methods can be used, although not all make sense in a message/response context. How can we make the documentation better? I'm too close to the documentation to really know how to improve it. Ideas? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5672] Implement a way to change the python process name
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 Task/Process Manager Application (in Windows/Linux/OSX/any OS), because all appear as a python process. Take Ubuntu for an example. There are more cases when this is annoying: - Imagine two python process (doing different things, of course) sending messages to syslog: looks like all coming from python process. - A bash script which wants to killall one application: how can it identify a given python script between two or more python processes? There are some methods [1][2] to work around it, but there are not just Linux/BSD only, moreover, there are not included in the python standard modules. [1] http://davyd.livejournal.com/166352.html [2] http://code.google.com/p/procname/ I hope this issue gets considered in the community to fix it, I really think this is important... :-) Regards, Marcelo -- components: Extension Modules messages: 85252 nosy: marcelo_fernandez severity: normal status: open title: Implement a way to change the python process name type: feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5672 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5670] Speed up pickling of dicts in cPickle
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 http://bugs.python.org/issue5671 for the list version. It doesn't make as big an impact on the benchmark, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192
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 proper fix is for push() to treat a last line ending in CR as a partial line, as it does if no part of a line ending is present. The OP's patch only works when FeedParser is called through the old Parser interface. -- nosy: +tony_nelson Added file: http://bugs.python.org/file13586/feedparser_pushcr_pushlf.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue170 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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) lastplace = s[n-1] if s[-1] == lastplace: raise ValueError('may not have found all ties') for i in range(n, ext): if s[i] != lastplace: break return s[:i] n = 3 s = [4,3,5,7,4,7,4,3] print nsmallest_with_ties(3, s) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
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 one did it: http://mail.python.org/pipermail/python-dev/2005-December/058784.html I'd be willing to implement it, but I'm not a core dev and I'd need someone to review it. I'll start working on a patch now, and if people think this is a good idea I'll submit it for review. My plan was to add a 'timeout' optional keyword argument to wait() and propagate that backwards through communicate(), call(), and check_call(). Does anyone object to this approach? -- components: Library (Lib) messages: 85256 nosy: rnk severity: normal status: open title: Add timeout option to subprocess.Popen type: feature request versions: Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5670] Speed up pickling of dicts in cPickle
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.) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5670 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1641] asyncore delayed calls feature
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 that can be overridden in your subclass follows: The documentation for asynchat says, To make practical use of the code you must subclass async_chat, providing meaningful collect_incoming_data() and found_terminator() methods. The asyncore.dispatcher methods can be used, although not all make sense in a message/response context. How can we make the documentation better? I'm too close to the documentation to really know how to improve it. Ideas? Actually, the documentation is better than I remember it to be. The problem is that subclassing is a much more intimate interface between components that a call interface. In the case of asyncore, the methods being overridden have non-trivial default implementations. Overriding methods often entails studying the base-class code to get an idea how it should be done. The subclassing interface for asynchat appears to be much cleaner, but even then, you need to study the base class code to make sure you haven't accidentally overridden any base class attributes. I wish classes that exposed subclassing interfaces were more careful with their internal names. Jim -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1641 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5673] Add timeout option to subprocess.Popen
Changes by Giampaolo Rodola' billiej...@users.sourceforge.net: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5673 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5630] Update CObject API so it is safe and regular
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 patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5630 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5669] Extra heapq nlargest/nsmallest option for including ties
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 rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5142] pdb feature request: Ability to skip standard lib modules and other selected packages/modules
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() -- keywords: +patch nosy: +maru Added file: http://bugs.python.org/file13587/pdb_skip_modules.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5142 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5671] Speed up pickling of lists in cPickle
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 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5671 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com