[issue3657] pickle can pickle the wrong function

2008-08-24 Thread Neal Norwitz

New submission from Neal Norwitz <[EMAIL PROTECTED]>:

test_pickletools fails sporadically on at least two platforms I've seen.

http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/4120/step-test/0
http://www.python.org/dev/buildbot/all/ppc%20Debian%20unstable%20trunk/builds/1908/step-test/0

File
"/home/buildslave/python-trunk/trunk.norwitz-x86/build/Lib/pickletools.py",
line ?, in pickletools.__test__.disassembler_test
Failed example:
dis(pickle.dumps(random.random, 0))
Expected:
0: cGLOBAL 'random random'
   15: pPUT0
   18: .STOP
highest protocol among opcodes = 0
Got:
0: cGLOBAL 'bsddb.test.test_thread random'
   31: pPUT0
   34: .STOP
highest protocol among opcodes = 0
**
1 items had failures:
   1 of  25 in pickletools.__test__.disassembler_test

--
components: Interpreter Core
messages: 71830
nosy: nnorwitz
priority: release blocker
severity: normal
status: open
title: pickle can pickle the wrong function
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3627] apple security patches need to be forward ported to py3k

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Committed revision 66009.

--
assignee:  -> nnorwitz
resolution:  -> fixed
status: open -> closed
type:  -> security

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Even with the patch, there are still tons of leaks.  I don't know if
it's due to the same problem or not.  So far there is:

test_unittest leaked [124, 124] references, sum=248
test_array leaked [110, 110] references, sum=220
test_audioop leaked [75, 75] references, sum=150
test_binascii leaked [4, 4] references, sum=8

There are probably more.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3653] segfault calling sys.excepthook with non-Exception argument

2008-08-24 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

PyErr_Format sets the new exception and returns NULL though.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3653] segfault calling sys.excepthook with non-Exception argument

2008-08-24 Thread STINNER Victor

Changes by STINNER Victor <[EMAIL PROTECTED]>:


--
nosy: +haypo

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

The main cause of these leaks is each time PyArg_ParseTuple("s#") is
passed a bytes object.
If FillInfo() increfs the given object, every object should have a
bf_releasebuffer that decrefs it.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3656] unicode encoding has lots of leaks of bytes

2008-08-24 Thread Amaury Forgeot d'Arc

Changes by Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:


--
resolution:  -> duplicate
status: open -> closed
superseder:  -> eval() leaks 1 reference every time

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3654] Duplicated test name in regex test script

2008-08-24 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
priority:  -> normal
type:  -> behavior
versions: +Python 2.6, Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Le dimanche 24 août 2008 à 09:18 +, Amaury Forgeot d'Arc a écrit :
> If FillInfo() increfs the given object, every object should have a
> bf_releasebuffer that decrefs it.

There's no need for that, PyBuffer_Release() does the decref.
But PyBuffer_Release() must be used instead of calling bf_releasebuffer
directly.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3658] fix for pychecker property complaints

2008-08-24 Thread Skip Montanaro

New submission from Skip Montanaro <[EMAIL PROTECTED]>:

Attached is a patch to fix some pychecker complaints Neal Norwitz
uncovered.  All involved tests pass.  Submitting patch simply because
we're past beta3.

--
assignee: nnorwitz
components: Library (Lib)
files: pychecker.diff
keywords: easy, needs review, patch
messages: 71836
nosy: nnorwitz, skip.montanaro
severity: normal
status: open
title: fix for pychecker property complaints
versions: Python 2.6
Added file: http://bugs.python.org/file11233/pychecker.diff

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3658] fix for pychecker property complaints

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

It doubt many people are inheriting from the classes that are changed to
new-style in the patch, but I thought it was policy that we didn't
change that until 3.0 "just in case".

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3653] segfault calling sys.excepthook with non-Exception argument

2008-08-24 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


Added file: http://bugs.python.org/file11234/use_unraiseable_better.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3658] fix for pychecker property complaints

2008-08-24 Thread Skip Montanaro

Skip Montanaro <[EMAIL PROTECTED]> added the comment:

I can see where that might be a problem.  If that's the case I suspect 
those property attributes should be changed.  OTOH, do properties work on 
classic classes?

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3658] fix for pychecker property complaints

2008-08-24 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Read-only properties on old-style classes seem to work (though I don't
know if that is an implementation accident), insofar it seems harmless
not to apply this patch.

--
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3659] sqlite: enumeration value 'TYPE_STRING' not handled in switch

2008-08-24 Thread Christian Heimes

New submission from Christian Heimes <[EMAIL PROTECTED]>:

I'm getting the compiler warning:

Modules/_sqlite/statement.c: In function
'pysqlite_statement_bind_parameter':
Modules/_sqlite/statement.c:133: warning: enumeration value
'TYPE_STRING' not handled in switch

I tried to make sense of the code before the warning. It looks like
TYPE_STRING isn't handled at all. The warning may be sign for a design
flaw or missing feature in the code.

--
components: Extension Modules
messages: 71839
nosy: christian.heimes
priority: release blocker
severity: normal
status: open
title: sqlite: enumeration value 'TYPE_STRING' not handled in switch
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3658] fix for pychecker property complaints

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

No, they don't work correctly. Readonly properties in old style classes
aren't readonly:

>>> class Example:
... @property
... def spam(self):
... return "spam"
...
>>> example = Example()
>>> example.spam
'spam'
>>> example.spam = "egg"
>>> example.spam
'egg'

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3658] fix for pychecker property complaints

2008-08-24 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Ah yes. But still, I'd call that harmless. Assigning to attributes
you're not supposed to assign to is detrimental in many cases.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3642] Objects/obmalloc.c:529: warning: comparison is always false due to limited range of data type

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

I've fixed both compiler warnings in trunk and py3k branch.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3637] 2to3 refactoring

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

This also restores 2.5 compatibility.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3649] IA5 Encoding should be in the default encodings

2008-08-24 Thread Pascal Bach

Pascal Bach <[EMAIL PROTECTED]> added the comment:

I have looked at utf_8.py and I think I know how to implement the
incremental de/encoder. But I don't understand the codecs.register()
function. Do I have to provide stateless, stateful and streamwriter at
the same time? 
If I implement IncrementalEncoder and IncrementalDecoder can I just give
those two to codecs.register()?

Thank you for your help.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3574] compile() cannot decode Latin-1 source encodings

2008-08-24 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

Since this is marked "release blocker", I'll provide a shallow comment:

I don't think it should be a release blocker. It's a bug in the compile
function, and there are various work-arounds (such as saving the bytes
to a temporary file and executing that one, or decoding the byte string
to a Unicode string, and then compiling the Unicode string). It is
sufficient to fix it in 3.0.1.

