[ python-Bugs-1370322 ] Float marshaling problems with test_colorsys

2005-12-11 Thread SourceForge.net
Bugs item #1370322, was opened at 2005-11-30 11:49
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1370322&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 7
Submitted By: Reinhold Birkenfeld (birkenfeld)
Assigned to: Michael Hudson (mwh)
Summary: Float marshaling problems with test_colorsys

Initial Comment:
Starting point: "make clean; make" in the 2.5 source tree.

"make test" hangs at test_colorsys.

Careful investigation shows that when the bytecode is
freshly generated
by "make all" (precisely in test___all__) the .pyc file
is different from what a
direct call to "regrtest.py test_colorsys" produces.

Curiously, a call to "regrtest.py test___all__" instead
of "make test" produces
the correct bytecode.

System is Linux 2.6, x86, gcc 3.4.4.

I have attached both versions of colorsys.pyc.

--

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-12-11 12:05

Message:
Logged In: YES 
user_id=33168

I can't reproduce (make test) on linux 2.6, gcc 3.4.4, only
diff is amd64.  I have some outstanding changes, but none
that should affect the outcome.  Sorry, I don't know what to
tell you, can you try to debug any more?  Maybe run under
valgrind (or other memory debugger) and see if there's a
memory issue.

--

Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-12-10 09:05

Message:
Logged In: YES 
user_id=1188172

Yep, after "make distclean" and even a fresh checkout the
problem is there. I configured with and without
"--with-pydebug".

Okay, Michael, you are rehabilitated: I restored
floatobject.c to the state before your patch, and it behaves
the same.

--

Comment By: Michael Hudson (mwh)
Date: 2005-12-10 05:42

Message:
Logged In: YES 
user_id=6656

Umpf.  I suppose the one remaining thing is you say you use "make clean".  This 
makes me very faintly suspicious that "make clean" doesn't really clean 
everything... could you maybe try a clean checkout?  Clutching at straws here, 
obviously.

--

Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-12-10 05:35

Message:
Logged In: YES 
user_id=1188172

Yes, it is reproducable. If it's local to me, I don't know
what could be causing it.
I have a SVN tree without local changes on my local box and
my laptop, and both of them show the same bug.

I'll boot into some CD Linux later and see if the other
environment makes it vanish.

--

Comment By: Michael Hudson (mwh)
Date: 2005-12-10 03:47

Message:
Logged In: YES 
user_id=6656

Also, is the problem reproducable on *your* system?  AFAIK, noone else has 
reproduced it, but I don't know how many people are actually running make test 
on development Python these days...

--

Comment By: Michael Hudson (mwh)
Date: 2005-12-10 03:43

Message:
Logged In: YES 
user_id=6656

I don't think so, no.  For a start, I can't reproduce the problem (mind you, I 
only 
use a Mac regularly these days).

--

Comment By: Reinhold Birkenfeld (birkenfeld)
Date: 2005-12-10 03:07

Message:
Logged In: YES 
user_id=1188172

Michael, you lately corrected a problem with floatobject.
Although the problem persists here, could it be caused by a
similar bug?

--

Comment By: Armin Rigo (arigo)
Date: 2005-12-01 02:32

Message:
Logged In: YES 
user_id=4771

It's again a problem with floats.  For example, the constant 0.3 in rgb_to_yiq 
shows up as 0.0 in bad.pyc.  The constant 1.72986 shows up as 1.0.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1370322&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1370197 ] memory leak - ast_error_finish

2005-12-11 Thread SourceForge.net
Bugs item #1370197, was opened at 2005-11-30 08:41
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1370197&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: AST
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Jim Jewett (jimjjewett)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: memory leak - ast_error_finish

Initial Comment:
http://svn.python.org/view/python/trunk/Python/ast.c?
rev=41486&view=markup

function ast_error_finish

