[issue3179] cPickle is seriously broken

2008-06-26 Thread Jesús Cea Avión
Changes by Jesús Cea Avión [EMAIL PROTECTED]: -- nosy: +jcea ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3179 ___ ___ Python-bugs-list mailing list

[issue3147] tests for sys.getsizeof fail on win64

2008-06-26 Thread Robert Schuppenies
Robert Schuppenies [EMAIL PROTECTED] added the comment: The tests still do not pass on the AMD64 W2k8. Surprisingly, struct.calcsize behaves as expected, but sizeof() on the C level does not. The former seems to assumes long to be 4 byte in size, the latter 8! The tests pass until it comes to a

[issue3204] operator module docs are not updated to 3.0

2008-06-26 Thread Andrii V. Mishkovskyi
New submission from Andrii V. Mishkovskyi [EMAIL PROTECTED]: __*slice__() methods of sequence-like objects are removed in Python 3.0, but operator.rst has sections on *slice()/__*slice__() functions. Attached patch removes this functions from documentation. -- assignee: georg.brandl

[issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header

2008-06-26 Thread Chris Withers
Chris Withers [EMAIL PROTECTED] added the comment: Ori, I do agree with both you and Barry but is there any chance someone could make the one-character change to make the /t a space so we can stop seeing weirdness in common mail clients? Perhaps a separate issue could be raised to refactor

[issue3147] tests for sys.getsizeof fail on win64

2008-06-26 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: I can't quite follow your layout of a longint; in debug mode, I think it is - 2P (next/prev) - ssize_t (refcnt) - P (type) - ssize_t (size) - digits Notice that a ssize_t is 64 bits on Win64, so there shouldn't be any longs in the structure

[issue3192] exec(open(filename)) doesn't work

2008-06-26 Thread Georg Brandl
Changes by Georg Brandl [EMAIL PROTECTED]: -- resolution: - duplicate status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3192 ___ ___

[issue3147] tests for sys.getsizeof fail on win64

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: long's structure is 'lP PP l H' No, it's a VAR-sized object, and ob_size is a Py_ssize_t, which is best represented as a 'P' as you already did for other types. I suggest 'lP PP P H'. the function size which is 'lp PP 9l' According to

[issue3205] bz2 iterator fails silently on MemoryError

2008-06-26 Thread Michiel de Hoon
New submission from Michiel de Hoon [EMAIL PROTECTED]: PyMem_Malloc is called in the Util_ReadAhead function in bz2module.c. The code checks if PyMem_Malloc returns NULL, but in that case no MemoryError is raised. So, if in the following code: input = bz2.BZ2File(myfile.txt.bz2) for line in

[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-06-26 Thread Andrii V. Mishkovskyi
New submission from Andrii V. Mishkovskyi [EMAIL PROTECTED]: multiprocessing.sharedctypes.Array and multiprocessing.sharedctypes.Value if used according to documentation fail with AssertionError. Python 3.0b1+ (py3k:64518, Jun 25 2008, 12:52:38) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2

[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-06-26 Thread Andrii V. Mishkovskyi
Changes by Andrii V. Mishkovskyi [EMAIL PROTECTED]: -- assignee: - georg.brandl components: +Documentation nosy: +georg.brandl ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3206 ___

[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-06-26 Thread Andrii V. Mishkovskyi
Andrii V. Mishkovskyi [EMAIL PROTECTED] added the comment: And here is the patch itself. :) -- keywords: +patch Added file: http://bugs.python.org/file10741/multiprocessing.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3206

[issue3207] file.write() after file.readline() in mode r+

2008-06-26 Thread Peter
New submission from Peter [EMAIL PROTECTED]: Following code: fp = open(delete.me, r+t) fp.readline() fp.write(New line \n) fp.close() Won't do anything. I mean nor writing to file, nor raising exception. Nothing. I can't find any note about this crap. So, it is the best place for

[issue3207] file.write() after file.readline() in mode r+

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: I tried this on windows 2000: # create a file with some text open(delete.me,w).write(some text\n) fp = open(delete.me, r+t) fp.readline() 'some text\n' fp.write(New line \n) Traceback (most recent call last): File stdin, line 1,

[issue3207] file.write() after file.readline() in mode r+

2008-06-26 Thread Peter
Changes by Peter [EMAIL PROTECTED]: ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3207 ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue3207] file.write() after file.readline() in mode r+

2008-06-26 Thread Peter
Peter [EMAIL PROTECTED] added the comment: Amaury Forgeot d'Arc, your example really raise IOError 0 Thing is that you had 1 string in the file Here is it: open(delete.me, w).write(first\nsecond\nthird) fp = open(delete.me, r+t) fp.readline() 'first\n' fp.write(Newbie) fp.close()

[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE

2008-06-26 Thread Hye-Shik Chang
Hye-Shik Chang [EMAIL PROTECTED] added the comment: Added a patch that implements codecs for CJK Macintosh encodings. I tried to implement that just alike the other existing CJK codecs, but it required many inefficient mapping tables due to their odd mappings (like this: u'ABCDE' - 'ab' AND

[issue3207] file.write() after file.readline() in mode r+

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Yes, the exact behaviour depends on multiple aspects. You should follow the C library conventions: http://www.cplusplus.com/reference/clibrary/cstdio/fopen.html For the modes where both read and writing (or appending) are allowed

[issue3206] Multiprocessing Array and sharedctypes.Array error in docs/implementation

2008-06-26 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- assignee: georg.brandl - jnoller ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3206 ___ ___

[issue3208] function annotation for builtin and C function

2008-06-26 Thread Haoyu Bai
New submission from Haoyu Bai [EMAIL PROTECTED]: It is better if the function annotation(PEP 3107) can be supported by built-in function and C function writtin in extension module, just like the __doc__ attribute. -- messages: 68783 nosy: bhy severity: normal status: open title:

[issue3209] Grammar error in UserDict module docs

2008-06-26 Thread Michael Schreifels
New submission from Michael Schreifels [EMAIL PROTECTED]: The second paragraph of the UserDict module documentation begins with this: This also module defines a class... which should be: This module also defines a class... (See http://docs.python.org/lib/module-UserDict.html ) --

[issue2650] re.escape should not escape underscore

2008-06-26 Thread Morten Lied Johansen
Morten Lied Johansen [EMAIL PROTECTED] added the comment: One issue that the current implementation has, which I can't see have been commented on here, is that it kills utf8 characters (and probably every other character encoding that is multi-byte). A é character in an utf8 encoded string

[issue2650] re.escape should not escape underscore

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The escaped regexp is not utf-8 (why should it be?), but it still matches the same bytes in the searched text, which has to be utf-8 encoded anyway: text = uété.encode('utf-8') regexp = ué.encode('utf-8') re.findall(regexp, text)

[issue3210] subprocess.Popen does not release process handles if process cannot be started

2008-06-26 Thread Geoffrey Bache
New submission from Geoffrey Bache [EMAIL PROTECTED]: Run the following code on Windows: import subprocess, os file = open(filename, w) try: proc = subprocess.Popen(nosuchprogram, stdout=file) except OSError: file.close() os.remove(filename) This produces the following exception:

[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.

2008-06-26 Thread Facundo Batista
Facundo Batista [EMAIL PROTECTED] added the comment: Robert, do you have a test suite for the sizeof functionality? If not, you should start one ASAP, ;) This test should be included in that suit... -- nosy: +facundobatista ___ Python tracker

[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.

2008-06-26 Thread Robert Schuppenies
Robert Schuppenies [EMAIL PROTECTED] added the comment: What would be a good way to identify *all* possible types? When I started, I included all objects in /Objects, but obviously this is not sufficient. ___ Python tracker [EMAIL PROTECTED]

[issue1774370] Add Tkinter.Checkbutton get() and set(value)

2008-06-26 Thread Graham Horler
Graham Horler [EMAIL PROTECTED] added the comment: I referred to the man page, as it says this: Command-Line Name:-variable ... Defaults to the name of the button within its parent. When you create a Checkbutton widget without giving a variable=SomeVar, a default variable is created which

[issue3211] warnings.warn_explicit raises SystemError

2008-06-26 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone [EMAIL PROTECTED]: Python 2.6b1+ (trunk:64531M, Jun 26 2008, 10:40:14) [GCC 4.0.3 (Ubuntu 4.0.3-1ubuntu5)] on linux2 Type help, copyright, credits or license for more information. import warnings warnings.warn_explicit(None, UserWarning, None, 0, None,

[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-06-26 Thread Glyph Lefkowitz
Glyph Lefkowitz [EMAIL PROTECTED] added the comment: As barry said, this should have been a release blocker for the first beta... ;-) -- nosy: +glyph priority: critical - release blocker ___ Python tracker [EMAIL PROTECTED]

[issue3211] warnings.warn_explicit raises SystemError

2008-06-26 Thread Andrii V. Mishkovskyi
Andrii V. Mishkovskyi [EMAIL PROTECTED] added the comment: Even more, Python 3.0 crashes from following code: Python 3.0b1+ (py3k:64528M, Jun 26 2008, 11:40:20) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type help, copyright, credits or license for more information. from warnings import

[issue1774370] Add Tkinter.Checkbutton get() and set(value)

2008-06-26 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: On Thu, Jun 26, 2008 at 1:02 PM, Graham Horler [EMAIL PROTECTED] wrote: Graham Horler [EMAIL PROTECTED] added the comment: ... When you create a Checkbutton widget without giving a variable=SomeVar, a default variable is created which

[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-06-26 Thread Ralf Schmitt
Changes by Ralf Schmitt [EMAIL PROTECTED]: -- nosy: +schmir ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2235 ___ ___ Python-bugs-list mailing list

[issue2235] __eq__ / __hash__ check doesn't take inheritance into account

2008-06-26 Thread Guido van Rossum
Guido van Rossum [EMAIL PROTECTED] added the comment: I'm going to have to ask someone else to look at this code. I am too busy with too many things to be able to take on a detailed code review. -- assignee: gvanrossum - ___ Python tracker [EMAIL

[issue3212] ssl module - should test for a wrong cert

2008-06-26 Thread Jonas Wagner
New submission from Jonas Wagner [EMAIL PROTECTED]: Currently test_ssl.py only tests for empty or broken certificates. One can break certificate validation in _ssl.c and they still pass. The following patch should fix this. - Jonas -- components: Tests files: add_wrong_cert_test.diff

[issue3209] Grammar error in UserDict module docs

2008-06-26 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Already fixed in SVN. Thanks! -- resolution: - out of date status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3209 ___

[issue3204] operator module docs are not updated to 3.0

2008-06-26 Thread Georg Brandl
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, committed as r64536. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3204 ___

[issue3211] warnings.warn_explicit raises SystemError

2008-06-26 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- assignee: - brett.cannon nosy: +brett.cannon ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3211 ___

[issue2512] decide what to do with gettext API

2008-06-26 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: This is something that should definitely happen before beta 2. -- priority: critical - release blocker ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2512

[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.

2008-06-26 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: I think it would be better to give a TypeError rather than an AttributeError for objects that don't support __sizeof__ as per other special methods. -- nosy: +benjamin.peterson ___ Python tracker

[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.

2008-06-26 Thread Robert Schuppenies
Robert Schuppenies [EMAIL PROTECTED] added the comment: The attribute error is caused by pattern_getattr, which tries to find __sizeof__, fails and then sets the error message. I don't know if casting the error is the right thing to do. Actually, sys.getsizeof() should work on any type. Another

[issue1774370] Add Tkinter.Checkbutton get() and set(value)

2008-06-26 Thread Graham Horler
Graham Horler [EMAIL PROTECTED] added the comment: I'm aware of that and that is why everywhere I see Checkbutton being used I see a explicit variable being created. Absolutely the reason for this patch, to get rid of unnecessary code. What's not to like? I was referring to the other

[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: I wondered why getsizeof fails for _sre.SRE_Pattern objects when it succeeds for _socket.socket or struct.Struct. It turns out that _sre.SRE_Pattern defines the tp_getattr slot, and this prevents attribute lookup from searching the base

[issue3122] sys.getsizeof() gives an AttributeError for _sre objects.

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Robert, looking at your patch for the _sre module, I noticed that MatchObject.__sizeof__ includes the sizeof of one of its member (regs: a tuple of (begin, end) pairs). Why this one and not the others? I thought the rule (if there is a

[issue1774370] Add Tkinter.Checkbutton get() and set(value)

2008-06-26 Thread Guilherme Polo
Guilherme Polo [EMAIL PROTECTED] added the comment: Graham Horler [EMAIL PROTECTED] added the comment: I'm aware of that and that is why everywhere I see Checkbutton being used I see a explicit variable being created. Absolutely the reason for this patch, to get rid of unnecessary code.

[issue3212] ssl module - should test for a wrong cert

2008-06-26 Thread Bill Janssen
Bill Janssen [EMAIL PROTECTED] added the comment: OK, good idea. I'll put it in. Bill On Thu, Jun 26, 2008 at 11:34 AM, Jonas Wagner [EMAIL PROTECTED] wrote: New submission from Jonas Wagner [EMAIL PROTECTED]: Currently test_ssl.py only tests for empty or broken certificates. One can

[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-26 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Jesse: ping? ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3125 ___ ___ Python-bugs-list mailing list

[issue3211] warnings.warn_explicit raises SystemError

2008-06-26 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: I have a fix in the works; just waiting for the test suite to finish. -- status: open - pending ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3211

[issue3125] test_multiprocessing causes test_ctypes to fail

2008-06-26 Thread Jesse Noller
Jesse Noller [EMAIL PROTECTED] added the comment: Sorry - I've been sick and overly busy this week, the mp issues are on my asap pile On Jun 26, 2008, at 7:17 PM, Amaury Forgeot d'Arc [EMAIL PROTECTED] wrote: Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Jesse: ping?

[issue3213] pydoc -p should listen to [::] if IPv6 is supported

2008-06-26 Thread Hans Ulrich Niedermann
New submission from Hans Ulrich Niedermann [EMAIL PROTECTED]: According to pydoc --help, pydoc -p port Start an HTTP server on the given port on the local machine. The IP address pydoc binds to is not specified, thus I would expect it to either bind to the local address or to the wildcard

[issue3211] warnings.warn_explicit raises SystemError

2008-06-26 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: r64552 has the 3.0 fix. Thanks for the report gentleman! -- status: pending - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3211 ___

[issue3213] pydoc -p should listen to [::] if IPv6 is supported

2008-06-26 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: That will break on systems where AF_INET6 doesn't default to dual-stacked sockets and mapped v4 addresses (e.g. Windows); to make it work correctly, you'll also have to disable the IPV6_V6ONLY option, which then breaks on systems which don't

[issue3214] Suggest change to glossary explanation: Duck Typing

2008-06-26 Thread Paddy McCarthy
New submission from Paddy McCarthy [EMAIL PROTECTED]: The official glossary entry here: http://docs.python.org/tut/node18.html#l2h-46 says: duck-typing Pythonic programming style that determines an object's type by inspection of its method or attribute signature rather than by explicit

[issue1276] LookupError: unknown encoding: X-MAC-JAPANESE

2008-06-26 Thread Hye-Shik Chang
Changes by Hye-Shik Chang [EMAIL PROTECTED]: Added file: http://bugs.python.org/file10749/maccjkcodecs-1-py3k.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1276 ___

[issue993766] bdist_dumb and --relative on Windows fails

2008-06-26 Thread zouguangxian
zouguangxian [EMAIL PROTECTED] added the comment: I encounter the same problem of Mark Hammond. I check the code in repository, the ensure_relative function in python25 is: def ensure_relative (path): Take the full path 'path', and make it a relative path so it can be the second