I don't think the patch is right: as the test had to be changed, it
means that somewhere, the detection of the encoding declaration now
fails. This is clearly a new bug, but I don't have the time to analyse
the cause further.

In principle, there is nothing wrong with the tokenizer treating latin-1
as "raw" - that only means we don't go through a codec.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2351] Using __(get|set|del)slice__ needs a Py3K warning

2008-08-24 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

On Sat, Aug 23, 2008 at 6:00 PM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> Those changes are great; thanks for the review! Are you happy enough
> with it to let me apply?
>

Yep.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2351] Using __(get|set|del)slice__ needs a Py3K warning

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Ok. Applied in r66013.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3654] Duplicated test name in regex test script

2008-08-24 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

Fixed in r66014.

--
nosy: +georg.brandl
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3574] compile() cannot decode Latin-1 source encodings

2008-08-24 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

Actually, the tests don't have to change; if issue 3594 gets applied
then that change cascades into this issue and negates the need to change
the tests themselves.

As for treating Latin-1 as a raw encoding, how can that be theoretically
okay if the parser assumes UTF-8 and Latin-1 is not a superset of Latin-1?

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2744] Fix test_cProfile

2008-08-24 Thread Neal Norwitz

Changes by Neal Norwitz <[EMAIL PROTECTED]>:


--
priority: critical -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3649] IA5 Encoding should be in the default encodings

2008-08-24 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
priority:  -> normal
versions: +Python 2.7, Python 3.1 -Python 2.5

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3660] reference leaks in 3.0

2008-08-24 Thread Neal Norwitz

New submission from Neal Norwitz <[EMAIL PROTECTED]>:

Even after adding the current patch in http://bugs.python.org/issue3651
there are many reference leaks.  This bug can be a placeholder for all
the reference leaks returned from:  
  ./python ./Lib/test/regrtest.py -R 3:2 -uall,-bsddb 

The current list is:

test_unittest leaked [124, 124] references, sum=248
test_array leaked [110, 110] references, sum=220
test_audioop leaked [75, 75] references, sum=150
test_binascii leaked [4, 4] references, sum=8
test_binhex leaked [4, 4] references, sum=8
test_codecs leaked [3, 3] references, sum=6
test_ctypes leaked [9, 9] references, sum=18
test_dbm leaked [194, 194] references, sum=388
test_dbm_gnu leaked [2, 2] references, sum=4
test_fcntl leaked [2, 2] references, sum=4
test_file leaked [8, 8] references, sum=16
test_fileio leaked [1, 1] references, sum=2
test_memoryio leaked [3, 3] references, sum=6
test_minidom leaked [5, 5] references, sum=10
test_mmap leaked [307, 307] references, sum=614
test_ossaudiodev leaked [2, 2] references, sum=4
test_pickle leaked [130, 130] references, sum=260
test_pickletools leaked [503, 503] references, sum=1006
test_pyexpat leaked [1, 1] references, sum=2
test_re leaked [4, 4] references, sum=8
test_site leaked [88, 88] references, sum=176
test_socket leaked [13, 13] references, sum=26
test_sqlite leaked [17, 17] references, sum=34
test_ssl leaked [82, 82] references, sum=164
test_struct leaked [5, 5] references, sum=10
test_unicode leaked [2, 2] references, sum=4
test_urllib2_localnet leaked [3, 3] references, sum=6
test_xmlrpc leaked [18, 18] references, sum=36
test_xmlrpc_net leaked [1, 1] references, sum=2
test_zlib leaked [10, 10] references, sum=20

--
components: Interpreter Core
messages: 71851
nosy: nnorwitz
priority: release blocker
severity: normal
status: open
title: reference leaks in 3.0
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3574] compile() cannot decode Latin-1 source encodings

2008-08-24 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

> As for treating Latin-1 as a raw encoding, how can that be theoretically
> okay if the parser assumes UTF-8 and Latin-1 is not a superset of Latin-1?

