[issue4240] parasite form feed character in email.mime.text

2008-10-30 Thread Tarek Ziadé
New submission from Tarek Ziadé <[EMAIL PROTECTED]>: Hi, There's a parasite form feed character in email/mime/text.py (as well in python 2.4 and 2.5) I caught that under vim (^L), it is located line 12 in the file, the line before the class definition starts -- components: Library (L

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: 'rt' is a valid mode for open() or io.open(). But io.FileIO is the unbuffered raw binary file... Python 2.6 has exactly the same problem and displays the same RuntimeWarning. Christian, the change you propose does not fix another case:

[issue4238] BSD support for multiprocessing.cpu_count

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I prefer to use the test "sys.platform in ('darwin', 'bsd')" ;-) -- nosy: +haypo ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue4240] parasite form feed character in email.mime.text

2008-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: PEP 8 does not call them parasites: http://www.python.org/dev/peps/pep-0008/ """ Python accepts the control-L (i.e. ^L) form feed character as whitespace; Many tools treat these characters as page separators, so you may use them to sepa

[issue4240] parasite form feed character in email.mime.text

2008-10-30 Thread Tarek Ziadé
Tarek Ziadé <[EMAIL PROTECTED]> added the comment: so basically, if I open email.py, it is perfectly OK to have is opened in two pages in an editor ? How weird ! PEP 8 also says that we should be consistent throughout a code base. If this was the case everywhere in sdtlib, I'd say ok, but im

[issue1248] ftplib needs a rewrite to use bytes/buffers

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: > So can we close this? Yes: retrbinary() and storbinary() can be used to get/send bytes. Reopen the issue (or open another one) if we miss another problem. -- status: open -> closed ___ Python t

[issue4240] parasite form feed character in email.mime.text

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: ^L is used for a printer to insert a new blank page. But who really print a source code on a printer? Or does some editor have a special usage of this *control sequence*? It looks like ^L is used in Lib/smtpd.py as a hack for some editors s

[issue3996] PyOS_CheckStack does not work

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: See also issue #3999: I wrote a new generic handler for stack overflow "exception". ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4036] Support bytes for subprocess.Popen()

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @loewis: My patch only changes the behaviour of the POSIX version of subprocess, Windows version is unchanged. ___ Python tracker <[EMAIL PROTECTED]>

[issue4234] bin missing from documentation

2008-10-30 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: In addition, the description of binary literals is missing from the lexical analysis section of the reference manual, as is the description of new-style octal literals (i.e. "0o23" instead of "023"). Here's a patch (against the trunk; 2.6 a

[issue4241] zipfile.py -> is_zipfile leaves file open when error

2008-10-30 Thread Eino Mäkitalo
New submission from Eino Mäkitalo <[EMAIL PROTECTED]>: Very simple error. If is_zipfile crashes when checking is_zipfile if zipfile is corrupted or not at all zip. It leaves file open and prevents later to remove file etc... Maybe it's corrected in next versions Old code: zipfile... line 86:

[issue1069092] segfault on printing nested sequences of None/Ellipsis

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I propose a generic solution in issue #3999 to catch stack overflow (and be able to continue after such "exception"). ___ Python tracker <[EMAIL PROTECTED]> __

[issue4240] parasite form feed character in email.mime.text

2008-10-30 Thread Tarek Ziadé
Tarek Ziadé <[EMAIL PROTECTED]> added the comment: ok so it seems there are around 150 occurences, so I guess it is OK in this particular code base :D ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4240] parasite form feed character in email.mime.text

2008-10-30 Thread Skip Montanaro
Skip Montanaro <[EMAIL PROTECTED]> added the comment: Perhaps final comment here. The email package was authored by Barry Warsaw. That's the way he prefers to break his code into sections. Definitely neither parasitic nor accidental. Skip -- nosy: +skip.montanaro

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-30 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: The new patch fixes the problem and adds a unit test, too. The bug was caused by a design flaw -- which was partly my fault. Some elements of the PyFileIOObject struct were initialized in __new__ while other parts were initialized in __init

[issue4238] BSD support for multiprocessing.cpu_count

2008-10-30 Thread Eric Gillespie
Eric Gillespie <[EMAIL PROTECTED]> added the comment: sys.platform is 'netbsd4', and presumably 'freebsd5' and so on, so that won't work. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4238] BSD support for multiprocessing.cpu_count

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: @epg: Ooops, I read sys.platform == 'bsd'. ___ Python tracker <[EMAIL PROTECTED]> ___ ___ P

[issue4242] Classify language vs. impl-detail tests, step 1

2008-10-30 Thread Armin Rigo
New submission from Armin Rigo <[EMAIL PROTECTED]>: This patch contains a first step towards classifying CPython tests into language tests and implementation-details tests. The patch is against the 2.7 trunk's test_descr.py. It is derived from a similar patch that we wrote for the 2.5's test_de

[issue4243] has_key doc could be clearer

2008-10-30 Thread Terry J. Reedy
New submission from Terry J. Reedy <[EMAIL PROTECTED]>: 2.6 lib ref builtin types, mappings, has_key doc now says "dict.has_key(key) is equivalent to key in d, but deprecated." Posters on c.l.p found this confusing. Which is deprecated? I agree that this could be confusing to a beginner. D'Arcy

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The patch looks fine to me ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs

[issue4243] has_key doc could be clearer

2008-10-30 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: Out of curiosity: is that really ambiguous in plain English? -- nosy: +loewis ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4242] Classify language vs. impl-detail tests, step 1

2008-10-30 Thread Brett Cannon
Changes by Brett Cannon <[EMAIL PROTECTED]>: -- nosy: +brett.cannon ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-list mail

[issue4242] Classify language vs. impl-detail tests, step 1

2008-10-30 Thread Brett Cannon
Brett Cannon <[EMAIL PROTECTED]> added the comment: Based on your experience, Armin, is it worth having a class decorator as well/instead? The other comment I have is whether impl_detail is really the best name. Would something like cpython work out better to be more obvious that the test is spe

[issue4243] has_key doc could be clearer

2008-10-30 Thread Giampaolo Rodola'
Giampaolo Rodola' <[EMAIL PROTECTED]> added the comment: English is not my first language but it seems obvious to me that the suggestion is using: >>> key in dict ...instead of: >>> dict.has_key(key) The only thing which may be confusing is the dictionary which is first called "dict" and the

[issue4238] BSD support for multiprocessing.cpu_count

2008-10-30 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: -- assignee: -> jnoller nosy: +jnoller ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4242] Classify language vs. impl-detail tests, step 1

2008-10-30 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: As I mentioned on Python-dev, I have implemented something similar to this in my testing branch. [1] http://code.python.org/users/benjamin.peterson/new_testing/main -- nosy: +benjamin.peterson

[issue4170] segfault with defaultdict and pickle

2008-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Fixed with r67048. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue4243] has_key doc could be clearer

2008-10-30 Thread Georg Brandl
Georg Brandl <[EMAIL PROTECTED]> added the comment: If I understand English correctly, I don't see an ambiguity. Probably the poster(s) on c.l.p didn't look properly and read something like "equivalent to key in d, but the latter is deprecated". The d/dict inconsistency should be fixed. __

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-30 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Fixed in r67051 (py3k), r67052 (trunk) -- assignee: barry -> christian.heimes resolution: -> accepted versions: -Python 2.7, Python 3.0 ___ Python tracker <[EMAIL PROTECTED]>

[issue4200] atexit module not safe in Python 3.0 with multiple interpreters

2008-10-30 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Fixed in r67054 -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue4213] Lower case file system encoding

2008-10-30 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Fixed in r67055 -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ _

[issue3723] Py_NewInterpreter does not work

2008-10-30 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Applied in r67057 -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___ ___

[issue4237] io.FileIO('foo', 'rt') prints a RuntimeWarning

2008-10-30 Thread Christian Heimes
Christian Heimes <[EMAIL PROTECTED]> added the comment: Merged into the release26 branch, too. -- resolution: accepted -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue4213] Lower case file system encoding

2008-10-30 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > The solution is elegant and works well. I can't agree with that evaluation. In cases where Python would fail without this patch (i.e. because the file system encoding cannot be found during startup), this solution doesn't work well in gene

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed r67048 (trunk), r67056 (2.5), r67053 (2.6), r67059 (py3k). -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue4225] unicode_literals doesn't work in exec

2008-10-30 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Here's a patch that handles the parser module. Added file: http://bugs.python.org/file11911/parser_module_fixed_too.patch ___ Python tracker <[EMAIL PROTECTED]> __

[issue4225] unicode_literals doesn't work in exec

2008-10-30 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11911/parser_module_fixed_too.patch ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue4225] unicode_literals doesn't work in exec

2008-10-30 Thread Benjamin Peterson
Changes by Benjamin Peterson <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11912/parser_module_fixed_too.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4242] Classify language vs. impl-detail tests, step 1

2008-10-30 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: I personally wonder if we should be moving towards a more systematic means of identifying the underlying Python VM than the current fairly ad hoc use of sys.platform. By that I mean adding another sys attribute (e.g. sys.vm) which could be chec

[issue4242] Classify language vs. impl-detail tests, step 1

2008-10-30 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: On Thu, Oct 30, 2008 at 5:33 PM, Nick Coghlan <[EMAIL PROTECTED]> wrote: > > Nick Coghlan <[EMAIL PROTECTED]> added the comment: > > I personally wonder if we should be moving towards a more systematic > means of identifying the underlying

[issue4234] bin missing from documentation

2008-10-30 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: Fixed in r67060. -- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> __

[issue4213] Lower case file system encoding

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Le Thursday 30 October 2008 23:14:21 Martin v. Löwis, vous avez écrit : > I can't agree with that evaluation. In cases where Python would fail > without this patch (i.e. because the file system encoding cannot be > found during startup), My p

[issue3727] poplib module broken by str to unicode conversion

2008-10-30 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I'm happy with Victor's patch. ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bug

[issue3714] nntplib module broken by str to unicode conversion

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: After testing many different emails servers (POP3, IMAP4 and NNTP), I think that the best type is bytes and not str (unicode). Attached patch changes nntplib to use bytes: - write tests using Gmane NNTP public server - use bytes everywhere

[issue3714] nntplib module broken by str to unicode conversion

2008-10-30 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: I haven't been able to examine the patch in depth, but one thing I see is that the test case needs to call test.support.requires("network"). -- nosy: +benjamin.peterson ___ Python tracker <[EMAI

[issue4242] Classify language vs. impl-detail tests, step 1

2008-10-30 Thread Nick Coghlan
Nick Coghlan <[EMAIL PROTECTED]> added the comment: Interesting, I hadn't noticed that addition to the platform module for 2.6. A bit more verbose than sys.vm, but it would certainly do the trick :) In that case, I would suggest something along the lines of the following: vm = platform.python_

[issue3626] python3.0 interpreter on Cygwin ignores all arguments

2008-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: Committed the "%ls" fix with r67064. -- keywords: -needs review resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3714] nntplib module broken by str to unicode conversion

2008-10-30 Thread STINNER Victor
Changes by STINNER Victor <[EMAIL PROTECTED]>: -- keywords: +needs review ___ Python tracker <[EMAIL PROTECTED]> ___ ___ Python-bugs-lis

[issue4225] unicode_literals doesn't work in exec

2008-10-30 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment: The patch is good, except that you removed "static" before the function err_input (?) ___ Python tracker <[EMAIL PROTECTED]> ___

[issue4216] subprocess.Popen hangs at communicate() when child exits

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I'm unable to reproduce your problem with Python 2.4.4 nor Python 2.5.1. I'm using Ubuntu and the program "service" doesn't exist. So I used the commands "pwd", "sh -c pwd", "sh -c 'echo $$'". All commands terminate correctly. Your problem

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Thank you, Amaury, for fixing this. However, you forgot to also patch the Python implementation of pickle, which makes the following test fail: == FAIL: test_reduce_bad

[issue4236] Crash when importing builtin module during interpreter shutdown

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: The problem occurs in PyImport_Cleanup() on this line: PyDict_SetItemString(dict, "_", Py_None); So the problem is that "_" (special variable in the Python interpreter) is removed too late, or that a destructor loads a module when Python

[issue4236] Crash when importing builtin module during interpreter shutdown

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Here is a patch fixing this issue: set builtins._=None at exit. The new introduced function, PyRun_InteractiveCleanup(), might also be called at the end of other functions like PyRun_InteractiveOne() or PyRun_InteractiveOneFlags(). If not,

[issue4236] Crash when importing builtin module during interpreter shutdown

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Another solution: just remove the initialization test from PyModule_Create2(). I don't know if it's a safety test or something like that. Added file: http://bugs.python.org/file11915/pymodule_create2.patch _

[issue4236] Crash when importing builtin module during interpreter shutdown

2008-10-30 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: Python2 is not affected because the bug comes from PyModule_Create2() which was introduced in Python3. ___ Python tracker <[EMAIL PROTECTED]>

[issue4225] unicode_literals doesn't work in exec

2008-10-30 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: The removal of the "static" was a mistake. Fixed in r67066. -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]>

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-30 Thread Hirokazu Yamamoto
Hirokazu Yamamoto <[EMAIL PROTECTED]> added the comment: >the Python implementation of pickle This was out of my mind. I hope fix_pickle_consistency_on_py3k.patch can fix the buildbot error. ;-) -- keywords: -needs review Added file: http://bugs.python.org/file11916/fix_pickle_consiste