It first gets the errstr, for a possible early out.
If there is an error string, it is increfed, but it is 
not decrefed on the other early outs.  (lineno==-1 and 
failure to build a tmp.


"""
Py_INCREF(errstr);
lineno = PyInt_AsLong(PyTuple_GetItem(value, 1));
if (lineno == -1)
return;
Py_DECREF(value);

loc = PyErr_ProgramText(filename, lineno);
if (!loc) {
Py_INCREF(Py_None);
loc = Py_None;
}
tmp = Py_BuildValue("(ziOO)", filename, lineno, 
Py_None, loc);
Py_DECREF(loc);
if (!tmp)
return;
value = Py_BuildValue("(OO)", errstr, tmp);
Py_DECREF(errstr);
"""




--

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-12-11 12:09

Message:
Logged In: YES 
user_id=33168

You are correct.  I thought I had tested, but test_grammar
failed with my removal.  I added the DECREFs.

Committed revision 41641.

Thanks for tracking this down.


--

Comment By: Jim Jewett (jimjjewett)
Date: 2005-12-02 11:14

Message:
Logged In: YES 
user_id=764593

No, though it took me a *long* time to see why, because the 
&value pointer is reused.

As best I understand it, PyErr_Fetch may leave (the initial 
value of) value with the only reference to errstr.

There is a Py_DECREF(value) after successfully retrieving a 
line number, but before using errstr to build the (new value 
of) value for PyErr_Restore.


--

Comment By: Neal Norwitz (nnorwitz)
Date: 2005-12-01 21:22

Message:
Logged In: YES 
user_id=33168

ISTM that we don't need the INCREF or DECREF for errstr.  Do
you agree?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1370197&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1377897 ] Bus error in ast

2005-12-11 Thread SourceForge.net
Bugs item #1377897, was opened at 2005-12-10 15:26
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1377897&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Skip Montanaro (montanaro)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: Bus error in ast

Initial Comment:
Today I got a bus error trying to install the latest version of setuptools
from the sandox after a fresh svn up of both and install of Python
from the trunk on my Mac ()SX 10.3.9).  Running under gdb it
croaked at line 3033 of ast.c.  Here's the backtrace:

#0  ast_for_stmt (c=0xbfffda40, n=0x53d1b0) at ../Python/ast.c:3033
#1  0x00088060 in ast_for_suite (c=0xbfffda40, n=0x574e30) at ../
Python/ast.c:2561
#2  0x000890cc in ast_for_funcdef (c=0xbfffda40, n=0x3bcf50) at ../
Python/ast.c:896
#3  0x00088014 in ast_for_suite (c=0xbfffda40, n=0x574d18) at ../
Python/ast.c:2551
#4  0x0008b14c in ast_for_classdef (c=0xbfffda40, n=0x3bc9c8) at ../
Python/ast.c:2975
#5  0x00086a5c in PyAST_FromNode (n=0x3c28c0, flags=0x0, 
filename=0x1048d9c "build/bdist.darwin-7.9.0-Power_Macintosh/
egg/setuptools/tests/test_resources.py") at ../Python/ast.c:297
#6  0xd98c in Py_CompileStringFlags (str=0xbfffda40 "", 
filename=0x1048d9c "build/bdist.darwin-7.9.0-Power_Macintosh/
egg/setuptools/tests/test_resources.py", start=557152, 
flags=0xbfffdb5c) at ../Python/pythonrun.c:1275
#7  0x000a4eac in builtin_compile (self=0xbfffda40, args=0x0) at ../
Python/bltinmodule.c:457
#8  0x0007e154 in call_function (pp_stack=0xbfffdc3c, oparg=0) at ../
Python/ceval.c:3565
#9  0x0007bcb4 in PyEval_EvalFrameEx (f=0x842a10, throw=131) at 
../Python/ceval.c:2181
#10 0x0007cd68 in PyEval_EvalCodeEx (co=0x842b98, globals=0x0, 
locals=0xb622c, args=0x842b5c, argcount=4194752, kws=0x0, 
kwcount=498148, defs=0x0, defcount=3, closure=0x0) at ../Python/
ceval.c:2739
#11 0x0007e438 in fast_function (func=0xbfffda40, pp_stack=0x3, 
n=8661852, na=5245749, nk=213) at ../Python/ceval.c:3658
#12 0x0007e22c in call_function (pp_stack=0xbfffde8c, oparg=0) at 
../Python/ceval.c:3586
#13 0x0007bcb4 in PyEval_EvalFrameEx (f=0x850410, throw=131) at 
../Python/ceval.c:2181
#14 0x0007cd68 in PyEval_EvalCodeEx (co=0x8505bc, globals=0x0, 
locals=0xb622c, args=0x85055c, argcount=4194752, kws=0x0, 
kwcount=498148, defs=0x0, defcount=7, closure=0x0) at ../Python/
ceval.c:2739
#15 0x0007e438 in fast_function (func=0xbfffda40, pp_stack=0x3, 
n=8717660, na=5245749, nk=213) at ../Python/ceval.c:3658
#16 0x0007e22c in call_function (pp_stack=0xbfffe0dc, oparg=0) at 
../Python/ceval.c:3586
#17 0x0007bcb4 in PyEval_EvalFrameEx (f=0x837010, throw=131) at 
../Python/ceval.c:2181
#18 0x0007e3a8 in fast_function (func=0xbfffda40, pp_stack=0x401, 
n=8614236, na=5245749, nk=213) at ../Python/ceval.c:3647
#19 0x0007e22c in call_function (pp_stack=0xbfffe28c, oparg=0) at 
../Python/ceval.c:3586
#20 0x0007bcb4 in PyEval_EvalFrameEx (f=0x859610, throw=131) at 
../Python/ceval.c:2181
#21 0x0007e3a8 in fast_function (func=0xbfffda40, pp_stack=0x1, 
n=8755036, na=5245749, nk=213) at ../Python/ceval.c:3647
#22 0x0007e22c in call_function (pp_stack=0xbfffe43c, oparg=0) at 
../Python/ceval.c:3586
#23 0x0007bcb4 in PyEval_EvalFrameEx (f=0x861e10, throw=131) at 
../Python/ceval.c:2181
#24 0x0007e3a8 in fast_function (func=0xbfffda40, pp_stack=0x0, 
n=8789852, na=5245749, nk=213) at ../Python/ceval.c:3647
#25 0x0007e22c in call_function (pp_stack=0xbfffe5ec, oparg=0) at 
../Python/ceval.c:3586
#26 0x0007bcb4 in PyEval_EvalFrameEx (f=0x849810, throw=131) at 
../Python/ceval.c:2181
#27 0x0007e3a8 in fast_function (func=0xbfffda40, pp_stack=0x1, 
n=8690012, na=5245749, nk=213) at ../Python/ceval.c:3647
#28 0x0007e22c in call_function (pp_stack=0xbfffe79c, oparg=0) at 
../Python/ceval.c:3586
#29 0x0007bcb4 in PyEval_EvalFrameEx (f=0x860610, throw=131) at 
../Python/ceval.c:2181
#30 0x0007cd68 in PyEval_EvalCodeEx (co=0x860778, globals=0x0, 
locals=0xb622c, args=0x86075c, argcount=4194752, kws=0x0, 
kwcount=498148, defs=0x0, defcount=0, closure=0x0) at ../Python/
ceval.c:2739
#31 0x0007e438 in fast_function (func=0xbfffda40, pp_stack=0x1, 
n=8783708, na=5245749, nk=213) at ../Python/ceval.c:3658
#32 0x0007e22c in call_function (pp_stack=0xbfffe9ec, oparg=0) at 
../Python/ceval.c:3586
#33 0x0007bcb4 in PyEval_EvalFrameEx (f=0x40dc40, throw=131) at 
../Python/ceval.c:2181
#34 0x0007e3a8 in fast_function (func=0xbfffda40, pp_stack=0x101, 
n=4251020, na=5245749, nk=213) at ../Python/ceval.c:3647
#35 0x0007e22c in call_function (pp_stack=0xbfffeb9c, oparg=0) at 
../Python/ceval.c:3586
#36 0x0007bcb4 in PyEval_EvalFrameEx (f=0x42a500, throw=131) at 
../Python/ceval.c:2181
#37 0x0007e3a8 in fast_function (func=

[ python-Bugs-1376775 ] Memory leak in the email package

2005-12-11 Thread SourceForge.net
Bugs item #1376775, was opened at 2005-12-08 17:03
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1376775&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: ken668 (ken668)
Assigned to: Nobody/Anonymous (nobody)
Summary: Memory leak in the email package

Initial Comment:
memory leak in email.message_from_string. This is what
I did to create a leak.

You used the attached file, memleak.eml.

f = open("memleak.eml")
buffer = f.read()
f.close()

# now buffer has the email string
msg = email.message_from_string(buffer)
msg = None # this should free the memory but it doesn't

# The memory that is used in msg is not completely free


--

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-12-11 12:13

Message:
Logged In: YES 
user_id=33168

What causes you to believe this is a memory leak?  I ran
this under valgrind and it doesn't report any leaks.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1376775&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1376400 ] test_struct crashed, py2.3.5, solaris 10

2005-12-11 Thread SourceForge.net
Bugs item #1376400, was opened at 2005-12-08 08:06
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1376400&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: rrogans (rrogans)
Assigned to: Nobody/Anonymous (nobody)
Summary: test_struct crashed, py2.3.5, solaris 10

Initial Comment:
Hi,

I am building python 2.3.5 on solaris 10 using gcc 
3.3.2. Run I perform the test I get one test failure - 
test_struct crashes.

Rgds,

Richard



trying std qQ on 1471797217424382203 == 
0x146CDFC575FD18FBL
trying std qQ on 1471797217424382204 == 
0x146CDFC575FD18FCL
trying std qQ on 1471797217424382205 == 
0x146CDFC575FD18FDL
test test_struct crashed -- exceptions.OverflowError: 
math range error
Traceback (most recent call last):
  File "./Lib/test/regrtest.py", line 394, in runtest
the_package = __import__(abstest, globals(), locals
(), [])
  File "/home/richardr/app/Python-
2.3.5/Lib/test/test_struct.py", line 439, in ?
test_705836()
  File "/home/richardr/app/Python-
2.3.5/Lib/test/test_struct.py", line 424, in 
test_705836
big = math.ldexp(big, 127 - 23)
OverflowError: math range error
1 test failed:
test_struct

<<<

--

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-12-11 12:15

Message:
Logged In: YES 
user_id=33168

Could you try disabling optimization and rebuilding python?
 Also, depending on which compiler you are using, ensure
that you are using strict math.  Sometimes the option is
-ieee I think.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1376400&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1378305 ] Import value 1e400 from pyc fails

2005-12-11 Thread SourceForge.net
Bugs item #1378305, was opened at 2005-12-11 21:09
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378305&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Guenter Jantzen (gjantzen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Import value 1e400  from pyc fails

Initial Comment:
---
#file: bug.py
#sys.version_info (2, 4, 2, 'final', 0)
#Platform is Windows XP

import sys, bug
infinity = 1e400

if __name__ == "__main__":
import bug
print "Infinity is", bug.infinity

--

This code behaves correct using bug.py - when bug.pyc
is not up to date / not exists:

 Infinity is 1.#INF

and behaves wrong using bug.pyc - when bug.pyc is up to
date:

 Infinity is 1.0



--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378305&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1373150 ] diffs in working copy after a build

2005-12-11 Thread SourceForge.net
Bugs item #1373150, was opened at 2005-12-04 16:00
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1373150&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Michael Hudson (mwh)
>Assigned to: Neal Norwitz (nnorwitz)
Summary: diffs in working copy after a build

Initial Comment:
I habitually build python in a subdirectory of the checkout directory (cd 
build; ../configure; make).  After I do this, "svn diff" says this:

Index: Include/Python-ast.h
=
==
--- Include/Python-ast.h(revision 41584)
+++ Include/Python-ast.h(working copy)
@@ -1,4 +1,4 @@
-/* File automatically generated by ./Parser/asdl_c.py */
+/* File automatically generated by ../Parser/asdl_c.py */
 
 #include "asdl.h"
 
Index: Python/Python-ast.c
=
==
--- Python/Python-ast.c (revision 41584)
+++ Python/Python-ast.c (working copy)
@@ -1,4 +1,4 @@
-/* File automatically generated by ./Parser/asdl_c.py */
+/* File automatically generated by ../Parser/asdl_c.py */
 
 #include "Python.h"
 #include "Python-ast.h"

which is kind of annoying.  "File automatically generated by asdl_c.py" 
would probably do fine for me.

--

>Comment By: Neal Norwitz (nnorwitz)
Date: 2005-12-11 13:18

Message:
Logged In: YES 
user_id=33168

I always wondered how Jeremy and I conflicted.  This bugged
me too, so it's fixed now.  Parser/asdl_c.py is what it says
(ie .../ is stripped).

Committed revision 41644.


--

Comment By: Michael Hudson (mwh)
Date: 2005-12-04 17:17

Message:
Logged In: YES 
user_id=6656

Yes, whatever gets rid of the Ms in my wc :)

--

Comment By: Brett Cannon (bcannon)
Date: 2005-12-04 16:26

Message:
Logged In: YES 
user_id=357491

Would changing the path to say /Parser/asdl_c.py work for you?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1373150&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1378455 ] a problem of urllib using open_local_file

2005-12-11 Thread SourceForge.net
Bugs item #1378455, was opened at 2005-12-12 11:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378455&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Windows
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Weongyo Jeong (weongyo)
Assigned to: Nobody/Anonymous (nobody)
Summary: a problem of urllib using open_local_file

Initial Comment:
Hello. I'm sorry for my short english.

I'm using python 2.4 on my windows system.  But I have
a problem.  see below:

>3->3---
Traceback (most recent call last):
  File "main.py", line 57, in uploadproc
UNNAMED_toplev.main (self.liststore.get_value
(iter, i))
  File "C:\Work\unnamed\UNNAMED_toplev.py", line 59, in
main
toplev_main (doc, TARGET_FILE)
  File "C:\Work\unnamed\UNNAMED_toplev.py", line 51, in
toplev_main
doc.documentElement.appendChild
(UNNAMED_filehash.GetSHA1Info (doc, filepath
))
  File "C:\Work\unnamed\UNNAMED_filehash.py", line 19,
in GetSHA1Info
file = urllib.urlopen (filepath)
  File "C:\Python24\lib\urllib.py", line 77, in urlopen
return opener.open(url)
  File "C:\Python24\lib\urllib.py", line 185, in open
return getattr(self, name)(url)
  File "C:\Python24\lib\urllib.py", line 421, in open_file
return self.open_local_file(url)
  File "C:\Python24\lib\urllib.py", line 435, in
open_local_file
raise IOError(e.errno, e.strerror, e.filename)
IOError: [Errno 2] No such file or directory:
'\C:\pse_signature.psr'
>3->3---

i made a simple GUI program with pygtk and do drag and
drop a file from windows file explorer. It printed
"file:///C:/pse_signature.psr" which is a type of
"text/uri-list".  But urllib can't process it.

Is it a problem of urllib?  I read a article which
reported a same problem with my case in python 2.2.

that "file:///C:/pse_signature.psr" string made by
windows. not me.

why this problem don't be fixed? are there any reasons?

thanks for reading.


--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1378455&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com