The parser doesn't assume UTF-8, but "ascii+", i.e. it passes all
non-ASCII bytes on to the AST, which then needs to deal with them;
it then could (but apparently doesn't) take into account whether the
internal representation was UTF-8 or Latin-1: see ast.c:decode_unicode
for some remains of that.

The other case (besides string literals) where bytes > 127 matter is
tokenizer.c:verify_identifier; this indeed assumes UTF-8 only (but
could be easily extended to support Latin-1 as well).

The third case where non-ASCII bytes are allowed is comments; there
they are entirely ignored (i.e. it is not even verified that the
comment is well-formed UTF-8).

Removal of the special case should simplify the code; I would agree
that any speedup gained by not going through a codec is irrelevant.
I'm still puzzled why test_imp if the special case is removed.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3661] sys.call_tracing segfaults

2008-08-24 Thread Daniel Diniz

New submission from Daniel Diniz <[EMAIL PROTECTED]>:

The following code causes a segfault for me:

import sys; sys.call_tracing(type,2)

Running on:
Python 3.0b3+ (py3k:66015, Aug 24 2008, 16:21:19)
[GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2

gdb output:
[New Thread -1210857280 (LWP 8823)]
python: Objects/typeobject.c:1854: type_new: Assertion `args != ((void
*)0) && ((PyObject*)(args))->ob_type))->tp_flags & ((1L<<26))) !=
0)' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread -1210857280 (LWP 8823)]
0xe410 in __kernel_vsyscall ()
(gdb) backtrace
#0  0xe410 in __kernel_vsyscall ()
#1  0xb7d67875 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7d69201 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7d60b6e in __assert_fail () from /lib/tls/i686/cmov/libc.so.6
#4  0x0806e802 in type_new (metatype=0x81ba120, args=0x81fbda8,
kwds=0x0) at Objects/typeobject.c:1854
#5  0x0806bd0e in type_call (type=0x81ba120, args=0x81fbda8, kwds=0x0)
at Objects/typeobject.c:636
#6  0x08118ec5 in PyObject_Call (func=0x81ba120, arg=0x81fbda8, kw=0x0)
at Objects/abstract.c:2181
#7  0x080b2ac5 in _PyEval_CallTracing (func=0x81ba120, args=0x81fbda8)
at Python/ceval.c:3109
#8  0x080e7830 in sys_call_tracing (self=0xb7f073b4, args=0xb7a53bcc) at
Python/sysmodule.c:771
#9  0x081626b1 in PyCFunction_Call (func=0xb7f081bc, arg=0xb7a53bcc,
kw=0x0) at Objects/methodobject.c:81
#10 0x080b378f in call_function (pp_stack=0xbf9b6b84, oparg=2) at
Python/ceval.c:3403
#11 0x080ae8d2 in PyEval_EvalFrameEx (f=0x829bb14, throwflag=0) at
Python/ceval.c:2205
#12 0x080b1c24 in PyEval_EvalCodeEx (co=0xb7a9b9e8, globals=0xb7f0b5d4,
locals=0xb7f0b5d4, args=0x0, argcount=0, kws=0x0,
kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at
Python/ceval.c:2840
#13 0x080a69cb in PyEval_EvalCode (co=0xb7a9b9e8, globals=0xb7f0b5d4,
locals=0xb7f0b5d4) at Python/ceval.c:519
#14 0x080df64b in run_mod (mod=0x82a2aa0, filename=0x819e3be "",
globals=0xb7f0b5d4, locals=0xb7f0b5d4,
flags=0xbf9b6f60, arena=0x82b1060) at Python/pythonrun.c:1560
#15 0x080df393 in PyRun_StringFlags (str=0x8203fd8 "import sys;
sys.call_tracing(type,2)\n", start=257, globals=0xb7f0b5d4,
locals=0xb7f0b5d4, flags=0xbf9b6f60) at Python/pythonrun.c:1494
#16 0x080ddd37 in PyRun_SimpleStringFlags (command=0x8203fd8 "import
sys; sys.call_tracing(type,2)\n", flags=0xbf9b6f60)
at Python/pythonrun.c:1073
#17 0x080ef5ca in Py_Main (argc=2, argv=0xb7ede028) at Modules/main.c:533
#18 0x0805a689 in main (argc=2, argv=0xbf9b80b4) at ./Modules/python.c:57

--
components: Interpreter Core
messages: 71853
nosy: ajaksu2
severity: normal
status: open
title: sys.call_tracing segfaults
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Daniel Diniz

New submission from Daniel Diniz <[EMAIL PROTECTED]>:

This snippet causes a segfault from fileio_init calling PyMem_Free:

import _fileio; _fileio._FileIO("1",0, 0 )

Found using Fusil

[Switching to Thread -1210070848 (LWP 10184)]
0x0805f5ff in _PyObject_DebugCheckAddress (p=0xb7b2f0e8) at
Objects/obmalloc.c:1461
1461if (tail[i] != FORBIDDENBYTE) {
(gdb) backtrace
0  0x0805f5ff in _PyObject_DebugCheckAddress (p=0xb7b2f0e8) at
Objects/obmalloc.c:1461
1  0x0805f3c4 in _PyObject_DebugFree (p=0xb7b2f0e8) at
Objects/obmalloc.c:1375
2  0x0805de07 in PyMem_Free (p=0xb7b2f0e8) at Objects/object.c:1693
3  0x0810afa9 in fileio_init (oself=0xb7b18238, args=0xb7b815b4,
kwds=0x0) at ./Modules/_fileio.c:281
4  0x0806bdd0 in type_call (type=0x81d3760, args=0xb7b815b4, kwds=0x0)
at Objects/typeobject.c:650
5  0x08118ec5 in PyObject_Call (func=0x81d3760, arg=0xb7b815b4, kw=0x0)
at Objects/abstract.c:2181
6  0x080b42a5 in do_call (func=0x81d3760, pp_stack=0xbfab5c84, na=3,
nk=0) at Python/ceval.c:3616
7  0x080b394a in call_function (pp_stack=0xbfab5c84, oparg=3) at
Python/ceval.c:3426
8  0x080ae8d2 in PyEval_EvalFrameEx (f=0x829bb14, throwflag=0) at
Python/ceval.c:2205
9  0x080b1c24 in PyEval_EvalCodeEx (co=0xb7b5b9e8, globals=0xb7fcc5d4,
locals=0xb7fcc5d4, args=0x0, argcount=0, kws=0x0,
kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at
Python/ceval.c:2840
10 0x080a69cb in PyEval_EvalCode (co=0xb7b5b9e8, globals=0xb7fcc5d4,
locals=0xb7fcc5d4) at Python/ceval.c:519
11 0x080df64b in run_mod (mod=0x82a2ac0, filename=0x819e3be "",
globals=0xb7fcc5d4, locals=0xb7fcc5d4,
flags=0xbfab6060, arena=0x82b1060) at Python/pythonrun.c:1560
12 0x080df393 in PyRun_StringFlags (str=0x8203fd8 "import _fileio;
_fileio._FileIO('1',0, 0 )\n", start=257,
globals=0xb7fcc5d4, locals=0xb7fcc5d4, flags=0xbfab6060) at
Python/pythonrun.c:1494
13 0x080ddd37 in PyRun_SimpleStringFlags (command=0x8203fd8 "import
_fileio; _fileio._FileIO('1',0, 0 )\n",
flags=0xbfab6060) at Python/pythonrun.c:1073
14 0x080ef5ca in Py_Main (argc=2, argv=0xb7f9e028) at Modules/main.c:533
15 0x0805a689 in main (argc=2, argv=0xbfab71b4) at ./Modules/python.c:57

--
messages: 71854
nosy: ajaksu2
severity: normal
status: open
title: _fileio._FileIO segfaults
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
versions: +Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3574] compile() cannot decode Latin-1 source encodings

2008-08-24 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

The test_imp stuff has to do with PyTokenizer_FindEncoding().
imp.find_module() only opens the file, passes the file descriptor to
PyTokenizer_FindEncoding() and then returns a file object with the found
encoding.

Problem is that (as issue 3594 points out), PyTokenizer_FindEncoding()
always fails. That means it assumes only the raw encodings are okay.
With Latin-1 being one of them, it returns the file opened as Latin-1 as
is correct. Removing that case here means PyTokenizer_FindEncoding()
fails, and thus assumes only UTF-8 as a legitimate encoding and opens
the files with the UTF-8 encoding. It took a while to find these two
bugs obviously. =)

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3661] sys.call_tracing segfaults

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

The function call fails much earlier in debug builds. sys_call_tracing()
doesn't check the type of the second argument. It must be a tuple
because it's directly passed to the PyObject_Call() API.

Suggestion: Add an explicit type check for PyTupleType the
sys_call_tracing() function

Check 2.6, too

--
nosy: +christian.heimes
priority:  -> release blocker
versions: +Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3661] sys.call_tracing segfaults

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Not applicable in 2.6:

Traceback (most recent call last):
  File "", line 1, in 
TypeError: type() takes 1 or 3 arguments

--
nosy: +benjamin.peterson
versions:  -Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

The FileIO construct segfaults because PyArg_ParseTupleAndKeywords()
sets name to an invalid but non NULL value. PyMem_Free() tries to
deallocate name but fails.

Suggestion: Either appy this patch or change
PyArg_ParseTupleAndKeyword()'s behavior for 'e'.

Index: Modules/_fileio.c
===
--- Modules/_fileio.c   (Revision 66010)
+++ Modules/_fileio.c   (Arbeitskopie)
@@ -174,8 +174,10 @@
if (!PyArg_ParseTupleAndKeywords(args, kwds, "et|si:fileio",
 kwlist,

Py_FileSystemDefaultEncoding,
-&name, &mode, &closefd))
+&name, &mode, &closefd)) {
+   name = NULL;
goto error;
+   }
}
}

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Christian Heimes

Changes by Christian Heimes <[EMAIL PROTECTED]>:


--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3663] Extra DECREF on syntax errors

2008-08-24 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:

The following output is very suspect: the total number of references
decreases!

Python 3.0b3+ (py3k, Aug 24 2008, 21:56:40) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> f(1=1)
  File "", line 1
SyntaxError: keyword can't be an expression
[42055 refs]
>>> f(1=1)
  File "", line 1
SyntaxError: keyword can't be an expression
[42054 refs]
>>> f(1=1)
  File "", line 1
SyntaxError: keyword can't be an expression
[42053 refs]
>>> f(1=1)
  File "", line 1
SyntaxError: keyword can't be an expression
[42052 refs]
>>> f(1=1)
  File "", line 1
SyntaxError: keyword can't be an expression
[42051 refs]
>>> f(1=1)
  File "", line 1
SyntaxError: keyword can't be an expression
[42050 refs]

After several hundred statements, I got:
Fatal Python error: deallocating None

--
messages: 71859
nosy: amaury.forgeotdarc
priority: deferred blocker
severity: normal
status: open
title: Extra DECREF on syntax errors
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3663] Extra DECREF on syntax errors

2008-08-24 Thread Antoine Pitrou

Changes by Antoine Pitrou <[EMAIL PROTECTED]>:


--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-08-24 Thread Daniel Diniz

New submission from Daniel Diniz <[EMAIL PROTECTED]>:

This script segfaults:
##
import _pickle
obj = _pickle.Pickler(open("/bin/ls")) #can be open(__file__) for scripts
try: obj.__init__('pouet', 87)
except Exception as err: pass

obj.dump(0)
###


[Switching to Thread -1210775360 (LWP 19096)]
0xb79fbf91 in pickler_write (self=0xb7a2fe4c, s=0xbff441a1 "...", n=2)
at /home/ajaksu/py3k/Modules/_pickle.c:442
442 memcpy(self->write_buf + self->buf_size, s, n);
(gdb) backtrace
#0  0xb79fbf91 in pickler_write (self=0xb7a2fe4c, s=0xbff441a1 "...",
n=2) at /home/ajaksu/py3k/Modules/_pickle.c:442
#1  0xb7a00a8c in dump (self=0xb7a2fe4c, obj=0x81fbd78) at
/home/ajaksu/py3k/Modules/_pickle.c:2288
#2  0xb7a00bb8 in Pickler_dump (self=0xb7a2fe4c, args=0xb7b30034) at
/home/ajaksu/py3k/Modules/_pickle.c:2328
#3  0x081626b1 in PyCFunction_Call (func=0xb796c3ec, arg=0xb7b30034,
kw=0x0) at Objects/methodobject.c:81
#4  0x080b378f in call_function (pp_stack=0xbff442e4, oparg=1) at
Python/ceval.c:3403
#5  0x080ae8d2 in PyEval_EvalFrameEx (f=0x829bafc, throwflag=0) at
Python/ceval.c:2205
#6  0x080b1c24 in PyEval_EvalCodeEx (co=0xb7acf2c8, globals=0xb7a9a8f4,
locals=0xb7a9a8f4, args=0x0, argcount=0, kws=0x0,
kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at
Python/ceval.c:2840

Found using Fusil.

--
messages: 71860
nosy: ajaksu2
severity: normal
status: open
title: Pickler.dump from a badly initialized Pickler segfaults
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-08-24 Thread Benjamin Peterson

Changes by Benjamin Peterson <[EMAIL PROTECTED]>:


--
assignee:  -> alexandre.vassalotti
nosy: +alexandre.vassalotti
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3665] Support \u and \U escapes in regexes

2008-08-24 Thread Georg Brandl

New submission from Georg Brandl <[EMAIL PROTECTED]>:

Since \u and \U aren't interpolated in raw strings anymore, the re
module should support those escapes in addition to the \x and octal ones
it already does.  Attached patch.

--
components: Library (Lib)
files: re_unicode_escapes.diff
keywords: patch
messages: 71861
nosy: georg.brandl
priority: critical
severity: normal
status: open
title: Support \u and \U escapes in regexes
type: behavior
versions: Python 3.0
Added file: http://bugs.python.org/file11235/re_unicode_escapes.diff

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3666] atexit.register with bad input segfaults on exit

2008-08-24 Thread Daniel Diniz

New submission from Daniel Diniz <[EMAIL PROTECTED]>:

The following crashes the interpreter on exit:

import sys, atexit; atexit.register(lambda: 1, 0, 0, (x for x in (1,2)),
0, 0); sys.exit()

Found with Fusil.

--
messages: 71862
nosy: ajaksu2
severity: normal
status: open
title: atexit.register with bad input segfaults on exit
type: crash
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

pickler_write() has no check for self->write_buf == NULL

Suggested patch:
===
--- Modules/_pickle.c   (Revision 66010)
+++ Modules/_pickle.c   (Arbeitskopie)
@@ -421,6 +421,10 @@
 {
 PyObject *data, *result;

+if (self->write_buf == NULL) {
+PyErr_SetString(PyExc_SystemError, "Invalid write buffer");
+return -1;
+}
 if (s == NULL) {
 if (!(self->buf_size))
 return 0;

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3666] atexit.register with bad input segfaults on exit

2008-08-24 Thread Christian Heimes

Changes by Christian Heimes <[EMAIL PROTECTED]>:


--
priority:  -> release blocker

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3665] Support \u and \U escapes in regexes

2008-08-24 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

- Check that it also works for chars > 0x (even in UCS2 builds, at
least when the chars are not part of [character range])
- What does happen with e.g. [\U0001-\U00010001] on an UCS build?

--
nosy: +pitrou

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3665] Support \u and \U escapes in regexes

2008-08-24 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

(in the last sentence, I meant UCS2. Sorry)

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3666] atexit.register with bad input segfaults on exit

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

I'm getting hundreds of lines

Fatal Python error: PyThreadState_Get: no current thread

The Python process segfaults in call_ll_exitfuncs -> atexit_cleanup() ->
atexit_clear() ->  atexit_delete_cb -> Py_DECREF(cb->args)

--
nosy: +christian.heimes

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3667] Reloading an extension module always leaks

2008-08-24 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:

With python2.6, reloading extension modules does not always leak memory:

Python 2.6b2+ (trunk, Aug 19 2008, 23:45:24) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[34467 refs]
>>> import audioop; del sys.modules['audioop']
[34677 refs]
>>> import audioop; del sys.modules['audioop']
[34677 refs]

But with 3.0, reloading audioop leaks 60 references every time (seen in
test_unittest):

Python 3.0b3+ (py3k, Aug 24 2008, 21:56:40) [MSC v.1500 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[42018 refs]
>>> import audioop; del sys.modules['audioop']
[42257 refs]
>>> import audioop; del sys.modules['audioop']
[42317 refs]
>>> import audioop; del sys.modules['audioop']
[42377 refs]
>>> import audioop; del sys.modules['audioop']
[42437 refs]
>>> import audioop; del sys.modules['audioop']
[42497 refs]

OK, many things cannot be reinitialized for C-written modules (static
variables &co), this is not the case for audioop. Furthermore, I thought
that the new module API was to support proper cleanup of modules

--
messages: 71867
nosy: amaury.forgeotdarc
priority: release blocker
severity: normal
status: open
title: Reloading an extension module always leaks
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3665] Support \u and \U escapes in regexes

2008-08-24 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

These concerns indeed must be handled: On narrow unicode builds, chars >
0x must be converted to surrogates. In ranges, they should raise an
error.

Additionally, this should at least raise an error too:

>>> re.compile("[\U0010]").match("\U0010").group()
'\udbc0'

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3610] Fix gdbinit for Python 3.0

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

I fixed some problems in r66016.  This patch seems like it has other
things which might be useful, so I'll keep it open until it's handled.

--
nosy: +nnorwitz

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3668] "s*" argument parser marker leaks memory

2008-08-24 Thread Amaury Forgeot d'Arc

New submission from Amaury Forgeot d'Arc <[EMAIL PROTECTED]>:

When PyArg_ParseTuple correctly parses a s* format, but raises an
exception afterwards (for a subsequent parameter), the user code will
not call PyBuffer_Release() and memory will leak.
Seen by "regrtest -R:: test_binascii"

For example:
>>> binascii.a2b_qp("", **{1:1})
Traceback (most recent call last):
  File "", line 1, in 
TypeError: keywords must be strings
[42278 refs]
>>> binascii.a2b_qp("", **{1:1})
Traceback (most recent call last):
  File "", line 1, in 
TypeError: keywords must be strings
[42279 refs]
>>> binascii.a2b_qp("", **{1:1})
Traceback (most recent call last):
  File "", line 1, in 
TypeError: keywords must be strings
[42280 refs]


The same pattern was correctly handled by the "et#" type (where the user
has to call PyMem_Free) with the help of a cleanup list (see the
addcleanup() function in getargs.c). (See issue501716)

--
messages: 71870
nosy: amaury.forgeotdarc
priority: release blocker
severity: normal
status: open
title: "s*" argument parser marker leaks memory
versions: Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

This new version of the patch modifies getargs.c and use
PyObject_GetBuffer and PyBuffer_Release in place of the raw bf_getbuffer
and bf_releasebuffer.
Also make sure that each GetBuffer is matched with a ReleaseBuffer
(except for s* and w*, where the calling code is responsible for this)

This seems to correct most of the refleaks mentioned above, except:

- test_unittest leaks 120 refs because the 'audioop' module is
re-imported many times. See issue3667, or the test case should be dropped.

- test_binascii leaks one time because of issue3668.

Added file: http://bugs.python.org/file11236/buffer-leak.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3666] atexit.register with bad input segfaults on exit

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

I was able to trace the error to its apartment. During the cleanup
gen_del calls PyErr_Fetch() which fails in PyThreadState_GET().

Conclusion:
The atexit cleanup method must be called much earlier.
call_ll_exitfunc() is too late. I suggest a new function that calls
atexit_cleanup() right after atexit_callfuncs().

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3139] bytearrays are not thread safe

2008-08-24 Thread Travis Oliphant

Travis Oliphant <[EMAIL PROTECTED]> added the comment:

I'm sorry that I was unavailable for comment during July and August as
it looks like a lot of decisions were made that have changed the
semantics a bit.  I'm still trying to figure out why the decisions were
made that were made.   

I get the impression that most of the problems are related to objects
incorrectly managing their exported buffers, but there may be some
semantic issues related to "t#" that were not conceived of during the
many discussions surrounding the design of PEP 3118.  

I'm not convinced that Py_buffer should have grown a link to an object.
 I think this is a shortcut solution due to misuse of the protocol that
may have unfortunate consequences. 

I'm not sure where PyBuffer_Release came from.  I can't find it in the
PEP and don't remember what it's purpose is.  Did I add it or did
somebody elese?

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc <[EMAIL PROTECTED]> added the comment:

The "goto error" is not necessary here. Nothing has been allocated at
this point, and "return -1" is enough.

Index: Modules/_fileio.c
===
--- Modules/_fileio.c   (revision 65957)
+++ Modules/_fileio.c   (working copy)
@@ -175,7 +175,7 @@
 kwlist,

Py_FileSystemDefaultEncoding,
 &name, &mode, &closefd))
-   goto error;
+   return -1;
}
}

--
keywords: +needs review
nosy: +amaury.forgeotdarc

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3669] sqlite3.Connection.iterdump docs pythonicity

2008-08-24 Thread Robert Lehmann

New submission from Robert Lehmann <[EMAIL PROTECTED]>:

The `sqlite3` docs are a little unpythonic. When using `str.join` on
`Connection.iterdump`, the example in the docs manually unpacks the
generator using a LC. I propose this'd be improved.

Patch attached. Same applies to the py3k docs, it's just a few lines
above there.

--
assignee: georg.brandl
components: Documentation
files: connection-iterdump.patch
keywords: patch
messages: 71875
nosy: georg.brandl, lehmannro
severity: normal
status: open
title: sqlite3.Connection.iterdump docs pythonicity
type: feature request
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11237/connection-iterdump.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

You are right. But I'd rather keep the name = NULL assignment or add a
comment. In the future somebody may alter the function and resurrect the
bug accidentally.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

It won't be resurrected for long if we write a test. :)

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3139] bytearrays are not thread safe

2008-08-24 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Hi Travis,

Glad you're back!

> I'm not convinced that Py_buffer should have grown a link to an object.
> I think this is a shortcut solution due to misuse of the protocol that
> may have unfortunate consequences. 

What consequences are you thinking about?

Specifically, why shouldn't Py_buffer have a link to the object? It's
the best way we've found to be able to release the buffer without having
to keep a link to the originator ourselves. The concern is to simplify
the API for most of its users. Especially, the new format codes ("s*" et
al.) can just fill the Py_buffer rather than return several things at
once.

(please note that link can be NULL if you don't want to have the
associated resource management)

> I'm not sure where PyBuffer_Release came from.  I can't find it in the
> PEP and don't remember what it's purpose is.

It's a replacement for PyObject_ReleaseBuffer(). Since a Py_buffer now
has a link to its originator, there's no need to pass it separately to
the releasing function.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3101] global function _add_one_to_C

2008-08-24 Thread Travis Oliphant

Travis Oliphant <[EMAIL PROTECTED]> added the comment:

I've added comments in the code to document these functions.  I have no
opinion where they live except they should probably be available to
extensions modules. 

These routines increment an N-length counter representing a position in
an N-dimensional array with wrap-around when the counter reaches the
size of the dimension.  Thus, for a (2,3) array we have:

F-version

0,0
1,0
2,0
0,1
1,1
2,1

C-version
0,0
0,1
0,2
1,0
1,1
1,2

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3046] Locking should be removed from the new buffer protocol

2008-08-24 Thread Travis Oliphant

Changes by Travis Oliphant <[EMAIL PROTECTED]>:


--
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2394] [Py3k] Finish the memoryview object implementation

2008-08-24 Thread Travis Oliphant

Travis Oliphant <[EMAIL PROTECTED]> added the comment:

It would have been nice to finish the memoryview object for 3.0, but I
ran into time constraints.  The pieces that are left can be pushed to 3.1

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2394] [Py3k] Finish the memoryview object implementation

2008-08-24 Thread Travis Oliphant

Changes by Travis Oliphant <[EMAIL PROTECTED]>:


--
versions: +Python 3.1 -Python 3.0

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2394] [Py3k] Finish the memoryview object implementation

2008-08-24 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

Great. It would be nice if you could at least do a quick review what has
been committed though.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3132] implement PEP 3118 struct changes

2008-08-24 Thread Travis Oliphant

Travis Oliphant <[EMAIL PROTECTED]> added the comment:

This can be re-targeted to 3.1 as described.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Another PyBuffer_Release(&pin); looks necessary at @@ -805,6 +807,7 @@.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3304] invalid call to PyMem_Free() in fileio_init()

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

In 3.0 the free is necessary, though see http://bugs.python.org/issue3662 .

--
nosy: +nnorwitz
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3670] Reporting bugs - no such sections

2008-08-24 Thread Kent Johnson

New submission from Kent Johnson <[EMAIL PROTECTED]>:

The "Reporting Bugs" section of the Python 2.6b3 docs
http://docs.python.org/dev/bugs.html

says,
please use either the “Add a comment” or the “Suggest a change” features
of the relevant page in the most recent online documentation at
http://docs.python.org/.

I don't see either of these features in the 2.6 docs or the 2.5 docs at
the link.

--
assignee: georg.brandl
components: Documentation
messages: 71885
nosy: georg.brandl, kjohnson
severity: normal
status: open
title: Reporting bugs - no such sections
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2350] Warn against importing 'exceptions'

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I'm not sure how we could implement a warning on import of exceptions
aside from implementing it in the compiler. I suppose 2to3 could just
remove the import...

--
nosy: +benjamin.peterson

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3649] IA5 Encoding should be in the default encodings

2008-08-24 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

I don't think this codec should be named IA-5. IA-5 is specified in
ITU-T Rec. T.50 (International Alphabet No. 5), recently renamed to
"International Reference Alphabet", and it does *not* specify that the
characters 0..31 are printable. Instead, IA5 is identical to ISO 646
(i.e. allowing for national variants), with the International Reference
Version of IA5 (e.g. as used in ASN.1 IA5String) is identical to US-ASCII.

If GSM uses a modified version of this, it should receive a separate
name. If you were looking at section 2 (Structure of EMI messages), what
makes you think that this specification calls the encoding "IA5"? In my
copy, it says:

# Alphanumeric characters are encoded as two numeric IA5 characters,
# the higher 3 bits (0..7) first, the lower 4 bits (0..F) thereafter,
# according to the following table.

So it *uses* IA5 to hex-encode the encoding. To achieve that, one would
have to write

  text.encode("emi-section-2").encode("hex")

[Notice that the "hex" codec already uses IA-5]

In any case, I don't think this is general enough to deserve inclusion
into the standard library. The codec system is designed to be so
flexible to support additional codecs outside the core.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3671] What's New in 2.6 - corrections

2008-08-24 Thread Kent Johnson

New submission from Kent Johnson <[EMAIL PROTECTED]>:

These are minor corrections to the What's New in Python 2.6[b3] doc.

Note: the PEP references are to the headers in What's New, not the
  actual PEPs

- PEP 371: The multiprocessing Package
- "apply() or apply_async, adding a single request, and map() or
  map_async()" All four function names should link to the Pool
  docs. Currently apply and map link to the docs for the builtins
  of the same name; the other two don't link.

- PEP 3101: Advanced String Formatting
- In the first example, "uid = 'root'" is not needed

- PEP 3112: Byte Literals
- In the second example, the value of b should not have a space in
  the middle, i.e. bytearray(b'\xe2\x87\xaf\xe3\x89\x84') instead
  of bytearray(b'\xe2\x87\xaf \xe3\x89\x84')

- Other Language Changes
- next(*iterator*, [*default*]) - the asterisks are not needed
- "letting complex(repr(cmplx)) will now round-trip values" -> so
  complex(repr(cmplx)) will now round-trip values

- Interpreter Changes
- "**encoding** or **encoding**:**errorhandler**" - Are the **
  truly part of the syntax?

- New, Improved, and Deprecated Modules
- heapq.merge() returns a generator; the example should be
  list(heapq.merge([1, 3, 5, 9], [2, 8, 16]))
- All the new itertools functions return iterators, not lists;
  their examples should also be wrapped in list()
- itertools.product([1,2], repeat=3)) <- extra )
- shutil - "ignore_patterns() takes an arbitrary number of
  glob-style patterns and will ignore any files and directories
  that match this pattern." -> ignore_patterns() takes an arbitrary
  number of glob-style patterns and returns a callable which will
  ignore any files and directories that match this pattern.
- The future_builtins module
- I think all the ** are extraneous.

--
assignee: georg.brandl
components: Documentation
messages: 71888
nosy: georg.brandl, kjohnson
severity: normal
status: open
title: What's New in 2.6 - corrections
versions: Python 2.6

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3672] Ill-formed surrogates not treated as errors during encoding/decoding

2008-08-24 Thread Adam Olsen

New submission from Adam Olsen <[EMAIL PROTECTED]>:

The Unicode FAQ makes it quite clear that any surrogates in UTF-8 or
UTF-32 should be treated as errors.  Lone surrogates in UTF-16 should
probably be treated as errors too (but only during encoding/decoding;
unicode objects on UTF-16 builds should allow them to be created through
slicing).

http://unicode.org/faq/utf_bom.html#30
http://unicode.org/faq/utf_bom.html#42
http://unicode.org/faq/utf_bom.html#40

Lone surrogate in UTF-8 (effectively CESU-8):
>>> '\xED\xA0\x81'.decode('utf-8')
u'\ud801'

Surrogate pair in UTF-8:
>>> '\xED\xA0\x81\xED\xB0\x80'.decode('utf-8')
u'\ud801\udc00'

On a UTF-32 build, encoding a surrogate pair with UTF-16, then decoding
again will produce the proper non-surrogate scalar value.  This has
security implications, although rare as characters outside the BMP are rare:
>>> u'\ud801\udc00'.encode('utf-16').decode('utf-16')
u'\U00010400'

Also on a UTF-32 build, decoding of a lone surrogate in UTF-16 fails
(correctly), but encoding one does not:
>>> u'\ud801'.encode('utf-16')
'\xff\xfe\x01\xd8'


I have gotten a report of a user decoding bad data using
x.decode('utf-8', 'replace'), then getting an error from Gtk+ when the
ill-formed surrogates reached it.

Fixing this would cause issue 3297 to blow up loudly, rather than silently.

--
messages: 71889
nosy: Rhamphoryncus
severity: normal
status: open
title: Ill-formed surrogates not treated as errors during encoding/decoding

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3670] Reporting bugs - no such sections

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

Yeah. The comment system hasn't actually been implemented so I removed
the note about that in r66017.

--
nosy: +benjamin.peterson
resolution:  -> accepted
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3672] Ill-formed surrogates not treated as errors during encoding/decoding

2008-08-24 Thread Adam Olsen

Changes by Adam Olsen <[EMAIL PROTECTED]>:


--
components: +Unicode
type:  -> behavior

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2876] Write UserDict fixer for 2to3

2008-08-24 Thread Nick Edds

Nick Edds <[EMAIL PROTECTED]> added the comment:

How soon is this needed by? I probably won't have a chance to do it in
the next week, but it shouldn't take that long to make once I get a
chance to work on it.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3671] What's New in 2.6 - corrections

2008-08-24 Thread Georg Brandl

Changes by Georg Brandl <[EMAIL PROTECTED]>:


--
assignee: georg.brandl -> akuchling
nosy: +akuchling

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3662] _fileio._FileIO segfaults

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Daniel, thanks for running the fuzzer!  It would be great if you could
keep running it and find any more problems before releasing 2.6 and 3.0.

I agree with Benjamin and Amaury.  PyArg_ParseTupleAndKeywords()
shouldn't update the pointer if it failed.  Given the test, it's
unlikely for this to create a problem in the future.  Either as a crash
or as a memory leak.

Committed revision 66018. (2.6)
Committed revision 66019. (3.0)

--
assignee:  -> nnorwitz
components: +Interpreter Core
nosy: +nnorwitz
resolution:  -> fixed
status: open -> closed

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3642] Objects/obmalloc.c:529: warning: comparison is always false due to limited range of data type

2008-08-24 Thread Martin v. Löwis

Martin v. Löwis <[EMAIL PROTECTED]> added the comment:

I think the patch is fairly incomplete. "i" still stays at uint, so if
numarenas would ever overflow uint, the loop would never reach
numarenas, and all arenas would get discarded.

Likewise, maxarenas still stays at uint, so when numarenas overflows
uint, the additional arenas get discarded.

The compiler was right observing that the condition is always false:
this was a security check to prevent overflow, but on this specific
system, overflow couldn't occur in the first place. 

If you want to silence the warning, try casting numarenas to size_t in
the test only. If you want to properly remove the unnecessary test, put
an ifdef around it, testing whether size_t is larger than uint.

With the current code, it might be that you have disabled the security
check: numarenas <= maxarenas will not occur anymore (since numarenas is
wider than maxarenas); as a consequence, you then see the silent
truncation later on instead of the exception.

--
nosy: +loewis

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1375] hotshot IndexError when loading stats

2008-08-24 Thread Neal Norwitz

Changes by Neal Norwitz <[EMAIL PROTECTED]>:


--
type: crash -> behavior

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2456] Make sysmodule.c compatible with Bazaar

2008-08-24 Thread Neal Norwitz

Changes by Neal Norwitz <[EMAIL PROTECTED]>:


--
type: crash -> feature request

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1210] imaplib does not run under Python 3

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Is this still a problem?

--
nosy: +nnorwitz
type: crash -> behavior

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1658] "RuntimeError: dictionary changed size during iteration" in Tkinter

2008-08-24 Thread Neal Norwitz

Changes by Neal Norwitz <[EMAIL PROTECTED]>:


--
type: crash -> behavior

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1840] Tools/i18n/msgfmt.py fixes for Python 3.0

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Is this still a problem?

--
nosy: +nnorwitz
type: crash -> behavior

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2747] Documentation of new gobject types fails

2008-08-24 Thread Neal Norwitz

Changes by Neal Norwitz <[EMAIL PROTECTED]>:


--
type: crash -> behavior

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2562] Cannot use non-ascii letters in disutils if setuptools is used.

2008-08-24 Thread Neal Norwitz

Changes by Neal Norwitz <[EMAIL PROTECTED]>:


--
type: crash -> behavior

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3663] Extra DECREF on syntax errors

2008-08-24 Thread Georg Brandl

Georg Brandl <[EMAIL PROTECTED]> added the comment:

The culprit is Python/pythonrun.c:1245:

tb = tb ? tb : Py_None;

Py_None needs to be INCREF'd in the else case.

--
assignee:  -> pitrou
nosy: +georg.brandl

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1838] Ctypes C-level infinite recursion

2008-08-24 Thread Neal Norwitz

Changes by Neal Norwitz <[EMAIL PROTECTED]>:


--
assignee:  -> theller
components: +ctypes -Extension Modules
nosy: +theller

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3642] Objects/obmalloc.c:529: warning: comparison is always false due to limited range of data type

2008-08-24 Thread Christian Heimes

Christian Heimes <[EMAIL PROTECTED]> added the comment:

Good analysis Martin!

In my humble opinion it should be safe to limit the amount of arenas to
UINT_MAX instead of PY_SIZE_MAX. 4,294,967,295 arenas should be more
than sufficient for the next decade or two. Do you concur?

--
resolution: fixed -> 
status: closed -> open

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3657] pickle can pickle the wrong function

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

The valgrind errors below are possibly related.

Conditional jump or move depends on uninitialised value(s)
   PyUnicodeUCS2_EncodeUTF8 (unicodeobject.c:2216)
   _PyUnicode_AsString (unicodeobject.c:1417)
   save (_pickle.c:930)
   Pickler_dump (_pickle.c:2292)

Conditional jump or move depends on uninitialised value(s)
   PyUnicodeUCS2_EncodeUTF8 (unicodeobject.c:2220)
   _PyUnicode_AsString (unicodeobject.c:1417)
   save (_pickle.c:930)
   Pickler_dump (_pickle.c:2292)

Conditional jump or move depends on uninitialised value(s)
   PyUnicodeUCS2_EncodeUTF8 (unicodeobject.c:2227)
   _PyUnicode_AsString (unicodeobject.c:1417)
   save (_pickle.c:930)
   Pickler_dump (_pickle.c:2292)

Conditional jump or move depends on uninitialised value(s)
   PyUnicodeUCS2_EncodeUTF8 (unicodeobject.c:2229)
   _PyUnicode_AsString (unicodeobject.c:1417)
   save (_pickle.c:930)
   Pickler_dump (_pickle.c:2292)

Conditional jump or move depends on uninitialised value(s)
   PyUnicodeUCS2_EncodeUTF8 (unicodeobject.c:2233)
   _PyUnicode_AsString (unicodeobject.c:1417)
   save (_pickle.c:930)
   Pickler_dump (_pickle.c:2292)

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

With the latest patch (and the one addition PyBuffer_Release() I noted
above), valgrind is happy wrt memory leaks.  The only problem valgrind
found is a read of uninitialized memory.  See
http://bugs.python.org/issue3657 .

I don't know the buffer code to know if this is the correct fix. 
However, it fixes the problems and that's probably good enough for now.
 If you can get someone familiar with the buffer code to review, that
would be great.  If not, this patch should be applied.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Also there should be a Misc/NEWS entry added. Also check the doc to see
it needs updating wrt ownership.

--
type:  -> resource usage

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3651] eval() leaks 1 reference every time

2008-08-24 Thread Antoine Pitrou

Antoine Pitrou <[EMAIL PROTECTED]> added the comment:

> I don't know the buffer code to know if this is the correct fix. 
> However, it fixes the problems and that's probably good enough for now.
>  If you can get someone familiar with the buffer code to review, that
> would be great.

I don't know if I pass as "someone familiar with the buffer code", but
Amaury's patch is ok to me.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2350] Warn against importing 'exceptions'

2008-08-24 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

On Sun, Aug 24, 2008 at 2:51 PM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
>
> Benjamin Peterson <[EMAIL PROTECTED]> added the comment:
>
> I'm not sure how we could implement a warning on import of exceptions
> aside from implementing it in the compiler. I suppose 2to3 could just
> remove the import...
>

... and would also have to change all references. But that would
probably work out fine.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2876] Write UserDict fixer for 2to3

2008-08-24 Thread Brett Cannon

Brett Cannon <[EMAIL PROTECTED]> added the comment:

On Sun, Aug 24, 2008 at 3:00 PM, Nick Edds <[EMAIL PROTECTED]> wrote:
>
> Nick Edds <[EMAIL PROTECTED]> added the comment:
>
> How soon is this needed by? I probably won't have a chance to do it in
> the next week, but it shouldn't take that long to make once I get a
> chance to work on it.
>

rc1 is Sep. 3, with rc3 Sep 17 (at the moment). Hitting either should
be okay, although obviously the sooner the better.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3657] pickle can pickle the wrong function

2008-08-24 Thread Neal Norwitz

Neal Norwitz <[EMAIL PROTECTED]> added the comment:

Indeed.  The problem was an incorrect conversion of str -> unicode,
instead of converting to bytes.  On getting the buffer from unicode, it
tried to read data which was uninitialized.

Hmmm, this fix is for 3.0 only, but the problem is happening in 2.6. 
Leaving open.

Committed revision 66021.

--
assignee:  -> nnorwitz

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3670] Reporting bugs - no such sections

2008-08-24 Thread Kent Johnson

Kent Johnson <[EMAIL PROTECTED]> added the comment:

You should add something like the old "About this document" footer.
AFAICT there is no information in the new docs about how to report a
problem with the docs.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2456] Make sysmodule.c compatible with Bazaar

2008-08-24 Thread Benjamin Peterson

Benjamin Peterson <[EMAIL PROTECTED]> added the comment:

I suggest that this option (when it is implemented) can be a configure
switch.

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3673] bsddb module leaks memory

2008-08-24 Thread Neal Norwitz

New submission from Neal Norwitz <[EMAIL PROTECTED]>:

The attached patch against 2.6 fixes the memory leaks reported against
the bsddb module.  There are still (probably) reference leaks.

Jesus, it would be great if you can look at this before the release.

--
assignee: jcea
components: Extension Modules
files: bsddb.patch
keywords: patch, patch
messages: 71907
nosy: jcea, nnorwitz
priority: critical
severity: normal
status: open
title: bsddb module leaks memory
type: resource usage
versions: Python 2.6, Python 3.0
Added file: http://bugs.python.org/file11238/bsddb.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3674] test_dbm_ndbm skip is unexpected on win32?

2008-08-24 Thread Hirokazu Yamamoto

New submission from Hirokazu Yamamoto <[EMAIL PROTECTED]>:

Currently, I get following messege.

E:\PYTHON~1\py3k\Lib\test>py3k regrtest.py test_dbm_ndbm.py
test_dbm_ndbm
test_dbm_ndbm skipped -- No module named _dbm
1 test skipped:
test_dbm_ndbm
1 skip unexpected on win32:
test_dbm_ndbm

I don't know about dbm, but win32 buildbots are skiping this test, maybe
is this skip expected?

--
components: Tests
files: regrtest.patch
keywords: patch
messages: 71908
nosy: ocean-city
severity: normal
status: open
title: test_dbm_ndbm skip is unexpected on win32?
versions: Python 3.0
Added file: http://bugs.python.org/file11239/regrtest.patch

___
Python tracker <[EMAIL PROTECTED]>

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >