From chrisw@nipltd.com Tue Aug 1 23:46:15 2000
From: chrisw@nipltd.com (chrisw@nipltd.com)
Date: Tue, 1 Aug 2000 18:46:15 -0400 (EDT)
Subject: [Python-bugs-list] Missing , not picked up by parser (PR#423)
Message-ID: <20000801224615.149041D3AD@dinsdale.python.org>
Full_Name: Chris Withers
Version: 1.5.2
OS: WinNT/Linux
Submission from: zuul.nipltd.com (194.193.44.21)
I have something equivalent to this in my code:
mylist = ['x','y'
'z']
(the real code has much longer contents, hence the line break ;-)
I think this should throw a parse error 'cos there's a missing comma.
What actually happens is it ends up as:
mylist = ['x','yz']
which is _really_ non-intuitive. I spent a good few hours trying to find the
source
of an exception in the Squishdot product for Zope until I noticed this.
I note that:
mystring = 'x''y'
is also legal, which I suspect is the roundabout source of this problem.
Sure that should raise an error and only the following should give the result
that that does:
mystring = 'x'+'y'
cheers,
Chris
From tim_one@email.msn.com Wed Aug 2 00:10:41 2000
From: tim_one@email.msn.com (Tim Peters)
Date: Tue, 1 Aug 2000 19:10:41 -0400
Subject: [Python-bugs-list] Missing , not picked up by parser (PR#423)
In-Reply-To: <20000801224615.149041D3AD@dinsdale.python.org>
Message-ID:
Sorry, but this is a documented feature: just as in C, adjacent string
literals are concatenated at compile-time. You bumped up against the Dark
Side of that. The Bright Side is, e.g.,
logfile.write("And here I need to write something "
"to a log file that spills over a line "
"of source code but I want it want to "
"appear in the log as one line."
"\n")
It can't be made an error, as lots of code relies on it now.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of chrisw@nipltd.com
> Sent: Tuesday, August 01, 2000 6:46 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] Missing , not picked up by parser (PR#423)
>
>
> Full_Name: Chris Withers
> Version: 1.5.2
> OS: WinNT/Linux
> Submission from: zuul.nipltd.com (194.193.44.21)
>
>
> I have something equivalent to this in my code:
>
> mylist = ['x','y'
> 'z']
>
> (the real code has much longer contents, hence the line break ;-)
>
> I think this should throw a parse error 'cos there's a missing comma.
>
> What actually happens is it ends up as:
>
> mylist = ['x','yz']
>
> which is _really_ non-intuitive. I spent a good few hours trying
> to find the
> source
> of an exception in the Squishdot product for Zope until I noticed this.
>
> I note that:
> mystring = 'x''y'
> is also legal, which I suspect is the roundabout source of this problem.
>
> Sure that should raise an error and only the following should
> give the result
> that that does:
> mystring = 'x'+'y'
>
> cheers,
>
> Chris
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
From tim_one@email.msn.com Wed Aug 2 00:11:22 2000
From: tim_one@email.msn.com (tim_one@email.msn.com)
Date: Tue, 1 Aug 2000 19:11:22 -0400 (EDT)
Subject: [Python-bugs-list] Missing , not picked up by parser (PR#423)
Message-ID: <20000801231122.D2C771D289@dinsdale.python.org>
Sorry, but this is a documented feature: just as in C, adjacent string
literals are concatenated at compile-time. You bumped up against the Dark
Side of that. The Bright Side is, e.g.,
logfile.write("And here I need to write something "
"to a log file that spills over a line "
"of source code but I want it want to "
"appear in the log as one line."
"\n")
It can't be made an error, as lots of code relies on it now.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of chrisw@nipltd.com
> Sent: Tuesday, August 01, 2000 6:46 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] Missing , not picked up by parser (PR#423)
>
>
> Full_Name: Chris Withers
> Version: 1.5.2
> OS: WinNT/Linux
> Submission from: zuul.nipltd.com (194.193.44.21)
>
>
> I have something equivalent to this in my code:
>
> mylist = ['x','y'
> 'z']
>
> (the real code has much longer contents, hence the line break ;-)
>
> I think this should throw a parse error 'cos there's a missing comma.
>
> What actually happens is it ends up as:
>
> mylist = ['x','yz']
>
> which is _really_ non-intuitive. I spent a good few hours trying
> to find the
> source
> of an exception in the Squishdot product for Zope until I noticed this.
>
> I note that:
> mystring = 'x''y'
> is also legal, which I suspect is the roundabout source of this problem.
>
> Sure that should raise an error and only the following should
> give the result
> that that does:
> mystring = 'x'+'y'
>
> cheers,
>
> Chris
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
From noreply@sourceforge.net Thu Aug 3 04:13:38 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 2 Aug 2000 20:13:38 -0700
Subject: [Python-bugs-list] [Bug #110671] Tk-based widgets misbehave with dead keys (PR#376)
Message-ID: <200008030313.UAA04788@bush.i.sourceforge.net>
Bug #110671, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Tk-based widgets misbehave with dead keys (PR#376)
Details: Jitterbug-Id: 376
Submitted-By: fstajano@uk.research.att.com
Date: Thu, 29 Jun 2000 12:49:44 -0400 (EDT)
Version: 1.6a2
OS: Windows 98 and 2000
This is a problem of the underlying widget set and not of Idle itself, but Idle
is where I encountered it (I normally use Emacs), and since Python 1.6 is the
unicode version I suppose it's worth looking into anyway (what good is it to
have international chars if you can't input them ;-)).
If, on Windows, you use a keyboard layout with dead keys, such as "United States
- International", then Idle does not respond properly to dead keys. In
particular, double-quote comes out as single-quote; single-quote comes out as
space; and accented characters come out as non-accented.
The lack of support for the accented chars is a minor nuisance, but the problems
with quotes are a major one -- Idle is almost unusable under these
circumstances. Not as bad as Pythonwin, though, which just crashes.
[As you will know, the US-I keyboard defines things like single-quote and
double-quote as dead keys so that one can produce accents and umlauts
respectively by following the dead key with the appropriate vowel. To produce a
double-quote on its own, you have to press double-quote followed by space.]
====================================================================
Audit trail:
Tue Jul 11 08:24:21 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110671&group_id=5470
From noreply@sourceforge.net Thu Aug 3 07:10:47 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 2 Aug 2000 23:10:47 -0700
Subject: [Python-bugs-list] [Bug #110613] makesetup support for RPATH (PR#202)
Message-ID: <200008030610.XAA03098@delerium.i.sourceforge.net>
Bug #110613, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: makesetup support for RPATH (PR#202)
Details: Jitterbug-Id: 202
Submitted-By: aa8vb@yahoo.com
Date: Fri, 11 Feb 2000 07:12:28 -0500 (EST)
Version: 1.5.2
OS: IRIX 6.5
Recently tried to rebuild Python, adding in gdbm. This Setup line is
new for this build:
gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib32 -rpath
/usr/local/lib32 -lgdbm
The problem is, 1.5.2's makesetup doesn't take RPATH directives, reporting
-rpath as a "bad word". Note that RPATH directives take different forms
on different OSs: -rpath on SGI IRIX is -R on Solaris, --rpath on FreeBSD,
etc.
A provision should be made for RPATH options as they are used to avoid the
need for LD_LIBRARY_PATH hacks.
--- Makefiles ---
bad word -rpath in gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib32
-rpath /usr/local/lib32 -lgdbm
*** Error code 1
Thanks,
Randall
====================================================================
Audit trail:
Wed Feb 23 21:30:21 2000 guido changed notes
Wed Feb 23 21:30:21 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-02 23:10
By: fdrake
Comment:
The current CVS version of makesetup appears to handle -rpath and -R, but not --rpath. Is neither of the alternatives sufficient for FreeBSD?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110613&group_id=5470
From Marc.Haesen@lhs.be Thu Aug 3 12:37:07 2000
From: Marc.Haesen@lhs.be (Marc.Haesen@lhs.be)
Date: Thu, 3 Aug 2000 07:37:07 -0400 (EDT)
Subject: [Python-bugs-list] Memory leackage in PyArg_ParseTupleAndKeywords (PR#424)
Message-ID: <20000803113707.1CF9D1CD16@dinsdale.python.org>
Full_Name: Marc Haesen
Version: 1.5.2
OS:
Submission from: uu194-7-57-204.unknown.uunet.be (194.7.57.204)
On line 953 of the file getargs.c a call is made to the PyMapping_GetItemString
routine wich returns a new reference. This new reference however is not
decremented afterwards, resulting in a memory leack.
From noreply@sourceforge.net Thu Aug 3 13:17:02 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 05:17:02 -0700
Subject: [Python-bugs-list] [Bug #110663] getpass() echo password input (PR#359)
Message-ID: <200008031217.FAA20617@bush.i.sourceforge.net>
Bug #110663, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Closed
Resolution: Wont Fix
Bug Group: Platform-specific
Priority: 2
Summary: getpass() echo password input (PR#359)
Details: Jitterbug-Id: 359
Submitted-By: harishbk@inf.com
Date: Fri, 16 Jun 2000 03:46:58 -0400 (EDT)
Version: 1.5.2
OS: OSF1 version 4.0f
code:
#! /usr/local/bin/python
import getpass
pas=getpass.getpass()
when it is run
password : harish
it is echoing password input. How can we avoid echoing it.
====================================================================
Audit trail:
Tue Jul 11 08:26:01 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "M.-A. Lemburg"
Subject: Re: [Python-bugs-list] getpass() echo password input (PR#359)
Date: Fri, 16 Jun 2000 10:03:55 +0200
harishbk@inf.com wrote:
>
> Full_Name: harish
> Version: 1.5.2
> OS: OSF1 version 4.0f
> Submission from: (NULL) (202.54.39.82)
>
> code:
>
> #! /usr/local/bin/python
>
> import getpass
> pas=getpass.getpass()
>
> when it is run
> password : harish
>
> it is echoing password input. How can we avoid echoing it.
You will need to compile Python with termios support enabled
to have getpass() turn off echoing. (Edit Modules/Setup and
rerun 'make install'.)
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110663&group_id=5470
From noreply@sourceforge.net Thu Aug 3 13:18:33 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 05:18:33 -0700
Subject: [Python-bugs-list] [Bug #110661] cgi parsing of query strings (PR#356)
Message-ID: <200008031218.FAA14039@delerium.i.sourceforge.net>
Bug #110661, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 3
Summary: cgi parsing of query strings (PR#356)
Details: Jitterbug-Id: 356
Submitted-By: mredar@yahoo.com
Date: Tue, 13 Jun 2000 16:05:59 -0400 (EDT)
Version: 1.5.2
OS: linux
I am currently starting to use the cgi module for python. In general it's quite
nice, I love
the builtin "test" function--very handy.
I do have a quibble with the handling of query strings by the parser. In the
HTML 4 specification, appendix B
it is stated:
B.2.2 Ampersands in URI attribute values
The URI that is constructed when a form is submitted may be used as
an anchor-style link (e.g., the href attribute for the A element).
Unfortunately, the use of
the "&" character to separate form fields interacts with its use in
SGML attribute values to delimit character entity references. For example, to
use the URI
"http://host/?x=1&y=2" as a linking URI, it must be written or .
We recommend that HTTP server implementors, and in particular, CGI
implementors support the use of ";" in place of "&" to save authors the trouble
of escaping
"&" characters in this manner.
The recommended handling of ';' as field delimiters is not implemented in this
module.
Do you have any plans to implement this feature?
My current company is going to use
the ';' separator and it works with other cgi packages (perl & java servlets).
I'd
love to use python, but this is a stumbling block.
Thanks,
Mark
====================================================================
Audit trail:
Tue Jul 11 08:26:00 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110661&group_id=5470
From noreply@sourceforge.net Thu Aug 3 13:20:56 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 05:20:56 -0700
Subject: [Python-bugs-list] [Bug #110658] W2k and pyton 1.5 (PR#353)
Message-ID: <200008031220.FAA20775@bush.i.sourceforge.net>
Bug #110658, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Fixed
Bug Group: Not a Bug
Priority: 3
Summary: W2k and pyton 1.5 (PR#353)
Details: Jitterbug-Id: 353
Submitted-By: giusedia@libero.it
Date: Sun, 11 Jun 2000 18:19:32 -0400 (EDT)
Version: 1.5
OS: W2k
When installing pyton 1.5 in my w2k, i noticed an error message when starting
IDLE(Pyton gui)as admin.The error was some dll not found, tk80.dll and
tcl80.dll, in the c:\programmi\python\dlls dir. The program then continued
normally.
I fixed it copying them there and now starts normally. But IDLE(Pyton gui)keeps
not starting at all while in user mode.Bye
====================================================================
Audit trail:
Tue Jul 11 08:25:59 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-03 05:20
By: twouters
Comment:
This problem is not specific to Windows 2000. For Python 1.5.2 and earlier, you need to install Tcl/Tk yourself, before installing Python. Just as the install instructions tells you to. This will be 'fixed' in 1.6 and later, which include a Tcl/Tk installer.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110658&group_id=5470
From noreply@sourceforge.net Thu Aug 3 13:43:51 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 05:43:51 -0700
Subject: [Python-bugs-list] [Bug #110624] float("1.0e-309") inconsistency on win32 (PR#245)
Message-ID: <200008031243.FAA21534@bush.i.sourceforge.net>
Bug #110624, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: Remind
Bug Group: None
Priority: 4
Summary: float("1.0e-309") inconsistency on win32 (PR#245)
Details: Jitterbug-Id: 245
Submitted-By: sde@recombinant.demon.co.uk
Date: Wed, 22 Mar 2000 16:13:26 -0500 (EST)
Version: 1.5.2
OS: win32
#! /usr/bin/python
# Inconsistent behaviour.
# Python 1.5.2 win32 fails the second print (why not both?)
# other versions print both expressions
# Ok Python 1.5.2 on SuSE Linux 6.3
# Ok JPython 1.1 on java1.1.7B
# Partial failure Python 1.5.2 win32
print eval("float(1.0e-309)")
print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
====================================================================
Audit trail:
Fri Mar 24 16:42:36 2000 guido changed notes
Fri Mar 24 16:42:36 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Thu, 23 Mar 2000 01:43:30 -0500
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> sde@recombinant.demon.co.uk
> Sent: Wednesday, March 22, 2000 4:13 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] float("1.0e-309") inconsistency on win32
> (PR#245)
>
>
> Full_Name: Stephen D Evans
> Version: 1.5.2
> OS: win32
> Submission from: recombinant.demon.co.uk (212.229.73.7)
>
>
> #! /usr/bin/python
>
> # Inconsistent behaviour.
>
> # Python 1.5.2 win32 fails the second print (why not both?)
> # other versions print both expressions
>
> # Ok Python 1.5.2 on SuSE Linux 6.3
> # Ok JPython 1.1 on java1.1.7B
> # Partial failure Python 1.5.2 win32
>
> print eval("float(1.0e-309)")
> print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
First note that these don't do the same thing: the first passes a float to
"float", the second passes a string to "float". Change the first to
print eval("float('1.0e-309')")
and it gives the same bogus error as the second one.
Then it turns out the error is Microsoft's fault. This tiny C program shows
the bug:
#include
#include
#include
void
main()
{
double x;
char* dontcare;
errno = 0;
x = strtod("1.0e-309", &dontcare);
printf("errno after = %d\n", errno);
printf("x after = %g\n", x);
}
This prints
errno after = 34
x after = 0
when compiled & linked with MS's VC5; don't know about VC6. Same thing for
"1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
fixes their library.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 04:51:57 -0500
> > Full_Name: Stephen D Evans
> > Version: 1.5.2
> > OS: win32
> > Submission from: recombinant.demon.co.uk (212.229.73.7)
> >
> >
> > #! /usr/bin/python
> >
> > # Inconsistent behaviour.
> >
> > # Python 1.5.2 win32 fails the second print (why not both?)
> > # other versions print both expressions
> >
> > # Ok Python 1.5.2 on SuSE Linux 6.3
> > # Ok JPython 1.1 on java1.1.7B
> > # Partial failure Python 1.5.2 win32
> >
> > print eval("float(1.0e-309)")
> > print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
>
> First note that these don't do the same thing: the first passes a float to
> "float", the second passes a string to "float". Change the first to
>
> print eval("float('1.0e-309')")
>
> and it gives the same bogus error as the second one.
>
> Then it turns out the error is Microsoft's fault. This tiny C program shows
> the bug:
>
> #include
> #include
> #include
>
> void
> main()
> {
> double x;
> char* dontcare;
> errno = 0;
> x = strtod("1.0e-309", &dontcare);
> printf("errno after = %d\n", errno);
> printf("x after = %g\n", x);
> }
>
> This prints
>
> errno after = 34
> x after = 0
>
> when compiled & linked with MS's VC5; don't know about VC6. Same thing for
> "1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
> fixes their library.
The bizarre thing is that this is broken the same way on Solaris:
>>> 1.0e-309
1.0000000000000019e-309
>>> float("1.0e-309")
Traceback (innermost last):
File "", line 1, in ?
ValueError: float() literal too large: 1.0e-309
>>>
I looked and it turns out that Python uses atof() in the first case
(string literal encountered in a Python expression) and strtod() in
the second case (string passed to float()).
Apparently strtod() and atof() differ in implementation, even though
the Solaris man page says "The atof(str) function call is equivalent
to strtod(str, (char **)NULL)."
We could fix this by changing float() to do its own syntax checking
and then use atof()... Is it worth it?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 22:48:50 -0500
[atof and strtod act differently given denormals on both Windows &
Solaris]
[Guido]
> ...
> Apparently strtod() and atof() differ in implementation, even though
> the Solaris man page says "The atof(str) function call is equivalent
> to strtod(str, (char **)NULL)."
Ya, their man page is lying. atof() existed in the mists of prehistory and
typically did no error checking at all. IIRC, ANSI C introduced strtod(),
which generally got implemented as a layer of error-checking around atof.
I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
inputs with absolute value smaller than that.
> We could fix this by changing float() to do its own syntax checking
> and then use atof()... Is it worth it?
Depends on your goal : do you want more extreme cases, like 1e-500,
to blow up (strtod) or underflow to 0 (atof)? The example in the original
test case is subtler because atof made it *appear* to be "a regular old
number"; in fact, it's not, it's small enough that it falls into 754's
"denormalized" range. This means the conversion loses some extraordinary
amount of-- but not all --information (whereas 1e-500 is below even the
denorm range: conversion loses all information).
Without a coherent strategy for dealing with 754 issues, it's hard to decide
which is better. Since strtod() is more restrictive, if this is worth
bothering about at all now (for P3K I think 754 needs to be taken
seriously), I actually recommend changing current atof() calls to use
native strtod() instead.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:14:29 -0500
> [atof and strtod act differently given denormals on both Windows &
> Solaris]
>
> [Guido]
> > ...
> > Apparently strtod() and atof() differ in implementation, even though
> > the Solaris man page says "The atof(str) function call is equivalent
> > to strtod(str, (char **)NULL)."
[Tim]
> Ya, their man page is lying. atof() existed in the mists of prehistory and
> typically did no error checking at all. IIRC, ANSI C introduced strtod(),
> which generally got implemented as a layer of error-checking around atof.
>
> I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
> limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
> inputs with absolute value smaller than that.
>
> > We could fix this by changing float() to do its own syntax checking
> > and then use atof()... Is it worth it?
>
> Depends on your goal : do you want more extreme cases, like 1e-500,
> to blow up (strtod) or underflow to 0 (atof)? The example in the original
> test case is subtler because atof made it *appear* to be "a regular old
> number"; in fact, it's not, it's small enough that it falls into 754's
> "denormalized" range. This means the conversion loses some extraordinary
> amount of-- but not all --information (whereas 1e-500 is below even the
> denorm range: conversion loses all information).
>
> Without a coherent strategy for dealing with 754 issues, it's hard to decide
> which is better. Since strtod() is more restrictive, if this is worth
> bothering about at all now (for P3K I think 754 needs to be taken
> seriously), I actually recommend changing current atof() calls to use
> native strtod() instead.
Hm, I'm not so sure. Suppose I'm writing a program that reads a data
files generated by some Fortran program. The Fortran program is
giving me points to plot for example. If Fortran manages to output
1e-500, wouldn't it make more sense if I rounded that to zero instead
of rejecting it? After all, after converting to plot precision it's
going to be zero anyway.
This way I could almost defend using strtod() for literals in
Python source code (where it makes more sense to warn about underflow)
but atof() for input. Except that of course input could conceivably
be using eval()...
Another argument for turning underflow into zero is that that also
happens in regular arithmetic:
>>> 0.1**2**8
1.0000000000000275e-256
>>> 0.1**2**9
0.0
I like this uniform behavior: overflow -> exception, underflow ->
zero. My calculator does this too.
Am I hopelessly naive about this? What else can we do? What control
does C give? What does sscanf() do?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:53:10 -0500
"In the face of ambiguity, refuse the temptation to guess".
That's one of the Pythonic Theses you're tempted to ignore too often .
Part of taking 754 seriously is that 754 gives the user complete control
over what happens in case of exceptions (including underflow): ignore them,
raise a fatal error, or simply set a flag saying it occurred.
Unfortunately, we have to wait for C9x until there's a portable way to get
at that stuff. Before then, it requires wildly varying platform-specific
hair.
> Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> files generated by some Fortran program. The Fortran program is
> giving me points to plot for example. If Fortran manages to output
> 1e-500, wouldn't it make more sense if I rounded that to zero instead
> of rejecting it?
This *may* make good sense if Python had certain knowledge that the program
is merely going to plot the points, but probably not even then. That is,
"insignificantly small" is relative to the application, and e.g. for all we
know the Fortran program generated a million doubles *all* in the range
[1e-500, 10e-500]: the intended plot of the data could very well be a
pointillistic version of the Mona Lisa rather than a straight line.
> After all, after converting to plot precision it's
> going to be zero anyway.
As above, this conclusion relies on the dubious assumption that 1e-500 is
very much smaller than the other values.
> This way I could almost defend using strtod() for literals in
> Python source code (where it makes more sense to warn about underflow)
> but atof() for input. Except that of course input could conceivably
> be using eval()...
>
> Another argument for turning underflow into zero is that that also
> happens in regular arithmetic:
>
> >>> 0.1**2**8
> 1.0000000000000275e-256
> >>> 0.1**2**9
> 0.0
Which is often desired but sometimes a disaster -- the language simply can't
guess. On whatever machine you ran this on, it almost certainly set the
"underflow happened" flag but continued on because the underflow exception
was masked out by default.
> I like this uniform behavior: overflow -> exception, underflow ->
> zero. My calculator does this too.
Not mine . Really, whether underflow gripes is controlled by a
user-settable flag on high end HP calculators. Note too that neither does
float *overflow* raise an exception under most Pythons today:
D:\Python>python
Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 1e500
1.#INF
>>> 1e200**2
1.#INF
>>>
I personally favor raising exceptions (by default) on 754's overflow, divide
by 0, and invalid operation conditions, while (again by default) letting
underflow and inexact pass without comment. But it again requires fiddling
the HW's 754 control registers to make that happen. P3K, not now.
> Am I hopelessly naive about this?
Not *entirely* hopeless, but close . If we ever talk about it for an
hour, I'll convince you of the futility of fighting 754. They beat all
resistance out of me in a mere decade <0.5 wink>.
> What else can we do?
Not much! Switching uniformly to either atof() or strtod() would be OK by
me for now, although I don't think patching over the current inconsistency
buys enough bang for the buck to be worth the effort.
> What control does C give?
None, until C9X.
> What does sscanf() do?
I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
C's numerics fight the *right* thing to do now just about every step of the
way. C9x is supposed to fix all that.
In the meantime, I think what JPython does is much more interesting (but
don't know what that is): whatever we do here should be consistent with The
Other Python too, and Java has a much better 754 story than ANSI C. 754 is
here to stay, but the last iteration of ANSI C isn't. Best guess is that
Java acts more like atof than strtod in this case.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Sat, 25 Mar 2000 14:15:54 -0500
> "In the face of ambiguity, refuse the temptation to guess".
>
> That's one of the Pythonic Theses you're tempted to ignore too often .
>
> Part of taking 754 seriously is that 754 gives the user complete control
> over what happens in case of exceptions (including underflow): ignore them,
> raise a fatal error, or simply set a flag saying it occurred.
> Unfortunately, we have to wait for C9x until there's a portable way to get
> at that stuff. Before then, it requires wildly varying platform-specific
> hair.
OK, so let's stick with the defaults that 754 presecribes until we can
give the user control. That's the purpose of defaults, right?
> > Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> > files generated by some Fortran program. The Fortran program is
> > giving me points to plot for example. If Fortran manages to output
> > 1e-500, wouldn't it make more sense if I rounded that to zero instead
> > of rejecting it?
>
> This *may* make good sense if Python had certain knowledge that the program
> is merely going to plot the points, but probably not even then. That is,
> "insignificantly small" is relative to the application, and e.g. for all we
> know the Fortran program generated a million doubles *all* in the range
> [1e-500, 10e-500]: the intended plot of the data could very well be a
> pointillistic version of the Mona Lisa rather than a straight line.
OK, forget the example.
> > After all, after converting to plot precision it's
> > going to be zero anyway.
>
> As above, this conclusion relies on the dubious assumption that 1e-500 is
> very much smaller than the other values.
I think even 754 tells us that 1e-500 is smaller than what we normally
need to deal with.
> > This way I could almost defend using strtod() for literals in
> > Python source code (where it makes more sense to warn about underflow)
> > but atof() for input. Except that of course input could conceivably
> > be using eval()...
> >
> > Another argument for turning underflow into zero is that that also
> > happens in regular arithmetic:
> >
> > >>> 0.1**2**8
> > 1.0000000000000275e-256
> > >>> 0.1**2**9
> > 0.0
>
> Which is often desired but sometimes a disaster -- the language simply can't
> guess. On whatever machine you ran this on, it almost certainly set the
> "underflow happened" flag but continued on because the underflow exception
> was masked out by default.
Again: 754 gives a default. I want to conform to the default -- it's
better to provide control, but even when we provide control, there will
still be default behavior, and (if I understand 754 correctly) the
default is not to interrupt for underflow.
> > I like this uniform behavior: overflow -> exception, underflow ->
> > zero. My calculator does this too.
>
> Not mine . Really, whether underflow gripes is controlled by a
> user-settable flag on high end HP calculators. Note too that neither does
> float *overflow* raise an exception under most Pythons today:
>
> D:\Python>python
> Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> 1e500
> 1.#INF
> >>> 1e200**2
> 1.#INF
> >>>
Oops, you're right. Must be another 754 default behavior!
> I personally favor raising exceptions (by default) on 754's overflow, divide
> by 0, and invalid operation conditions, while (again by default) letting
> the HW's 754 control registers to make that happen. P3K, not now.
I would personally also prefer an exception for overflow. You don't
say what you want for underflow though. I still like silent underflow
to zero by default.
> > Am I hopelessly naive about this?
>
> Not *entirely* hopeless, but close . If we ever talk about it for an
> hour, I'll convince you of the futility of fighting 754. They beat all
> resistance out of me in a mere decade <0.5 wink>.
I'm not fighting it. Say the ideal Python has full user control over
fp exceptions. What should the defaults be? Python 1.6 should have
the same defaults, even if it doesn't have the controls.
> > What else can we do?
>
> Not much! Switching uniformly to either atof() or strtod() would be OK by
> me for now, although I don't think patching over the current inconsistency
> buys enough bang for the buck to be worth the effort.
>
> > What control does C give?
>
> None, until C9X.
>
> > What does sscanf() do?
>
> I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
> C's numerics fight the *right* thing to do now just about every step of the
> way. C9x is supposed to fix all that.
>
> In the meantime, I think what JPython does is much more interesting (but
> don't know what that is): whatever we do here should be consistent with The
> Other Python too, and Java has a much better 754 story than ANSI C. 754 is
> here to stay, but the last iteration of ANSI C isn't. Best guess is that
> Java acts more like atof than strtod in this case.
Bingo. Indeed it does. 1e500 prints as Infinity; 1e-500 is 0.0,
either as literal or when converted from a string.
I'll change float() to use atof().
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Tue, 4 Apr 2000 00:29:01 -0400
[Guido]
> OK, so let's stick with the defaults that 754 presecribes until we can
> give the user control. That's the purpose of defaults, right?
In every world other 754 (see below), but we really have no choice now
(because C doesn't give us any control now).
> I think even 754 tells us that 1e-500 is smaller than what we normally
> need to deal with.
Well, there is no 1e-500 under 754, which is why there's some reason to at
least warn about it (if the user wanted 0, why didn't they type 0?).
> Again: 754 gives a default. I want to conform to the default -- it's
> better to provide control, but even when we provide control, there will
> still be default behavior, and (if I understand 754 correctly) the
> default is not to interrupt for underflow.
The 754 default is never to raise an exception no matter what, whether
overflow, underflow, invalid operation (like sqrt(-4)), or divide by 0. So
Python's current behavior wrt these two is non-conforming:
math.sqrt(-4)
1. / 0.
However, 754 is primarily a HW std, and the defaults were prescribed by a
committee of HW geeks and math library authors. They were caught totally
off guard by how long it took for languages to provide the control features
the std also mandates -- for "regular users" it's plainly insane to avoid
griping about the two above, and it was never 754's intent to let them pass
silently for regular users.
Note that Java has been skewered mercilessly by Kahan (Mr. 754 Himself) for
accepting the defaults but not providing the also-mandated control
functions. The std is subtler than it appears, and all the fiddly bits are
really needed.
>> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>> >>> 1e500
>> 1.#INF
>> >>> 1e200**2
>> 1.#INF
>> >>>
> Oops, you're right. Must be another 754 default behavior!
Right.
> I would personally also prefer an exception for overflow. You don't
> say what you want for underflow though. I still like silent underflow
> to zero by default.
754 defines (almost) everything: underflow when the underflow exception is
masked out must deliver a zero with the same sign as the infinite-precision
result.
> I'm not fighting it.
You will ; e.g., returning 1 for "x == x" is incorrect when x is a
NaN.
> Say the ideal Python has full user control over fp exceptions. What
> should the defaults be?
IMO, exception on overflow, divide-by-0 and invalid operation. Let
underflow and inexact pass silently. That's what I implemented at KSR, and
customers were *very* much happier with that than with the 754 defaults. Of
course I also implemented all the 754 control and status inquiry functions,
so the one 754-savvy programmer per site was happy too (they need the
control to write robust numerical libraries for everyone else to use -- the
*true* purpose of the 754 HW defaults).
> Python 1.6 should have the same defaults, even if it doesn't have the
> controls.
This is a big project, as there's no portable way even to detect fp overflow
now. The math libraries should play along too.
> I'll change float() to use atof().
OK by me!
-------------------------------------------------------
Date: 2000-Aug-03 05:43
By: twouters
Comment:
I *think* this one is fixed and closed. It looks like Guido promises to fix this, in any case, and it looks done.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110624&group_id=5470
From noreply@sourceforge.net Thu Aug 3 13:50:20 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 05:50:20 -0700
Subject: [Python-bugs-list] [Bug #110627] Floating point numbers (PR#277)
Message-ID: <200008031250.FAA21706@bush.i.sourceforge.net>
Bug #110627, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: 3rd Party
Priority: 3
Summary: Floating point numbers (PR#277)
Details: Jitterbug-Id: 277
Submitted-By: gellsmore@yahoo.com
Date: Wed, 5 Apr 2000 17:00:09 -0400 (EDT)
Version: Python CE 1.0b1
OS: Windows CE H/PC 3.01 pro
Floating point answer objects not returned correctly
>>>3.1
g
All floats return g but will work in scenario below where floats form part of
the expression but not the answer object
>>>int(3.1/2)
1
this works.
====================================================================
Audit trail:
Mon May 22 17:49:40 2000 guido changed notes
Mon May 22 17:49:40 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-03 05:50
By: twouters
Comment:
Hm, Python CE 1.0b1 ? I'm not sure if that's an old version of Python ported to the CE, or a recent version of Python ported to the CE with a new version number. In any case, I dont believe the CE port is being maintained by the core Python group, so I don't think we can do much about it.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110627&group_id=5470
From noreply@sourceforge.net Thu Aug 3 15:27:36 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 07:27:36 -0700
Subject: [Python-bugs-list] [Bug #110832] urljoin() bug with odd no of '..' (PR#194)
Message-ID: <200008031427.HAA18121@delerium.i.sourceforge.net>
Bug #110832, was updated on 2000-Aug-01 14:13
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 6
Summary: urljoin() bug with odd no of '..' (PR#194)
Details: Jitterbug-Id: 194
Submitted-By: DrMalte@ddd.de
Date: Sun, 30 Jan 2000 19:40:45 -0500 (EST)
Version: 1.5.2 and 1.4
OS: Linux
While playing with linbot I noticed some failed requests to
'http://xxx.xxx.xx/../img/xxx.gif'
for a document in the root directory containing
.
The Reason is in urlparse.urljoin()
urljoin() fails to remove an odd number of '../' from the path.
Demonstration:
from urlparse import urljoin
print urljoin( 'http://127.0.0.1/', '../imgs/logo.gif' )
# gives 'http://127.0.0.1/../imgs/logo.gif'
# should give 'http://127.0.0.1/imgs/logo.gif'
print urljoin( 'http://127.0.0.1/', '../../imgs/logo.gif' )
# gives 'http://127.0.0.1/imgs/logo.gif'
# works
# '../../imgs/logo.gif' gives 'http://127.0.0.1/../imgs/logo.gif' and so on
The patch for 1.5.2
( I'm not sure if it works generally, but tests with linbot looked good)
*** /usr/local/lib/python1.5/urlparse.py Sat Jun 26 19:11:59 1999
--- urlparse.py Mon Jan 31 01:31:45 2000
***************
*** 170,175 ****
--- 170,180 ----
segments[-1] = ''
elif len(segments) >= 2 and segments[-1] == '..':
segments[-2:] = ['']
+
+ if segments[0] == '':
+ while segments[1] == '..': # remove all leading '..'
+ del segments[1]
+
return urlunparse((scheme, netloc, joinfields(segments, '/'),
params, query, fragment))
====================================================================
Audit trail:
Mon Feb 07 12:35:35 2000 guido changed notes
Mon Feb 07 12:35:35 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:13
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] urljoin() bug with odd no of '..' (PR#194)
Date: Mon, 31 Jan 2000 12:28:55 -0500
Thanks for your bug report and fix. I agree with your diagnosis.
Would you please be so kind as to resend your patch with the
legal disclaimer from
http://www.python.org/1.5/bugrelease.html
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:13
By: none
Comment:
Patch being considered.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110832&group_id=5470
From noreply@sourceforge.net Thu Aug 3 16:20:52 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 08:20:52 -0700
Subject: [Python-bugs-list] [Bug #110672] pythonlib.a makes SIGSEGV with LD_PRELOAD variable (PR#378)
Message-ID: <200008031520.IAA19909@delerium.i.sourceforge.net>
Bug #110672, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: pythonlib.a makes SIGSEGV with LD_PRELOAD variable (PR#378)
Details: Jitterbug-Id: 378
Submitted-By: epx@conectiva.com
Date: Fri, 30 Jun 2000 16:10:23 -0400 (EDT)
Version: 1.5.2
OS: Linux glibc 2.1.3 kernel 2.2.16
Modules/posixmodule,c, function convertenviron(), uses a dirty trick when
parsing POSIX environment variables. All variables are formatted as
=
Example: KDEDIR=/usr
Python changes '=' to '\0' for a moment while parsing, in the line
*p = '\0'
But, if LD_PRELOAD variable is present, it SIGSEGVs in this command. I guess
this variable is in a mprotect()ed page for security reasons. The environment
variable parser should strdup() the variables or change the parsing algorithm so
it no longer writes directly the environment var. array.
====================================================================
Audit trail:
Tue Jul 11 08:24:21 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-03 08:20
By: twouters
Comment:
Fixed by revision 2.113 of posixmodule.c, checked in by Guido. Code now uses PyString_FromStringAndSize to 'substring' the environment variables, rather than writing \0's in them.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110672&group_id=5470
From noreply@sourceforge.net Thu Aug 3 16:38:57 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 08:38:57 -0700
Subject: [Python-bugs-list] [Bug #110636] prefix directory (PR#293)
Message-ID: <200008031538.IAA20458@delerium.i.sourceforge.net>
Bug #110636, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: None
Priority: 3
Summary: prefix directory (PR#293)
Details: Jitterbug-Id: 293
Submitted-By: kajiyama@grad.sccs.chukyo-u.ac.jp
Date: Wed, 12 Apr 2000 15:14:10 -0400 (EDT)
Version: 1.6a2
OS: Plamo Linux 1.3
(Repost: excuse me for annoyance)
The installation procedure ("make install") fails if the prefix directory
specified with configure's --prefix option does not exist. Manually
making the prefix directory is sufficient, but automatic creation may be
more preferable.
====================================================================
Audit trail:
Tue Jul 11 08:29:17 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-03 08:38
By: twouters
Comment:
Yup, this is a problem. This could be fixed by using mkdir's '-p' flag, in the Makefile. However, I'm not entirely sure how portable the -p flag is. The other solution, manually checking each parent directory and creating them when necessary, is a lot more work.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110636&group_id=5470
From noreply@sourceforge.net Thu Aug 3 17:00:10 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 09:00:10 -0700
Subject: [Python-bugs-list] [Bug #110707] does not compile under BSDI (PR#57)
Message-ID: <200008031600.JAA21224@delerium.i.sourceforge.net>
Bug #110707, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: does not compile under BSDI (PR#57)
Details: Jitterbug-Id: 57
Submitted-By: jital@knoggin.com
Date: Fri, 20 Aug 1999 04:18:04 -0400 (EDT)
Version: py152
OS: BSDI IServer
seems to think it is a NeXT arch or something
$ ./configure --prefix=/usr/home/knoggin/usr/local/
--exec-prefix=/usr/home/knoggin/usr/local/
creating cache ./config.cache
checking MACHDEP... bsdos3
checking CCC...
checking for --without-gcc... no
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking LINKCC... $(PURIFY) $(CC)
checking LDLIBRARY...
checking for ranlib... ranlib
checking for ar... ar
checking how to run the C preprocessor... gcc -D_HAVE_BSDI -E
checking for AIX... no
checking for minix/config.h... no
checking whether gcc -D_HAVE_BSDI accepts -OPT:Olimit=0... no
checking whether gcc -D_HAVE_BSDI accepts -Olimit 1500... no
checking for C preprocessor type... ansi
checking for ANSI C header files... yes
checking for dlfcn.h... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for ncurses.h... yes
checking for pthread.h... yes
checking for signal.h... yes
checking for stdarg.h... yes
checking for stddef.h... yes
checking for stdlib.h... yes
checking for thread.h... no
checking for unistd.h... yes
checking for utime.h... yes
checking for sys/audioio.h... no
checking for sys/file.h... yes
checking for sys/lock.h... yes
checking for sys/param.h... yes
checking for sys/select.h... yes
checking for sys/time.h... yes
checking for sys/times.h... yes
checking for sys/un.h... yes
checking for sys/utsname.h... yes
checking for sys/wait.h... yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for clock_t in time.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking size of int... 4
checking size of long... 4
checking size of void *... 4
checking for long long support... yes
checking size of long long... 8
checking size of off_t... 8
checking whether to enable large file support... yes
checking for --with-next-framework... no
checking for --with-dyld... required for framework build
checking SO... .so
checking LDSHARED... ld
checking CCSHARED...
checking LINKFORSHARED...
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for socket in -lnet... no
checking for --with-libs... no
checking for --with(out)-readline... not specified.
checking for --with-dec-threads... no
checking for --with-threads... no
checking for --with-thread... no
checking for --with-sgi-dl... no
checking for --with-dl-dld... no
checking for alarm... yes
checking for chown... yes
checking for clock... yes
checking for dlopen... yes
checking for execv... yes
checking for flock... yes
checking for fork... yes
checking for fsync... yes
checking for fdatasync... no
checking for ftime... no
checking for ftruncate... yes
checking for getpeername... yes
checking for getpgrp... yes
checking for getpid... yes
checking for getpwent... yes
checking for gettimeofday... yes
checking for getwd... yes
checking for kill... yes
checking for link... yes
checking for lstat... yes
checking for mkfifo... yes
checking for mktime... yes
checking for nice... yes
checking for pause... yes
checking for plock... no
checking for pthread_init... yes
checking for putenv... yes
checking for readlink... yes
checking for select... yes
checking for setgid... yes
checking for setlocale... yes
checking for setuid... yes
checking for setsid... yes
checking for setpgid... yes
checking for setpgrp... yes
checking for setvbuf... yes
checking for sigaction... yes
checking for siginterrupt... yes
checking for sigrelse... no
checking for strftime... yes
checking for strptime... no
checking for symlink... yes
checking for tcgetpgrp... yes
checking for tcsetpgrp... yes
checking for timegm... no
checking for times... yes
checking for truncate... yes
checking for uname... yes
checking for waitpid... yes
checking for fseek64... no
checking for fseeko... no
checking for fstatvfs... no
checking for ftell64... no
checking for ftello... no
checking for statvfs... no
checking for dup2... yes
checking for getcwd... yes
checking for strdup... yes
checking for strerror... yes
checking for memmove... yes
checking for getpgrp... (cached) yes
checking for setpgrp... (cached) yes
checking for gettimeofday... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... yes
checking for time.h that defines altzone... no
checking whether sys/select.h and sys/time.h may both be included... yes
checking whether char is unsigned... no
checking for working const... yes
checking for working volatile... yes
checking for working signed char... yes
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for bad exec* prototypes... no
checking for bad static forward... no
checking whether va_list is an array... no
checking for gethostbyname_r... no
checking for gethostbyname... yes
checking for __fpu_control in -lieee... no
checking for --with-fpectl... checking for --with-libm=STRING... default
LIBM="-
lm"
checking for --with-libc=STRING... default LIBC=""
checking for hypot... yes
checking for hypot... (cached) yes
checking for genuine getopt... yes
checking what malloc(0) returns... nonnull
updating cache ./config.cache
creating ./config.status
creating Makefile
creating Objects/Makefile
creating Parser/Makefile
creating Python/Makefile
creating Modules/Makefile.pre
creating Modules/Setup.thread
creating config.h
pcvendor:~/usr/local/src/Python-1.5.2 $ make
(cd Modules; make -f Makefile.pre Makefile)
cp ./Setup.in Setup
echo "# Edit this file for local setup changes" >Setup.local
rm -f ../libpython1.5.a
/bin/sh ./makesetup Setup.thread Setup.local Setup
making Makefile in subdirectory .
`Makefile' is up to date.
making Makefile in subdirectory Parser
`Makefile' is up to date.
making Makefile in subdirectory Objects
`Makefile' is up to date.
making Makefile in subdirectory Python
`Makefile' is up to date.
making Makefile in subdirectory Modules
`Makefile' is up to date.
(rm -f Modules/hassignal; cd Modules; make hassignal)
rm -f hassignal
for i in regexmodule.o regexpr.o pcremodule.o pypcre.o posixmodule.o
signalmo
dule.o arraymodule.o cmathmodule.o mathmodule.o stropmodule.o
structmodule.
o timemodule.o operator.o fcntlmodule.o pwdmodule.o grpmodule.o
selectmodu
le.o socketmodule.o errnomodule.o md5module.o md5c.o shamodule.o
rotormodul
e.o newmodule.o binascii.o parsermodule.o cStringIO.o cPickle.o config.o
ge
tpath.o main.o getbuildinfo.o; do if test "$i" = "signalmodule.o"; then echo
y
es >hassignal; break; fi; done
cd Parser ; make OPT="-g -O2" VERSION="1.5"
prefix="/usr/home/knoggin/usr/local
/" exec_prefix="/usr/home/knoggin/usr/local/" all
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c pgenmain.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c acceler.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c grammar1.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c listnode.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c node.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c parser.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c parsetok.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c tokenizer.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c bitset.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c metagrammar.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c firstsets.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c grammar.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c pgen.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c printgrammar.c
gcc -D_HAVE_BSDI -g -O2 pgenmain.o acceler.o grammar1.o listnode.o node.o
parse
r.o parsetok.o tokenizer.o bitset.o metagrammar.o firstsets.o grammar.o
pgen.o
printgrammar.o -ldl -o pgen
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c myreadline.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c intrcheck.c
cd Objects ; make OPT="-g -O2" VERSION="1.5"
prefix="/usr/home/knoggin/usr/local/" exec_prefix="/usr/home/knoggin/usr/local/"
all
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c abstract.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c bufferobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c classobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c cobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c complexobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c fileobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c floatobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c frameobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c funcobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c intobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c listobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c longobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c dictobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c methodobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c moduleobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c object.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c rangeobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c sliceobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c stringobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c tupleobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c typeobject.c
cd Python ; make OPT="-g -O2" VERSION="1.5"
prefix="/usr/home/knoggin/usr/local/" exec_prefix="/usr/home/knoggin/usr/local/"
all
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c bltinmodule.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ceval.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c compile.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c errors.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c frozen.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c frozenmain.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getargs.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getcompiler.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getcopyright.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getmtime.c
gcc -D_HAVE_BSDI -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H
-DPLATFORM='"bsdos3"' ./getplatform.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getversion.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c graminit.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c import.c
gcc -D_HAVE_BSDI -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -I/ ./importdl.c
./importdl.c:269: mach-o/dyld.h: No such file or directory
*** Error code 1
Stop.
*** Error code 1
Stop.
====================================================================
Audit trail:
Mon Aug 30 12:40:26 1999 guido changed notes
Mon Aug 30 12:40:26 1999 guido moved from incoming to irreproducible
Tue Oct 19 23:20:49 1999 guido sent reply 1
Tue Oct 19 23:21:36 1999 guido changed notes
Tue Oct 19 23:21:36 1999 guido moved from irreproducible to open
Tue Oct 19 23:30:25 1999 guido changed notes
Tue Oct 19 23:30:25 1999 guido moved from open to platformbug
Follow-Ups:
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Guido van Rossum
Subject: Re: does not compile under BSDI (PR#57)
Date: Tue Oct 19 23:20:49 1999
This same bug was reported by someone else for the same platform.
We arrived at the work-around of deleting the line
#define WITH_DYLD
from the config.h generated by the configure script.
If you are still experiencing problems building Python, please
try this.
--Guido van Rossum
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] does not compile under BSDI (PR#57)
Date: Fri, 20 Aug 1999 07:57:10 -0400
> Full_Name: John Ital
> Version: py152
> OS: BSDI IServer
>
> seems to think it is a NeXT arch or something
>
[...]
> gcc -D_HAVE_BSDI -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -I/ ./importdl.c
> ./importdl.c:269: mach-o/dyld.h: No such file or directory
> *** Error code 1
Very strange. I've never seen this before. It appears that somehow
USE_DYLD is defined at that point, which can only happen if WITH_DYLD
is defined, which can only happen if you specify --with-next-framework
or --with-dyld on the configure command line, which you didn't.
Perhaps you have a buggy preprocessor that is confused by the tangle
of #ifdefs in importdl.c?
I don't know how to help you; I know Python has been built
successfully on bsdos3 before, so I'm guessing it's something in your
setup, not a Python bug.
If you need more help, please ask a newsgroup -- either
comp.lang.python or a BSD specific one.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
Work-around: if you delete
#define WITH_DYLD
from config.h, the build succeeds.
-------------------------------------------------------
Date: 2000-Aug-03 09:00
By: twouters
Comment:
For the record, I cannot reproduce this on the BSDI 3.1 systems we still have lying around. It *might* have been specific to BSDI 3.0, which we no longer have (for various reasons, like y2k bugs ;) and I've heard similar (but not the same) reports about BSD/OS running under a 'virtual' machine. However, I've never seen or heard about those 'virtual' BSD/OSes, other than in that c.l.py posting.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110707&group_id=5470
From noreply@sourceforge.net Thu Aug 3 17:17:00 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 09:17:00 -0700
Subject: [Python-bugs-list] [Bug #110599] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Message-ID: <200008031617.JAA28389@bush.i.sourceforge.net>
Bug #110599, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Details: Jitterbug-Id: 102
Submitted-By: "=?iso-8859-2?B?VmxhZGlt7XIgQmVuZbk=?="
Date: Mon, 11 Oct 1999 13:00:07 +0200
Version: None
OS: None
Good afternoon,
I have found a bug on Python 1.5.2. This bug doesn't occur on Python
1.5.1.
Python versions and OS:
- Python 1.5.1. at Debian GNU/Linux 2.0.36
- Python 1.5.2. at Debian GNU/Linux 2.2.9
Bug: Incorrect signal processing (Python 1.5.2).
Process can assign procedure for signal processing. When process is
waiting at system call and this signal occur, then the signal assigned
procedure is otherwise correctly completed but then waiting at system call
is broken and process continues.
Here is a simple program for demonstrate this bug:
#!/usr/bin/python
import signal
import sys
def signal_handle(signum, frame) :
signal.signal(signal.SIGALRM, signal_handle)
signal.alarm(2)
print "signal"
signal_handle(0,0)
a=sys.stdin.readline()
print "Line examined..."
b=sys.stdin.readline()
print "Line examined..."
print a,b,"end"
# end of example
Correct behaviour: Message "Line examined..." occurs only after pressing
ENTER by user.
Bug: Message "Line examined..." occurs immediately after signal occured
and procedure signal_handle finished. Output then look thus (when no input
entered):
signal
signal
Line examined...
signal
Line examined...
end
This bug appears at any signal occur and whatever process waiting at
system call. Some system call even produces exception (e.g. waiting for data
or connection on socket).
Bug is perhaps caused by wrong seting "siginterrupt" on module signal. I
haven't found any way how call in Python program "siginterrupt" for correct
behavior of signal processing.
Good bye, V. Benes
****************************************************************************
Ing. Vladimir Benes, pvt.net
PVT, a.s., OZ Chomutov
e-mail: vladimir.benes@pvt.cz, vladimir.benes@sms.paegas.cz
****************************************************************************
====================================================================
Audit trail:
Mon Oct 11 18:12:13 1999 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:05
By: none
Comment:
From: Jeremy Hylton
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Tue, 12 Oct 1999 12:04:42 -0400 (EDT)
>>>>> "VB" == Vladimir Benes writes:
VB> Bug: Incorrect signal processing (Python 1.5.2). Process can
VB> assign procedure for signal processing. When process is waiting
VB> at system call and this signal occur, then the signal assigned
VB> procedure is otherwise correctly completed but then waiting at
VB> system call is broken and process continues.
[example program]
I see the behavior you report for 1.5.2 on Solaris 2.6.
VB> This bug appears at any signal occur and whatever process
VB> waiting at system call. Some system call even produces exception
VB> (e.g. waiting for data or connection on socket).
These issues always occur in twos don't they. There was a similar
question posted on comp.lang.python yesterday. I'm not sure that the
behavior you're seeing is a bug; it is the behavior I would expect.
Slow system calls are interrupted, returning EINTR, when a signal
occurs.
VB> Bug is perhaps caused by wrong seting "siginterrupt" on
VB> module signal. I haven't found any way how call in Python
VB> program "siginterrupt" for correct behavior of signal
VB> processing.
Perhaps the signal module for Python should be extended to support
siginterrupt, but it sounds like it will only reduce the number of
system calls that can be interrupted. The Solaris man page says:
NOTES
Use of these interfaces should be restricted to only appli-
cations written on BSD platforms. Use of these interfaces
with any of the system libraries or in multi-threaded appli-
cations is unsupported.
It doesn't sound particularly safe.
Jeremy
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: "=?iso-8859-2?B?VmxhZGlt7XIgQmVuZbk=?="
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Wed, 13 Oct 1999 09:19:44 +0200
From: Jeremy Hylton
To: Vladimir.Benes@pvt.cz
Cc: python-bugs-list@python.org ;
bugs-py@python.org
Date: 12. 10. 1999 18:04
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python
1.5.2 (PR#102)
JH>I see the behavior you report for 1.5.2 on Solaris 2.6.
You don't write whether this bug appeared there.
JH> ...... I'm not sure that the
JH> behavior you're seeing is a bug; it is the behavior I would expect.
JH> Slow system calls are interrupted, returning EINTR, when a signal
JH> occurs.
I'am sure that this behavior is bug becouse:
1. I wrote the same program in C language (see below).
2. I ran this program at the same machine where the Python *)
program works incorrectly.
3. Behavior of C program is correct (line scan is ended only when
user press ENTER and this end is independed on signal).
=> The C program works correct and the same Python *) program fails at the
same platform. Base run of program should by independed on signal processing
except program terminating signals. It's independed at C program but
incorrect processed by Python *) programs.
*) only Python 1.5.2; Python 1.5.1 here works correctly
Here is the mentioned program:
#include
#include
#include
void signal_handle(int signum) {
signal(SIGALRM, signal_handle);
alarm(2);
printf("signal\n\r");
}
void main(void) {
char a[100], b[100];
signal_handle(0);
scanf("%s",&a);
printf("Line examined...\n\r");
scanf("%s",&b);
printf("Line examined...\n\r");
printf("%s\t%s\tend\n\r", a, b);
}
VB> Bug is perhaps caused by wrong seting "siginterrupt" on
VB> module signal. I haven't found any way how call in Python
VB> program "siginterrupt" for correct behavior of signal
VB> processing.
JH> Perhaps the signal module for Python should be extended to support
JH> siginterrupt, but it sounds like it will only reduce the number of
JH> system calls that can be interrupted. .......
Sorry, I wrong formulated possible couse of bug. I will try to specify
my idea:
It looks that there is any wrong calling "siginterupt" on signal module.
Python libraries doesn't allow me to try correct this bug by calling
"siginiterrupt" in my program before signal setting. But the best way is to
reapir bug on signal module.
Good bye, V. Benes
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Wed, 13 Oct 1999 08:57:25 -0400
> JH> ...... I'm not sure that the
> JH> behavior you're seeing is a bug; it is the behavior I would expect.
> JH> Slow system calls are interrupted, returning EINTR, when a signal
> JH> occurs.
>
[Vladimir]
> I'am sure that this behavior is bug becouse:
When I first thought about this, I agreed with Vladimir. If you look
careful at his code, readline() is returning "" when the alarm goes
off; this can't be right, because it's not an end of file. It should
either raise an exception (EINTR) or return one line of valid data.
On the other hand, whatever solution is chosen should be careful that
other signals raise exceptions; in particular you want SIGINT (^C) to
be translated to a KeyboardError exception. Since the C code in
readline() can't tell which signal was trapped or whether the handler
raised an exception, it has two choices, both of which are bad:
- Raise an IOError exception, honoring the EINTR. Unfortunately, in
the SIGINT/^C case, the handler will run after this exception is
raised, and it will raise KeyboardError. The Python program will
*probably* see the KeyboardError exception, but it is not guaranteed
that the signal handler is run immediately. (The Python-level signal
handler is run only after the Python virtual machine finishes the
current instruction, i.e. after the readline() completes.)
- Continue to read a line, ignoring the EINTR. Unfortunately, this
would mean that the user has to type ^C followed by Return to
interrupt the program!
An alternative solution would be to arrange for the Python-level
interrupt handler to execute inside the readline() method, and to
restart the read only when it raises no exception; but this would
require a massive code rewrite (you'd want this behavior in any place
that does a blocking I/O operation).
Concluding, I think Vladimir is better off not to use signal handlers
in the way he is using them now. Python's emulation of signal
semantics is sufficiently different from C that you can't rely on the
same behavior. (And note that in C, signal handlers are usually
broken anyway; e.g. the code you write, which prints something inside
the signal handler, is broken on C too because you don't know the
state of stdout when the handler is invoked.)
I looked at what could be different between 1.5.1 and 1.5.2, and found
that the call to siginterrupt() to disable restarting system calls was
added after 1.5.1. Given the alternatives, I think I like the 1.5.2
behavior better than the 1.5.1 behavior.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: "=?iso-8859-2?B?VmxhZGlt7XIgQmVuZbk=?="
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Wed, 13 Oct 1999 16:34:39 +0200
>...
>Concluding, I think Vladimir is better off not to use signal handlers
>in the way he is using them now. Python's emulation of signal
>semantics is sufficiently different from C that you can't rely on the
>same behavior. (And note that in C, signal handlers are usually
>broken anyway; e.g. the code you write, which prints something inside
>the signal handler, is broken on C too because you don't know the
>state of stdout when the handler is invoked.)
Well, meantioned programs were only very simple demos for demonstrate
incorrect signal processing. But exists a large range of meaningful programs
where is necessary both synchronous and asynchronous signal processing - and
signal can be triggered whenever.
Example of C symbolic structure this programs:
....
int event_flag;
void trigger_signal(int signum) {
// asynchonous signal processing
event_flag = MY_EVENT; // only flag set
}
void initialize_signal(int sig) {
event_flag = NO_EVENT; // initialize
signal(sig, trigger_signal);
}
int main() {
initialize_signal(SIGTERM);
while (1) {
my_func();
// synchronous signal processing:
if (event_flag==MY_EVENT) my_sync_trigger();
}
}
Signal can be raised whenever when function my_func runs => flag
event_flag is then set but my_func "does't know" his and continues at own
processing. Signal should not influence my_func becouse my_func "doesn't
know" both this signal and flag event_flag. Function event_flag can wait for
system call (read, write, connect, etc). Incoming signal should not finish
this waiting after trigger_signal function processing. So my_func is
independed on signal processing and "does'nt know" signals.
Program tests the flag at any "safe" location(s). If this flag is set,
program run specific synchronous signal processing. It can be for example
safe program end or synchronous SIGALRM processing.
Python programs can by compose similar this example.
>I looked at what could be different between 1.5.1 and 1.5.2, and found
>that the call to siginterrupt() to disable restarting system calls was
>added after 1.5.1. Given the alternatives, I think I like the 1.5.2
>behavior better than the 1.5.1 behavior.
But then old Python programs writen for Python 1.5.1 are not compatible
with Python 1.5.2. in this feature. I thing that better way is to let this
behavior equal as in Python 1.5.1. but allow programs to call either new
function "siginterrupt" at signal module (more flexible solution) or any
else new function at signal module to set behavior signal processing by Your
idea.
Good bye, V. Benes
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110599&group_id=5470
From noreply@sourceforge.net Thu Aug 3 20:04:16 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 12:04:16 -0700
Subject: [Python-bugs-list] [Bug #110636] prefix directory (PR#293)
Message-ID: <200008031904.MAA01775@bush.i.sourceforge.net>
Bug #110636, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Closed
Resolution: Wont Fix
Bug Group: None
Priority: 3
Summary: prefix directory (PR#293)
Details: Jitterbug-Id: 293
Submitted-By: kajiyama@grad.sccs.chukyo-u.ac.jp
Date: Wed, 12 Apr 2000 15:14:10 -0400 (EDT)
Version: 1.6a2
OS: Plamo Linux 1.3
(Repost: excuse me for annoyance)
The installation procedure ("make install") fails if the prefix directory
specified with configure's --prefix option does not exist. Manually
making the prefix directory is sufficient, but automatic creation may be
more preferable.
====================================================================
Audit trail:
Tue Jul 11 08:29:17 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-03 08:38
By: twouters
Comment:
Yup, this is a problem. This could be fixed by using mkdir's '-p' flag, in the Makefile. However, I'm not entirely sure how portable the -p flag is. The other solution, manually checking each parent directory and creating them when necessary, is a lot more work.
-------------------------------------------------------
Date: 2000-Aug-03 12:04
By: gvanrossum
Comment:
This intentional. The reason is that "make install" is often done as root. If you make a typo and accidentally specify an erroneous prefix, it would silently create that for you! In nurmal use, prefix is /usr or /usr/local so it should always exist.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110636&group_id=5470
From noreply@sourceforge.net Thu Aug 3 21:00:38 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 13:00:38 -0700
Subject: [Python-bugs-list] [Bug #110830] Syntax (PR#177)
Message-ID: <200008032000.NAA29692@delerium.i.sourceforge.net>
Bug #110830, was updated on 2000-Aug-01 14:12
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Open
Resolution: Later
Bug Group: Feature Request
Priority: 1
Summary: Syntax (PR#177)
Details: Jitterbug-Id: 177
Submitted-By: simonb@logical.co.za
Date: Tue, 11 Jan 2000 05:17:37 -0500 (EST)
Version: 1-5-2
OS: NT 4.0
Hi there
I don't know if this is a bug, or is intentional behaviour for a specific
reason.
The following code produces a syntax error about the continue not being within a
looping structure rather than a prefectly silly infinite loop...
while 1:
try:
continue
except:
pass
where the following works as one would expect...
while 1:
try:
raise 1
except:
continue
I figure that there is more likely a sane reason for this behaviour than being a
bug, but I am curious.
Thanks
Simon
====================================================================
Audit trail:
Wed Jan 12 18:11:45 2000 guido changed notes
Wed Jan 12 18:11:45 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:12
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] Syntax (PR#177)
Date: Tue, 11 Jan 2000 12:10:17 -0500
[Simon Barratt, putting "continue" in a "try" block]
> I don't know if this is a bug, or is intentional behaviour
> for a specific reason.
Actually, it's a bit of both . See the Language Reference Manual's
section on the "continue" statement, particularly the footnote:
The restriction on occurring in the try clause is
implementer's laziness and will eventually be lifted.
It's been this way (and documented) forever; it's simply hard to implement
given the current structure of the interpreter loop.
Rest assured there's nothing *conceptually* wrong with putting continue in a
try! It's simply an implementation restriction; the error msg should
probably make that clearer. IIRC, JPython doesn't have this restriction.
"Someday" it will get repaired in CPython too.
-------------------------------------------------------
Date: 2000-Aug-01 14:12
By: none
Comment:
It's a zero-priority bug (i.e. not likely to be fixed).
-------------------------------------------------------
Date: 2000-Aug-03 13:00
By: twouters
Comment:
Like the bot said, low priority 'to be fixed' bug.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470
From noreply@sourceforge.net Thu Aug 3 22:50:30 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 3 Aug 2000 14:50:30 -0700
Subject: [Python-bugs-list] [Bug #110640] 1.6a2 issues with int/long on 64bit platforms - eg stringobject (PR#306)
Message-ID: <200008032150.OAA07476@bush.i.sourceforge.net>
Bug #110640, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Closed
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Summary: 1.6a2 issues with int/long on 64bit platforms - eg stringobject (PR#306)
Details: Jitterbug-Id: 306
Submitted-By: mark.favas@per.dem.csiro.au
Date: Mon, 24 Apr 2000 19:26:25 -0400 (EDT)
Version: 1.6a2 CVS of 25 April
OS: DEC Alpha, Tru64 Unix 4.0F
There seems to be issues (and perhaps lurking cans of worms) on 64-bit
platforms
where sizeof(long) != sizeof(int).
For example, the CVS version of 1.6a2 of 25 April fails the UserString
regression test. The tests fail as follows (verbose set to 1):
abcabcabc.count(('abc',)) no
'abcabcabc' 3 <>
2
abcabcabc.count(('abc', 1)) no
'abcabcabc' 2 <>
1
abcdefghiabc.find(('abc', 1)) no
'abcdefghiabc' 9 <>
-1
abcdefghiabc.rfind(('abc',)) no
'abcdefghiabc' 9
<> 0
abcabcabc.rindex(('abc',)) no
'abcabcabc' 6 <>
3
abcabcabc.rindex(('abc', 1)) no
'abcabcabc' 6 <>
3
These tests are failing because the calls from the UserString methods to the
underlying string methods are setting the default value of the end-of-string
parameter to sys.maxint, which is defined as LONG_MAX (9223372036854775807),
whereas the string methods in stringobject.c are using ints and expecting them
to be no larger than INT_MAX (2147483647).
Thus the end-of-string parameter becomes -1 in the default case. The size of an
int on my platform is 4, and the size of a long is 8, so the "natural size of
a Python integer" should be 8, by my understanding. The obvious fix is to
change
stringobject.c to use longs, rather than ints, but the problem might be more
widespread than that. INT_MAX is used in unicodeobject.c, pypcre.c, _sre.c,
stropmodule.c, and ceval.c as well as stringobject.c. Some of these look as
though LONG_MAX should have been used (variables compared to INT_MAX are longs,
but I am not confident enough to submit patches for them...
Mark
====================================================================
Audit trail:
Mon May 22 17:22:20 2000 guido changed notes
Mon May 22 17:22:20 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-02 04:07
By: twouters
Comment:
Most likely fixed by the 64-bit-platform fixes from Trent Mick and others. Mark, is this still a problem ?
-------------------------------------------------------
Date: 2000-Aug-03 14:50
By: tmick
Comment:
This was fixed a while back.Relevant email threads:
Guido raises Mark's bug report and MAL,Guido,Tim, and I discuss it:
http://www.python.org/pipermail/python-dev/2000-April/010456.html
http://www.python.org/pipermail/python-dev/2000-May/010514.html
MAL's silent truncation proposed patch (Guido turned it down):
http://www.python.org/pipermail/patches/2000-May/000588.html
My proposed patch to correct the string slice-semantic functions to actually
correctly accept and handle all integral values.
http://www.python.org/pipermail/patches/2000-May/000608.html
And my patches getting checked in for string- and unicode- object.c:
http://www.python.org/pipermail/python-checkins/2000-May/005562.html
http://www.python.org/pipermail/python-checkins/2000-May/005573.html
Mark Favas (via private email), the bug submitter, verified through provate email that the bug seems to be fixed for him as well.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110640&group_id=5470
From millionary@mail.ru Fri Aug 4 02:47:33 2000
From: millionary@mail.ru (millionary@mail.ru)
Date: Thu, 3 Aug 2000 21:47:33 -0400 (EDT)
Subject: [Python-bugs-list] =?windows-1251?Q?=C1=E8=E7=ED=E5=F1-=C2=EE=EB=ED=E0_2000?= (PR#425)
Message-ID: <20000804014733.DA1E81CD61@dinsdale.python.org>
Çàáóäüòå âñå, ÷òî Âû ñëûøàëè ðàíüøå î áèçíåñå â Èíòåðíåòå.
Ïðåäëàãàåì Âàì áèçíåñ "Íîâîé Âîëíû".
Ïîëíàÿ èëè ÷àñòè÷íàÿ çàíÿòîñòü â Èíòåðíåòå.
- Âàøà çàäà÷à ïðîäàâàòü èíôîðìàöèþ ÷åðåç E-mail
- Èíôîðìàöèÿ - ýòî òîâàð XXI âåêà
- Âû èìååòå áîëåå 40.000.000 ïîòåíöèàëüíûõ êëèåíòîâ
(ïî ìíåíèþ ãàçåòû "Êîììåðñàíò" îò 15 ìàÿ 2000 ã.)
- Âàøà ïðèáûëü ñîñòàâèò îò $700 äî $5.000 â ìåñÿö
Ïîæàëóéñòà, åñëè Âû çàèíòåðåñîâàëèñü,
ïîëó÷èòå ïîëíóþ èíôîðìàöèþ ïî http://more.at/report
From noreply@sourceforge.net Fri Aug 4 14:11:42 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 4 Aug 2000 06:11:42 -0700
Subject: [Python-bugs-list] [Bug #110656] IDLE goto file/line (PR#352)
Message-ID: <200008041311.GAA28640@delerium.i.sourceforge.net>
Bug #110656, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: IDLE
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: IDLE goto file/line (PR#352)
Details: Jitterbug-Id: 352
Submitted-By: gpk@bell-labs.com
Date: Fri, 9 Jun 2000 22:45:05 -0400 (EDT)
Version: 1.6 CVS today
OS: Solaris 2.6
When using IDLE's shell window Debug->Go to file/line,
you have to be overly careful what you select.
Specifically, if you select a region that contains a newline,
IDLE won't be able to find a file and line number.
For example, if you select
v-- from there
File "/export/h1/gpk/schoolweb.local/schoolweb/parse.py", line 199, in
__str__
^-- to there (i.e. 2 characters in, on the following line),
you will get the following error message: "No special line: X the line you
point
to doesn't look like a file name followed by a line number."
That is unfortunate, as it's really convenient to make a quick flick
down from one line to the next, to select a complete line.
By the way, the error box requires you to click "OK".
That's a bug. It isn't OK.
It's a crime against the King's English, committed by the minions
of Bill Gates. You should not be following their lead.
====================================================================
Audit trail:
Tue Jul 11 08:25:59 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110656&group_id=5470
From noreply@sourceforge.net Fri Aug 4 14:12:02 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 4 Aug 2000 06:12:02 -0700
Subject: [Python-bugs-list] [Bug #110659] IDLE-0.5 copy command (PR#354)
Message-ID: <200008041312.GAA02802@bush.i.sourceforge.net>
Bug #110659, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: IDLE
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: IDLE-0.5 copy command (PR#354)
Details: Jitterbug-Id: 354
Submitted-By: gpk@bell-labs.com
Date: Tue, 13 Jun 2000 10:05:35 -0400 (EDT)
Version: 1.6a2+
OS: Solaris sparc 2.6
Alt-w is advertised to copy the selected text.
It doesn't. It pops up the 'window' menu.
However, even if you are in the 'edit' menu,
alt-w apparently does nothing.
I can select text, do alt-E alt-W, move the pointer,
then do ctrl-Y, and nothing pops up.
By the way, 'ctl-U ctl-U ctl-S' is an absurdly long
sequence for something as common as searching for text.
====================================================================
Audit trail:
Tue Jul 11 08:26:00 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110659&group_id=5470
From noreply@sourceforge.net Fri Aug 4 14:13:03 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 4 Aug 2000 06:13:03 -0700
Subject: [Python-bugs-list] [Bug #110660] IDLE-0.5 ctrl-F5 (PR#355)
Message-ID: <200008041313.GAA02817@bush.i.sourceforge.net>
Bug #110660, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: IDLE
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: IDLE-0.5 ctrl-F5 (PR#355)
Details: Jitterbug-Id: 355
Submitted-By: gpk@bell-labs.com
Date: Tue, 13 Jun 2000 11:30:14 -0400 (EDT)
Version: yesterday's CVS
OS: Solaris 2.6
If you type ctrl-f5 to run a script twice in sucession,
IDLE will incorrectly pop up a window saying
"Not Saved. Please Save First."
If you save (even though you haven't changed anything,
and even though there are no asterisks around the window
title), then ctrl-f5 will work again.
This *doesn't* happen if you run the script twice in
succession from the menu.
====================================================================
Audit trail:
Tue Jul 11 08:26:00 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] IDLE-0.5 ctrl-F5 (PR#355)
Date: Tue, 13 Jun 2000 11:55:09 -0400
Pretty mysterious! Doesn't happen under IDLE 0.5 for me. Running under
Windows, but darned hard to see why that would matter. Can anyone else try
this under Solaris 2.6? May have something to do with the specific script
you're running, Greg; e.g., does it happen if the script file contains just
print "Hi!"
?
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of gpk@bell-labs.com
> Sent: Tuesday, June 13, 2000 11:30 AM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] IDLE-0.5 ctrl-F5 (PR#355)
>
>
> Full_Name: Greg Kochanski
> Version: yesterday's CVS
> OS: Solaris 2.6
> Submission from: h-135-104-33-130.research.bell-labs.com (135.104.33.130)
>
>
> If you type ctrl-f5 to run a script twice in sucession,
> IDLE will incorrectly pop up a window saying
> "Not Saved. Please Save First."
>
> If you save (even though you haven't changed anything,
> and even though there are no asterisks around the window
> title), then ctrl-f5 will work again.
>
> This *doesn't* happen if you run the script twice in
> succession from the menu.
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
>
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] IDLE-0.5 ctrl-F5 (PR#355)
Date: Tue, 20 Jun 2000 16:42:57 -0500
I think I understand this. It's happened to me too. Pressing ^F5
changes the focus to the PyShell window. Pressing ^F5 again then
indeed complains about that window being unsaved.
--Guido van Rossum (home page: http://www.python.org/~guido/)
[Tim]
> Pretty mysterious! Doesn't happen under IDLE 0.5 for me. Running under
> Windows, but darned hard to see why that would matter. Can anyone else try
> this under Solaris 2.6? May have something to do with the specific script
> you're running, Greg; e.g., does it happen if the script file contains just
>
> print "Hi!"
>
> ?
>
> > -----Original Message-----
> > From: python-bugs-list-admin@python.org
> > [mailto:python-bugs-list-admin@python.org]On Behalf Of gpk@bell-labs.com
> > Sent: Tuesday, June 13, 2000 11:30 AM
> > To: python-bugs-list@python.org
> > Cc: bugs-py@python.org
> > Subject: [Python-bugs-list] IDLE-0.5 ctrl-F5 (PR#355)
> >
> >
> > Full_Name: Greg Kochanski
> > Version: yesterday's CVS
> > OS: Solaris 2.6
> > Submission from: h-135-104-33-130.research.bell-labs.com (135.104.33.130)
> >
> >
> > If you type ctrl-f5 to run a script twice in sucession,
> > IDLE will incorrectly pop up a window saying
> > "Not Saved. Please Save First."
> >
> > If you save (even though you haven't changed anything,
> > and even though there are no asterisks around the window
> > title), then ctrl-f5 will work again.
> >
> > This *doesn't* happen if you run the script twice in
> > succession from the menu.
> >
> >
> >
> > _______________________________________________
> > Python-bugs-list maillist - Python-bugs-list@python.org
> > http://www.python.org/mailman/listinfo/python-bugs-list
> >
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Greg Kochanski
Subject: Re: [Python-bugs-list] IDLE-0.5 ctrl-F5 (PR#355)
Date: Tue, 20 Jun 2000 17:25:37 -0400
Guido van Rossum wrote:
>
> I think I understand this. It's happened to me too. Pressing ^F5
> changes the focus to the PyShell window. Pressing ^F5 again then
> indeed complains about that window being unsaved.
>
> --Guido van Rossum (home page: http://www.python.org/~guido/)
Ah. Sure enough. Perhaps the best thing to do
is just to have the little error message explain
which window is unsaved. Include the title
of the unsaved window in the error box, maybe.
I'd be happy to send a patch, but the paperwork
would be terrible...
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] IDLE-0.5 ctrl-F5 (PR#355)
Date: Tue, 20 Jun 2000 18:10:35 -0500
> > I think I understand this. It's happened to me too. Pressing ^F5
> > changes the focus to the PyShell window. Pressing ^F5 again then
> > indeed complains about that window being unsaved.
> >
> > --Guido van Rossum (home page: http://www.python.org/~guido/)
>
> Ah. Sure enough. Perhaps the best thing to do
> is just to have the little error message explain
> which window is unsaved. Include the title
> of the unsaved window in the error box, maybe.
>
> I'd be happy to send a patch, but the paperwork
> would be terrible...
No need for paperwork, just the disclaimer text.
But I think the better patch would be to make PyShell a special case
and make it rerun the last window that had the focus.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110660&group_id=5470
From noreply@sourceforge.net Fri Aug 4 14:23:00 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 4 Aug 2000 06:23:00 -0700
Subject: [Python-bugs-list] [Bug #110661] cgi parsing of query strings (PR#356)
Message-ID: <200008041323.GAA28986@delerium.i.sourceforge.net>
Bug #110661, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 3
Summary: cgi parsing of query strings (PR#356)
Details: Jitterbug-Id: 356
Submitted-By: mredar@yahoo.com
Date: Tue, 13 Jun 2000 16:05:59 -0400 (EDT)
Version: 1.5.2
OS: linux
I am currently starting to use the cgi module for python. In general it's quite
nice, I love
the builtin "test" function--very handy.
I do have a quibble with the handling of query strings by the parser. In the
HTML 4 specification, appendix B
it is stated:
B.2.2 Ampersands in URI attribute values
The URI that is constructed when a form is submitted may be used as
an anchor-style link (e.g., the href attribute for the A element).
Unfortunately, the use of
the "&" character to separate form fields interacts with its use in
SGML attribute values to delimit character entity references. For example, to
use the URI
"http://host/?x=1&y=2" as a linking URI, it must be written or .
We recommend that HTTP server implementors, and in particular, CGI
implementors support the use of ";" in place of "&" to save authors the trouble
of escaping
"&" characters in this manner.
The recommended handling of ';' as field delimiters is not implemented in this
module.
Do you have any plans to implement this feature?
My current company is going to use
the ';' separator and it works with other cgi packages (perl & java servlets).
I'd
love to use python, but this is a stumbling block.
Thanks,
Mark
====================================================================
Audit trail:
Tue Jul 11 08:26:00 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110661&group_id=5470
From noreply@sourceforge.net Fri Aug 4 14:58:31 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 4 Aug 2000 06:58:31 -0700
Subject: [Python-bugs-list] [Bug #110681] memory leak in loops (PR#398)
Message-ID: <200008041358.GAA30094@delerium.i.sourceforge.net>
Bug #110681, was updated on 2000-Jul-31 14:14
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: memory leak in loops (PR#398)
Details: Jitterbug-Id: 398
Submitted-By: ingo.adler@synacon.ch
Date: Fri, 14 Jul 2000 05:10:25 -0400 (EDT)
Version: 1.5.2
OS: win nt
I have a simple loop, which produces memory leaks at every call (36 bytes):
{
Py_SetProgramName("pythontest.exe");
Py_Initialize();
initxmodulec();
PyRun_SimpleString("print \"... Python started ...\"");
PyRun_SimpleString("import xmodule");
PyRun_SimpleString("from xmodule import *");
// The Loop
PyRun_SimpleString(
"y = Y()\n"
"for i in range(1000):\n"
"\tx = y.getX()\n"
"\tx.getNumber()\n"
);
PyRun_SimpleString("print \"... Python finished ...\"");
Py_Finalize();
}
X and Y are my classes implemented in C++, connected to Python via Swig Shadow
Classes:
class X {
public:
float getNumber()
{
return 12.2;
}
};
class Y {
X* pX;
public:
Y()
{
pX = new X;
}
~Y()
{
delete pX;
}
X* getX()
{
return pX;
}
};
The classes and python are compiled statically with CBuilder5.0, Swig1.3a3 (same
problem with swig1.1).
I tested the application with "CodeGuard", which shows the memory leaks.
For every call in the loop there is an entry like this (I translated it to
English):
Error. 0x300010 (Thread 0x013B):
resource leak: memory block (0x15422F0) was never released
memory leak (0x015422F0) [size: 36 Byte] was assigned with malloc
call stack:
0x0045ED5D(=pythontest.exe:0x01:05DD5D)
G:\Projects\src\fortuna\Python\Objects\stringobject.c#145
0x00401EFD(=pythontest.exe:0x01:000EFD)
G:\Projects\src\fortuna\test\xmodule_wrap.c#769
0x0040255D(=pythontest.exe:0x01:00155D)
G:\Projects\src\fortuna\test\xmodule_wrap.c#941
0x0041BA79(=pythontest.exe:0x01:01AA79)
G:\Projects\src\fortuna\Python\Python\ceval.c#2359
0x0041B912(=pythontest.exe:0x01:01A912)
G:\Projects\src\fortuna\Python\Python\ceval.c#2324
0x0040EE3E(=pythontest.exe:0x01:00DE3E)
G:\Projects\src\fortuna\Python\Python\bltinmodule.c#12
The Code for line 941:
#define Y_getX(_swigobj) (_swigobj->getX())
static PyObject *_wrap_Y_getX(PyObject *self, PyObject *args) {
Y *_arg0;
PyObject *_resultobj,*_argo0=0;
X *_result;
self = self;
if(!PyArg_ParseTuple(args,"O:Y_getX",&_argo0))
return NULL;
if ((SWIG_ConvertPtr(_argo0,(void **) &_arg0,SWIGTYPE_Y_p,1)) == -1) return
NULL;
_result = (X *)Y_getX(_arg0);
/*941*/ _resultobj = SWIG_NewPointerObj((void *) _result, SWIGTYPE_X_p);
return _resultobj;
}
The Code for line 769:
SWIGSTATICRUNTIME(PyObject *)
SWIG_NewPointerObj(void *ptr, _swig_type_info *type) {
char result[512];
PyObject *robj;
if (!ptr) {
Py_INCREF(Py_None);
return Py_None;
}
#ifdef SWIG_COBJECT_TYPES
robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, type->name, NULL);
#else
SWIG_MakePtr(result,ptr,type);
/*769*/ robj = PyString_FromString(result);
#endif
return robj;
}
Ingo Adler
====================================================================
Audit trail:
Tue Jul 25 07:27:50 2000 guido changed notes
Tue Jul 25 07:27:50 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "M.-A. Lemburg"
Subject: Re: [Python-bugs-list] memory leak in loops (PR#398)
Date: Fri, 14 Jul 2000 11:22:51 +0200
ingo.adler@synacon.ch wrote:
>
> Full_Name: ingo adler
> Version: 1.5.2
> OS: win nt
> Submission from: megazh-d-201.agrinet.ch (212.28.158.201)
>
> I have a simple loop, which produces memory leaks at every call (36 bytes):
>
> {
> Py_SetProgramName("pythontest.exe");
> Py_Initialize();
>
> initxmodulec();
>
> PyRun_SimpleString("print \"... Python started ...\"");
>
> PyRun_SimpleString("import xmodule");
> PyRun_SimpleString("from xmodule import *");
>
> // The Loop
> PyRun_SimpleString(
> "y = Y()\n"
> "for i in range(1000):\n"
> "\tx = y.getX()\n"
> "\tx.getNumber()\n"
Could be that SWIG doesn't get a chance to cleanup the shadow
object for x and y. Try adding
del x,y
as final script line.
Note that SWIG uses Python strings to represent pointers in
C++. It uses an internal table to store these.
> );
>
> PyRun_SimpleString("print \"... Python finished ...\"");
> Py_Finalize();
> }
>
> X and Y are my classes implemented in C++, connected to Python via Swig Shadow
> Classes:
>
> class X {
>
> public:
> float getNumber()
> {
> return 12.2;
> }
> };
>
> class Y {
> X* pX;
>
> public:
> Y()
> {
> pX = new X;
> }
>
> ~Y()
> {
> delete pX;
> }
>
> X* getX()
> {
> return pX;
> }
> };
>
> The classes and python are compiled statically with CBuilder5.0, Swig1.3a3 (same
> problem with swig1.1).
>
> I tested the application with "CodeGuard", which shows the memory leaks.
> For every call in the loop there is an entry like this (I translated it to
> English):
>
> Error. 0x300010 (Thread 0x013B):
> resource leak: memory block (0x15422F0) was never released
>
> memory leak (0x015422F0) [size: 36 Byte] was assigned with malloc
> call stack:
> 0x0045ED5D(=pythontest.exe:0x01:05DD5D)
> G:\Projects\src\fortuna\Python\Objects\stringobject.c#145
> 0x00401EFD(=pythontest.exe:0x01:000EFD)
> G:\Projects\src\fortuna\test\xmodule_wrap.c#769
> 0x0040255D(=pythontest.exe:0x01:00155D)
> G:\Projects\src\fortuna\test\xmodule_wrap.c#941
> 0x0041BA79(=pythontest.exe:0x01:01AA79)
> G:\Projects\src\fortuna\Python\Python\ceval.c#2359
> 0x0041B912(=pythontest.exe:0x01:01A912)
> G:\Projects\src\fortuna\Python\Python\ceval.c#2324
> 0x0040EE3E(=pythontest.exe:0x01:00DE3E)
> G:\Projects\src\fortuna\Python\Python\bltinmodule.c#12
>
> The Code for line 941:
>
> #define Y_getX(_swigobj) (_swigobj->getX())
> static PyObject *_wrap_Y_getX(PyObject *self, PyObject *args) {
> Y *_arg0;
> PyObject *_resultobj,*_argo0=0;
> X *_result;
> self = self;
> if(!PyArg_ParseTuple(args,"O:Y_getX",&_argo0))
> return NULL;
> if ((SWIG_ConvertPtr(_argo0,(void **) &_arg0,SWIGTYPE_Y_p,1)) == -1) return
> NULL;
> _result = (X *)Y_getX(_arg0);
> /*941*/ _resultobj = SWIG_NewPointerObj((void *) _result, SWIGTYPE_X_p);
> return _resultobj;
> }
>
> The Code for line 769:
>
> SWIGSTATICRUNTIME(PyObject *)
> SWIG_NewPointerObj(void *ptr, _swig_type_info *type) {
> char result[512];
> PyObject *robj;
> if (!ptr) {
> Py_INCREF(Py_None);
> return Py_None;
> }
> #ifdef SWIG_COBJECT_TYPES
> robj = PyCObject_FromVoidPtrAndDesc((void *) ptr, type->name, NULL);
> #else
> SWIG_MakePtr(result,ptr,type);
> /*769*/ robj = PyString_FromString(result);
> #endif
> return robj;
> }
>
> Ingo Adler
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Ingo Adler
Subject: Re: [Python-bugs-list] memory leak in loops (PR#398)
Date: Fri, 14 Jul 2000 11:40:42 +0100
This is a multi-part message in MIME format.
--------------6D29988B97CCE77010389AE2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
> > // The Loop
> > PyRun_SimpleString(
> > "y = Y()\n"
> > "for i in range(1000):\n"
> > "\tx = y.getX()\n"
> > "\tx.getNumber()\n"
>
> Could be that SWIG doesn't get a chance to cleanup the shadow
> object for x and y. Try adding
>
> del x,y
>
> as final script line.
>
> Note that SWIG uses Python strings to represent pointers in
> C++. It uses an internal table to store these.
>
I changed the code to:
PyRun_SimpleString(
"y = Y()\n"
"for i in range(1000):\n"
"\tx = y.getX()\n"
"\tx.getNumber()\n"
"\tdel x\n"
);
It doesn't change anything.
The memory leak only occurs when I call x.getNumber() in the loop. Otherwise x =
y.getX() is memory leak free.
Ingo Adler
--------------6D29988B97CCE77010389AE2
Content-Type: text/x-vcard; charset=us-ascii;
name="ingo.adler.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ingo Adler
Content-Disposition: attachment;
filename="ingo.adler.vcf"
begin:vcard
n:Adler;Ingo
tel;cell:+41-79-3786792
tel;fax:+41-41-7103244
tel;home:+41-41-7103268
tel;work:+41-41-8111500
x-mozilla-html:FALSE
url:www.synacon.ch
org:Synacon GmbH
adr:;;Rubiswilstrasse 7;Ibach;SZ;6438;Schwitzerland
version:2.1
email;internet:ingo.adler@synacon.ch
title:Dipl.-Inform.
fn:Ingo Adler
end:vcard
--------------6D29988B97CCE77010389AE2--
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "M.-A. Lemburg"
Subject: Re: [Python-bugs-list] memory leak in loops (PR#398)
Date: Fri, 14 Jul 2000 12:13:13 +0200
Ingo Adler wrote:
>
> > > // The Loop
> > > PyRun_SimpleString(
> > > "y = Y()\n"
> > > "for i in range(1000):\n"
> > > "\tx = y.getX()\n"
> > > "\tx.getNumber()\n"
> >
> > Could be that SWIG doesn't get a chance to cleanup the shadow
> > object for x and y. Try adding
> >
> > del x,y
> >
> > as final script line.
> >
> > Note that SWIG uses Python strings to represent pointers in
> > C++. It uses an internal table to store these.
> >
>
> I changed the code to:
>
> PyRun_SimpleString(
> "y = Y()\n"
> "for i in range(1000):\n"
> "\tx = y.getX()\n"
> "\tx.getNumber()\n"
> "\tdel x\n"
> );
>
> It doesn't change anything.
>
> The memory leak only occurs when I call x.getNumber() in the loop. Otherwise x =
> y.getX() is memory leak free.
Two other possibilities:
1. Python interns the string object used by SWIG to represent
the point. It should then free the memory in the Py_Finalize()
call. If it doesn't, there's a bug to be found ;-)
2. SWIG has the leak. Try using the alternative method of
defining SWIG_COBJECT_TYPES (don't know how this is done --
it seems to be new in SWIG).
--
Marc-Andre Lemburg
______________________________________________________________________
Business: http://www.lemburg.com/
Python Pages: http://www.lemburg.com/python/
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Ingo Adler
Subject: Re: [Python-bugs-list] memory leak in loops (PR#398)
Date: Fri, 14 Jul 2000 12:45:02 +0100
This is a multi-part message in MIME format.
--------------82393A6779ADCFC3A2ADE19E
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I could reproduce the problem with Developer Studio 6.0.
If anyone wants the project to test it - I can provide it.
Ingo Adler
--------------82393A6779ADCFC3A2ADE19E
Content-Type: text/x-vcard; charset=us-ascii;
name="ingo.adler.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ingo Adler
Content-Disposition: attachment;
filename="ingo.adler.vcf"
begin:vcard
n:Adler;Ingo
tel;cell:+41-79-3786792
tel;fax:+41-41-7103244
tel;home:+41-41-7103268
tel;work:+41-41-8111500
x-mozilla-html:FALSE
url:www.synacon.ch
org:Synacon GmbH
adr:;;Rubiswilstrasse 7;Ibach;SZ;6438;Schwitzerland
version:2.1
email;internet:ingo.adler@synacon.ch
title:Dipl.-Inform.
fn:Ingo Adler
end:vcard
--------------82393A6779ADCFC3A2ADE19E--
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] memory leak in loops (PR#398)
Date: Mon, 17 Jul 2000 22:16:54 -0400
> I could reproduce the problem with Developer Studio 6.0.
>
> If anyone wants the project to test it - I can provide it.
If you can repro the problem in just a few lines of C/C++ code but with no
SWIG generated code, I would be interested. Otherwise, I suggest you do
some more work to narrow the problem down some more; as described, there is
still too much work to be done to narrow down the problem to the cause for
me to be interested (or anyone else given the feedback to date!)
Mark.
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Ingo Adler
Subject: Re: [Python-bugs-list] memory leak in loops (PR#398)
Date: Tue, 25 Jul 2000 01:34:22 +0200
This is a multi-part message in MIME format.
--------------72A23DA082087CB843E12C92
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi Mark,
I could repro the memory leaks (they seem to be the same) with a much smaller
program:
int main(int argc, char* argv[])
{
Py_SetProgramName("pythontest.exe");
Py_Initialize();
PyRun_SimpleString("print \"... Python started ...\"");
PyRun_SimpleString("print \"... Python finished ...\"");
Py_Finalize();
return 0;
}
There seems to be a more general problem, which includes my special problem.
Output of Code Guard (translated to English). BoundsChecker shows the same
leaks.
Ingo
Output:
Memory Block (0x014EB9B4) [Size: 37 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043515A(=pythontest.exe:0x01:03415A)
D:\projects\Python\Objects\stringobject.c#95
0x0043A8EB(=pythontest.exe:0x01:0398EB)
D:\projects\Python\Python\marshal.c#483
0x0043A9A1(=pythontest.exe:0x01:0399A1)
D:\projects\Python\Python\marshal.c#504
0x0043AB88(=pythontest.exe:0x01:039B88)
D:\projects\Python\Python\marshal.c#568
0x0043AD37(=pythontest.exe:0x01:039D37)
D:\projects\Python\Python\marshal.c#624
0x0042BC54(=pythontest.exe:0x01:02AC54)
D:\projects\Python\Python\import.c#575
------------------------------------------
Error 00078. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14E4858) was never freed
Memory Block (0x014E4858) [Size: 31 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x00425400(=pythontest.exe:0x01:024400)
D:\projects\Python\Objects\dictobject.c#1084
0x00433896(=pythontest.exe:0x01:032896)
D:\projects\Python\Objects\moduleobject.c#56
0x0042B993(=pythontest.exe:0x01:02A993)
D:\projects\Python\Python\import.c#428
0x0043B0C9(=pythontest.exe:0x01:03A0C9)
D:\projects\Python\Python\modsupport.c#82
0x0040C68A(=pythontest.exe:0x01:00B68A)
D:\projects\Python\Python\bltinmodule.c#2393
------------------------------------------
Error 00079. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14E47D0) was never freed
Memory Block (0x014E47D0) [Size: 28 Byte] was assigned with malloc
Aufrufhierarchie:
0x00433CB3(=pythontest.exe:0x01:032CB3)
D:\projects\Python\Objects\object.c#122
0x00424115(=pythontest.exe:0x01:023115)
D:\projects\Python\Objects\dictobject.c#124
0x004367D3(=pythontest.exe:0x01:0357D3)
D:\projects\Python\Objects\stringobject.c#1075
0x00425418(=pythontest.exe:0x01:024418)
D:\projects\Python\Objects\dictobject.c#1087
0x0043387A(=pythontest.exe:0x01:03287A)
D:\projects\Python\Objects\moduleobject.c#54
0x0042B993(=pythontest.exe:0x01:02A993)
D:\projects\Python\Python\import.c#428
------------------------------------------
Error 00080. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14E47AC) was never freed
Memory Block (0x014E47AC) [Size: 32 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x00425400(=pythontest.exe:0x01:024400)
D:\projects\Python\Objects\dictobject.c#1084
0x0043387A(=pythontest.exe:0x01:03287A)
D:\projects\Python\Objects\moduleobject.c#54
0x0042B993(=pythontest.exe:0x01:02A993)
D:\projects\Python\Python\import.c#428
0x0043B0C9(=pythontest.exe:0x01:03A0C9)
D:\projects\Python\Python\modsupport.c#82
0x0040C68A(=pythontest.exe:0x01:00B68A)
D:\projects\Python\Python\bltinmodule.c#2393
------------------------------------------
Error 00081. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14E46E4) was never freed
Memory Block (0x014E46E4) [Size: 35 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x004240F7(=pythontest.exe:0x01:0230F7)
D:\projects\Python\Objects\dictobject.c#120
0x0043C27B(=pythontest.exe:0x01:03B27B)
D:\projects\Python\Python\pythonrun.c#132
0x00402934(=pythontest.exe:0x01:001934)
G:\Projects\src\test\pythonmain.cpp#15
0x3257DC12(=CC3250MT.DLL:0x01:07CC12)
------------------------------------------
Error 00082. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x1524000) was never freed
Memory Block (0x01524000) [Size: 12288 Byte] was assigned with malloc
Aufrufhierarchie:
0x004243A7(=pythontest.exe:0x01:0233A7)
D:\projects\Python\Objects\dictobject.c#280
0x004245C4(=pythontest.exe:0x01:0235C4)
D:\projects\Python\Objects\dictobject.c#370
0x00436837(=pythontest.exe:0x01:035837)
D:\projects\Python\Objects\stringobject.c#1086
0x00415CA9(=pythontest.exe:0x01:014CA9)
D:\projects\Python\Python\compile.c#249
0x0043AC12(=pythontest.exe:0x01:039C12)
D:\projects\Python\Python\marshal.c#578
0x0043A9A1(=pythontest.exe:0x01:0399A1)
D:\projects\Python\Python\marshal.c#504
------------------------------------------
Error 00083. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14EFC9C) was never freed
Memory Block (0x014EFC9C) [Size: 35 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x0043685E(=pythontest.exe:0x01:03585E)
D:\projects\Python\Objects\stringobject.c#1098
0x00411EE6(=pythontest.exe:0x01:010EE6)
D:\projects\Python\Objects\classobject.c#126
0x004118FB(=pythontest.exe:0x01:0108FB)
D:\projects\Python\Python\ceval.c#2720
0x0040EE08(=pythontest.exe:0x01:00DE08)
D:\projects\Python\Python\ceval.c#1167
0x0040D597(=pythontest.exe:0x01:00C597)
D:\projects\Python\Python\ceval.c#324
------------------------------------------
Error 00084. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14EFC74) was never freed
Memory Block (0x014EFC74) [Size: 35 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x0043685E(=pythontest.exe:0x01:03585E)
D:\projects\Python\Objects\stringobject.c#1098
0x00411ED6(=pythontest.exe:0x01:010ED6)
D:\projects\Python\Objects\classobject.c#125
0x004118FB(=pythontest.exe:0x01:0108FB)
D:\projects\Python\Python\ceval.c#2720
0x0040EE08(=pythontest.exe:0x01:00DE08)
D:\projects\Python\Python\ceval.c#1167
0x0040D597(=pythontest.exe:0x01:00C597)
D:\projects\Python\Python\ceval.c#324
------------------------------------------
Error 00085. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14EFC4C) was never freed
Memory Block (0x014EFC4C) [Size: 35 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x0043685E(=pythontest.exe:0x01:03585E)
D:\projects\Python\Objects\stringobject.c#1098
0x00411EC6(=pythontest.exe:0x01:010EC6)
D:\projects\Python\Objects\classobject.c#124
0x004118FB(=pythontest.exe:0x01:0108FB)
D:\projects\Python\Python\ceval.c#2720
0x0040EE08(=pythontest.exe:0x01:00DE08)
D:\projects\Python\Python\ceval.c#1167
0x0040D597(=pythontest.exe:0x01:00C597)
D:\projects\Python\Python\ceval.c#324
------------------------------------------
Error 00086. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14F19CC) was never freed
Memory Block (0x014F19CC) [Size: 47 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x00431E97(=pythontest.exe:0x01:030E97)
D:\projects\Python\Objects\listobject.c#309
0x0041137E(=pythontest.exe:0x01:01037E)
D:\projects\Python\Python\ceval.c#2512
0x0040F906(=pythontest.exe:0x01:00E906)
D:\projects\Python\Python\ceval.c#1503
0x0040D597(=pythontest.exe:0x01:00C597)
D:\projects\Python\Python\ceval.c#324
0x0042BAD4(=pythontest.exe:0x01:02AAD4)
D:\projects\Python\Python\import.c#485
------------------------------------------
Error 00087. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14F596C) was never freed
Memory Block (0x014F596C) [Size: 32 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x0043685E(=pythontest.exe:0x01:03585E)
D:\projects\Python\Objects\stringobject.c#1098
0x0042CED6(=pythontest.exe:0x01:02BED6)
D:\projects\Python\Python\import.c#1513
0x0042CD19(=pythontest.exe:0x01:02BD19)
D:\projects\Python\Python\import.c#1441
0x0042CE6A(=pythontest.exe:0x01:02BE6A)
D:\projects\Python\Python\import.c#1489
0x00409B32(=pythontest.exe:0x01:008B32)
D:\projects\Python\Python\bltinmodule.c#65
------------------------------------------
Error 00088. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14EB870) was never freed
Memory Block (0x014EB870) [Size: 32 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043515A(=pythontest.exe:0x01:03415A)
D:\projects\Python\Objects\stringobject.c#95
0x0043A8EB(=pythontest.exe:0x01:0398EB)
D:\projects\Python\Python\marshal.c#483
0x0043A9A1(=pythontest.exe:0x01:0399A1)
D:\projects\Python\Python\marshal.c#504
0x0043AB88(=pythontest.exe:0x01:039B88)
D:\projects\Python\Python\marshal.c#568
0x0043A9A1(=pythontest.exe:0x01:0399A1)
D:\projects\Python\Python\marshal.c#504
0x0043AB76(=pythontest.exe:0x01:039B76)
D:\projects\Python\Python\marshal.c#567
------------------------------------------
Error 00089. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14EFBDC) was never freed
Memory Block (0x014EFBDC) [Size: 34 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x0043685E(=pythontest.exe:0x01:03585E)
D:\projects\Python\Objects\stringobject.c#1098
0x00411C9E(=pythontest.exe:0x01:010C9E)
D:\projects\Python\Objects\classobject.c#58
0x004118FB(=pythontest.exe:0x01:0108FB)
D:\projects\Python\Python\ceval.c#2720
0x0040EE08(=pythontest.exe:0x01:00DE08)
D:\projects\Python\Python\ceval.c#1167
0x0040D597(=pythontest.exe:0x01:00C597)
D:\projects\Python\Python\ceval.c#324
------------------------------------------
Error 00090. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14E74C4) was never freed
Memory Block (0x014E74C4) [Size: 988 Byte] was assigned with malloc
Aufrufhierarchie:
0x00430B62(=pythontest.exe:0x01:02FB62)
D:\projects\Python\Objects\intobject.c#113
0x00430BFD(=pythontest.exe:0x01:02FBFD)
D:\projects\Python\Objects\intobject.c#163
0x0040C6FC(=pythontest.exe:0x01:00B6FC)
D:\projects\Python\Python\bltinmodule.c#2404
0x0043C29A(=pythontest.exe:0x01:03B29A)
D:\projects\Python\Python\pythonrun.c#136
0x00402934(=pythontest.exe:0x01:001934)
G:\Projects\src\test\pythonmain.cpp#15
0x3257DC12(=CC3250MT.DLL:0x01:07CC12)
------------------------------------------
Error 00091. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14E96C4) was never freed
Memory Block (0x014E96C4) [Size: 174 Byte] was assigned with malloc
Aufrufhierarchie:
0x0042B0D9(=pythontest.exe:0x01:02A0D9) D:\projects\Python\PC\getpathp.c#403
0x0042B2D5(=pythontest.exe:0x01:02A2D5) D:\projects\Python\PC\getpathp.c#508
0x0043E40C(=pythontest.exe:0x01:03D40C)
D:\projects\Python\Python\sysmodule.c#413
0x0043C2CA(=pythontest.exe:0x01:03B2CA)
D:\projects\Python\Python\pythonrun.c#142
0x00402934(=pythontest.exe:0x01:001934)
G:\Projects\src\test\pythonmain.cpp#15
0x3257DC12(=CC3250MT.DLL:0x01:07CC12)
------------------------------------------
Error 00092. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x14EF660) was never freed
Memory Block (0x014EF660) [Size: 36 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x00425400(=pythontest.exe:0x01:024400)
D:\projects\Python\Objects\dictobject.c#1084
0x0042BA54(=pythontest.exe:0x01:02AA54)
D:\projects\Python\Python\import.c#466
0x0042BF73(=pythontest.exe:0x01:02AF73)
D:\projects\Python\Python\import.c#724
0x0042C876(=pythontest.exe:0x01:02B876)
D:\projects\Python\Python\import.c#1202
0x0042D51E(=pythontest.exe:0x01:02C51E)
D:\projects\Python\Python\import.c#1755
------------------------------------------
Error 00093. 0x300010 (Thread 0x012D):
Resource-Leak: Memory Block (0x15211C8) was never freed
Memory Block (0x015211C8) [Size: 31 Byte] was assigned with malloc
Aufrufhierarchie:
0x0043526B(=pythontest.exe:0x01:03426B)
D:\projects\Python\Objects\stringobject.c#145
0x0043685E(=pythontest.exe:0x01:03585E)
D:\projects\Python\Objects\stringobject.c#1098
0x004129EE(=pythontest.exe:0x01:0119EE)
D:\projects\Python\Objects\classobject.c#517
0x004246DD(=pythontest.exe:0x01:0236DD)
D:\projects\Python\Objects\dictobject.c#419
0x0042546E(=pythontest.exe:0x01:02446E)
D:\projects\Python\Objects\dictobject.c#1103
0x0043DF2E(=pythontest.exe:0x01:03CF2E)
D:\projects\Python\Python\sysmodule.c#95
------------------------------------------
Aufgerufene Funktionen:
delete (35 Mal)
getchar (1 Mal)
fflush (2 Mal)
fputs (2 Mal)
fwrite (2 Mal)
vsprintf (2 Mal)
strrchr (14 Mal)
fclose (14 Mal)
strspn (251 Mal)
fread (2021 Mal)
_fgetc (40 Mal)
fstat (7 Mal)
fopen (72 Mal)
strncmp (19 Mal)
strcmp (423 Mal)
stat (21 Mal)
strncpy (32 Mal)
strchr (125 Mal)
sprintf (2 Mal)
memcmp (1349 Mal)
memset (133 Mal)
strcpy (834 Mal)
strlen (784 Mal)
SysFreeMem (87 Mal)
SysGetMem (87 Mal)
realloc (88 Mal)
memcpy (837 Mal)
delete[] (2 Mal)
free (4936 Mal)
new[] (14 Mal)
new (40 Mal)
calloc (5 Mal)
malloc (4946 Mal)
Verwendete Resource-Arten:
Datei-Stream (14 Allocs, 5 max)
Datei-Handle (14 Allocs, 5 max)
Objekt-Array (14 Allocs, 13 max)
Objekt (40 Allocs, 28 max)
Memory Block (5039 Allocs, 2448 max)
Verwendete Module:
00400000 07/25/2000 01:06:08 G:\Projects\src\bin\pythontest.exe
0CD00000 02/03/2000 06:00:00 g:\programme\borland\cbuilder5\bin\CG32.DLL
201A0000 02/22/2000 05:20:00 C:\WINNT.45\TRAYHOOK.dll
32500000 02/03/2000 06:00:00 G:\Projects\src\bin\CC3250MT.DLL
40000000 02/03/2000 05:01:00 C:\WINNT.45\System32\VCL50.BPL
41000000 02/03/2000 06:00:00 G:\Projects\src\bin\BORLNDMM.DLL
52180000 08/09/1996 00:00:00 C:\WINNT.45\system32\version.dll
61220000 12/07/1999 16:03:46 G:\Programme\Microsoft
Hardware\Mouse\MSH_ZWF.dll
65340000 02/18/2000 16:16:02 C:\WINNT.45\system32\oleaut32.dll
70970000 05/09/1998 13:57:06 C:\WINNT.45\system32\SHELL32.dll
70BD0000 03/18/1999 00:00:00 C:\WINNT.45\system32\SHLWAPI.dll
71190000 07/22/1999 21:09:08 C:\WINNT.45\system32\MSIDLE.DLL
71590000 03/18/1999 00:00:00 C:\WINNT.45\system32\COMCTL32.dll
73060000 05/13/1999 12:05:00 C:\WINNT.45\System32\winspool.drv
77660000 05/13/1999 12:05:00 C:\WINNT.45\System32\MSWSOCK.dll
77666C35 05/13/1999 12:05:00 C:\WINNT.45\system32\wsock32.dll
77690000 05/13/1999 12:05:00 C:\WINNT.45\system32\WS2HELP.dll
776A0000 05/13/1999 12:05:00 C:\WINNT.45\system32\WS2_32.dll
77710000 05/13/1999 12:05:00 C:\WINNT.45\system32\mpr.dll
77920000 05/13/1999 12:05:00 C:\WINNT.45\System32\oledlg.dll
779B0000 08/09/1996 00:00:00 C:\WINNT.45\system32\LZ32.dll
77B80000 05/13/1999 12:05:00 C:\WINNT.45\system32\ole32.dll
77D80000 05/13/1999 12:05:00 C:\WINNT.45\system32\comdlg32.dll
77DC0000 05/13/1999 12:05:00 C:\WINNT.45\system32\ADVAPI32.dll
77E10000 05/13/1999 12:05:00 C:\WINNT.45\system32\RPCRT4.dll
77E70000 05/13/1999 12:05:00 C:\WINNT.45\system32\user32.dll
77ED0000 05/13/1999 12:05:00 C:\WINNT.45\system32\GDI32.dll
77F00000 05/13/1999 12:05:00 C:\WINNT.45\system32\kernel32.dll
77F70000 05/13/1999 12:05:00 C:\WINNT.45\System32\ntdll.dll
78000000 12/07/1999 05:00:00 C:\WINNT.45\system32\MSVCRT.dll
==========================================
Mark Hammond wrote:
> > I could reproduce the problem with Developer Studio 6.0.
> >
> > If anyone wants the project to test it - I can provide it.
>
> If you can repro the problem in just a few lines of C/C++ code but with no
> SWIG generated code, I would be interested. Otherwise, I suggest you do
> some more work to narrow the problem down some more; as described, there is
> still too much work to be done to narrow down the problem to the cause for
> me to be interested (or anyone else given the feedback to date!)
>
> Mark.
--------------72A23DA082087CB843E12C92
Content-Type: text/x-vcard; charset=us-ascii;
name="ingo.adler.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ingo Adler
Content-Disposition: attachment;
filename="ingo.adler.vcf"
begin:vcard
n:Adler;Ingo
tel;fax:+41-41-7103244
tel;work:+41-41-8111500
x-mozilla-html:FALSE
org:Synacon GmbH
adr:;;Rubiswilstrasse 7;Ibach;SZ;6438;Schwitzerland
version:2.1
email;internet:ingo.adler@synacon.ch
fn:Ingo Adler
end:vcard
--------------72A23DA082087CB843E12C92--
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
Actually, it's hard to say whether this is worth fixing...
Could it be a SWIG problem?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110681&group_id=5470
From noreply@sourceforge.net Fri Aug 4 14:58:50 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 4 Aug 2000 06:58:50 -0700
Subject: [Python-bugs-list] [Bug #110704] IDLE (PR#400)
Message-ID: <200008041358.GAA30113@delerium.i.sourceforge.net>
Bug #110704, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: IDLE
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: IDLE (PR#400)
Details: Jitterbug-Id: 400
Submitted-By: crislipm@earthlink.net
Date: Sun, 16 Jul 2000 20:40:24 -0400 (EDT)
Version: 1.5.2
OS: Linuxppc, Suse dist
more for curiosity/FYI
Using 1.5.2 (the version that came with the suse linuxppc) and IDLE 0.5 on an
ibook (version 2).
IDLE causes the keyboard to stop working (I am not certain which, if any action,
causes this, but it is reproducable) and the problem continues when I warm boot
back to the MAC OS. Have to do a cold boot to get keyboard to respond again.
====================================================================
Audit trail:
Mon Jul 24 18:30:07 2000 jeremy changed notes
Mon Jul 24 18:30:07 2000 jeremy moved from incoming to platformbug
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110704&group_id=5470
From noreply@sourceforge.net Fri Aug 4 15:00:44 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 4 Aug 2000 07:00:44 -0700
Subject: [Python-bugs-list] [Bug #110710] Segmentation fault on range (PR#71)
Message-ID: <200008041400.HAA30231@delerium.i.sourceforge.net>
Bug #110710, was updated on 2000-Jul-31 14:30
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 4
Summary: Segmentation fault on range (PR#71)
Details: Jitterbug-Id: 71
Submitted-By: mz@pdm.pvt.net
Date: Mon, 6 Sep 1999 06:45:45 -0400 (EDT)
Version: 1.5.2
OS: Debian GNU/Linux 2.1
When I start python and try to evaluate `range(1000000000)', I receive
segmentation fault:
$ python
Python 1.5.2 (#0, May 4 1999, 14:45:33) [GCC 2.7.2.3] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> range(1000000000)
Segmentation fault
This can also be reproduced with Python 1.5.1 from the Debian 2.1 i386
distribution.
====================================================================
Audit trail:
Tue Sep 07 11:13:29 1999 guido changed notes
Tue Sep 07 11:13:29 1999 guido moved from incoming to platformbug
Follow-Ups:
Date: 2000-Aug-04 07:00
By: jhylton
Comment:
I can't reproduce this bug on 1.5.2 or current CVS. In both cases, I get a MemoryError.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110710&group_id=5470
From noreply@sourceforge.net Sat Aug 5 11:57:47 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sat, 5 Aug 2000 03:57:47 -0700
Subject: [Python-bugs-list] [Bug #110713] strptime buffer overflow (PR#95)
Message-ID: <200008051057.DAA03278@delerium.i.sourceforge.net>
Bug #110713, was updated on 2000-Jul-31 14:30
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: Works For Me
Bug Group: Platform-specific
Priority: 7
Summary: strptime buffer overflow (PR#95)
Details: Jitterbug-Id: 95
Submitted-By: bridge@gsnet.com
Date: Tue, 5 Oct 1999 12:45:12 -0400 (EDT)
Version: 1.5.2
OS: RedHat 5.2
Hi-
I got a core dump with the following line, and I don't see it in the bug
database. I inadvertantly put a %X instead of a %Y in the format
string for strptime:
Python 1.5.2 (#1, Apr 18 1999, 16:03:16) [GCC pgcc-2.91.60 19981201 (egcs-1.1.1
on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import time
>>> time.strptime("Oct 28 1999", "%b %d %X")
Segmentation fault (core dumped)
====================================================================
Audit trail:
Wed Oct 06 11:12:55 1999 guido changed notes
Wed Oct 06 11:12:55 1999 guido moved from incoming to platformbug
Follow-Ups:
Date: 2000-Aug-05 03:57
By: nowonder
Comment:
I cannot test this as I do not have RedHat 5.2. It works for me on SuSE Linux 6.4 both with 1.5.2 and the current CVS version.
Somebody with a RedHat 5.2 system should check this out.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110713&group_id=5470
From noreply@sourceforge.net Sat Aug 5 14:03:57 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sat, 5 Aug 2000 06:03:57 -0700
Subject: [Python-bugs-list] [Bug #110819] test suite incomplete (PR#1)
Message-ID: <200008051303.GAA14291@bush.i.sourceforge.net>
Bug #110819, was updated on 2000-Aug-01 14:09
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: test suite incomplete (PR#1)
Details: Jitterbug-Id: 1
Submitted-By: guido@python.org
Date: Mon, 3 May 1999 17:31:27 -0400 (EDT)
Version: any
OS: any
Subject says it all. Not everything is tested.
====================================================================
Audit trail:
Mon May 03 18:01:53 1999 guido sent reply 1
Mon Jul 12 15:33:07 1999 guido moved from incoming to request
Mon Jul 12 19:09:04 1999 guido changed notes
Follow-Ups:
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Guido van Rossum
Subject: Re: test suite incomplete (PR#1)
Date: Mon May 3 18:01:53 1999
I know, I know...
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
Of course, it's not likely that this will ever by completely resolved... :-)
-------------------------------------------------------
Date: 2000-Aug-01 17:45
By: jhylton
Comment:
Thought you'd like to have this one assigned to you, Skip .
-------------------------------------------------------
Date: 2000-Aug-05 06:03
By: montanaro
Comment:
as if i didn't have enough to do... ;-)
maybe this is a good excuse to look at pyUnit. More tests
might get written with a more easily used testing framework.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110819&group_id=5470
From noreply@sourceforge.net Sat Aug 5 19:45:12 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sat, 5 Aug 2000 11:45:12 -0700
Subject: [Python-bugs-list] [Bug #110687] mailbox module's maildir class broken? (PR#414)
Message-ID: <200008051845.LAA24456@bush.i.sourceforge.net>
Bug #110687, was updated on 2000-Jul-31 14:14
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 3
Summary: mailbox module's maildir class broken? (PR#414)
Details: Jitterbug-Id: 414
Submitted-By: arb@anand.org
Date: Wed, 26 Jul 2000 12:23:32 -0400 (EDT)
Version: 1.5.2
OS: i386-Redhat-linux 6.2
I'm using the "mailbox" module that comes with python. I'm trying to use the
maildir class in there, but I think it's not following the maildir protocol
properly. The maildir protocol specifies that in a Maildir, a message file
can have any name that is unique, as long as it doesn't begin with a period.
However, the maildir class looks for valid message filenames, by checking to
see if the filename has more than 1 period in it, ie. consists of 3 or more
sections separated by periods. Typically, this is the sort of name one finds
in a Maildir, because the Maildir protocol page describes one simple way of
creating a unique filename, ie. by using the timestamp, pid of the writer, and
the hostname. However, when I insert messages into a maildir which don't follow
that system of generating unique filenames, the maildir class
of the module doesn't see them. Additioanlly, it _does_ see message files which
begin with a period, eg. .12345678.1234.hostname. This is also a violation of
the
maildir protocol. I believe that a maildir reader should simply look at all
files in a maildir, no matter what the name, except for those that begin with a
period.
====================================================================
Audit trail:
Wed Jul 26 18:15:33 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:02
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] mailbox module's maildir class broken? (PR#414)
Date: Wed, 26 Jul 2000 17:31:29 -0500
> I'm using the "mailbox" module that comes with python. I'm trying to
> use the maildir class in there, but I think it's not following the
> maildir protocol properly. The maildir protocol specifies that in a
> Maildir, a message file can have any name that is unique, as long as
> it doesn't begin with a period. However, the maildir class looks
> for valid message filenames, by checking to see if the filename has
> more than 1 period in it, ie. consists of 3 or more sections
> separated by periods. Typically, this is the sort of name one finds
> in a Maildir, because the Maildir protocol page describes one simple
> way of creating a unique filename, ie. by using the timestamp, pid
> of the writer, and the hostname. However, when I insert messages
> into a maildir which don't follow that system of generating unique
> filenames, the maildir class of the module doesn't see
> them. Additioanlly, it _does_ see message files which begin with a
> period, eg. .12345678.1234.hostname. This is also a violation of the
> maildir protocol. I believe that a maildir reader should simply look
> at all files in a maildir, no matter what the name, except for those
> that begin with a period.
You're probably right. I've never used that code, and according to
the logs it was contributed to Mike Meyer (no email known). Perhaps
you would be willing to create a patch? See
http://www.python.org/patches/ for submission guidelines.
--Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)
-------------------------------------------------------
Date: 2000-Aug-05 11:45
By: twouters
Comment:
This bug is still present. Fred is/was working on the 'mailbox' module, but I do not know whether he'll fix this, too. If not, I'll do it, it's not that big a chance.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110687&group_id=5470
From noreply@sourceforge.net Sat Aug 5 19:47:23 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sat, 5 Aug 2000 11:47:23 -0700
Subject: [Python-bugs-list] [Bug #110830] Syntax (PR#177)
Message-ID: <200008051847.LAA24580@bush.i.sourceforge.net>
Bug #110830, was updated on 2000-Aug-01 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Parser/Compiler
Status: Open
Resolution: Later
Bug Group: Feature Request
Priority: 1
Summary: Syntax (PR#177)
Details: Jitterbug-Id: 177
Submitted-By: simonb@logical.co.za
Date: Tue, 11 Jan 2000 05:17:37 -0500 (EST)
Version: 1-5-2
OS: NT 4.0
Hi there
I don't know if this is a bug, or is intentional behaviour for a specific
reason.
The following code produces a syntax error about the continue not being within a
looping structure rather than a prefectly silly infinite loop...
while 1:
try:
continue
except:
pass
where the following works as one would expect...
while 1:
try:
raise 1
except:
continue
I figure that there is more likely a sane reason for this behaviour than being a
bug, but I am curious.
Thanks
Simon
====================================================================
Audit trail:
Wed Jan 12 18:11:45 2000 guido changed notes
Wed Jan 12 18:11:45 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:12
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] Syntax (PR#177)
Date: Tue, 11 Jan 2000 12:10:17 -0500
[Simon Barratt, putting "continue" in a "try" block]
> I don't know if this is a bug, or is intentional behaviour
> for a specific reason.
Actually, it's a bit of both . See the Language Reference Manual's
section on the "continue" statement, particularly the footnote:
The restriction on occurring in the try clause is
implementer's laziness and will eventually be lifted.
It's been this way (and documented) forever; it's simply hard to implement
given the current structure of the interpreter loop.
Rest assured there's nothing *conceptually* wrong with putting continue in a
try! It's simply an implementation restriction; the error msg should
probably make that clearer. IIRC, JPython doesn't have this restriction.
"Someday" it will get repaired in CPython too.
-------------------------------------------------------
Date: 2000-Aug-01 14:12
By: none
Comment:
It's a zero-priority bug (i.e. not likely to be fixed).
-------------------------------------------------------
Date: 2000-Aug-03 13:00
By: twouters
Comment:
Like the bot said, low priority 'to be fixed' bug.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110830&group_id=5470
From noreply@sourceforge.net Sat Aug 5 19:50:43 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sat, 5 Aug 2000 11:50:43 -0700
Subject: [Python-bugs-list] [Bug #110924] exec unicodeobject doesn't work
Message-ID: <200008051850.LAA24619@bush.i.sourceforge.net>
Bug #110924, was updated on 2000-Aug-02 08:17
Here is a current snapshot of the bug.
Project: Python
Category: Parser/Compiler
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: exec unicodeobject doesn't work
Details: exec u"print 42"
doesn't work.
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110924&group_id=5470
From noreply@sourceforge.net Sat Aug 5 19:54:56 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sat, 5 Aug 2000 11:54:56 -0700
Subject: [Python-bugs-list] [Bug #110623] build on NeXTStep (PR#240)
Message-ID: <200008051854.LAA24756@bush.i.sourceforge.net>
Bug #110623, was updated on 2000-Jul-31 14:07
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: build on NeXTStep (PR#240)
Details: Jitterbug-Id: 240
Submitted-By: kragen@pobox.com (Kragen Sitaker)
Date: Fri, 17 Mar 2000 16:09:19 -0500 (EST)
Version: None
OS: None
I'm building Python on NeXTStep; I've encountered three minor problems.
- importdl.c by default on NeXTStep allows linking with Objective-C
modules, which is cool. Unfortunately, properly supporting this
requires adding -ObjC to the cc command line in the Makefile.
- posixmodule.c doesn't #include anything that declares fsync() and
doesn't declare it itself, but tries to reference it. Adding a
declaration of fsync() fixes the problem.
- test_strftime and test_time fail.
test test_strftime failed -- Writing: 'Conflict for %j (julian day (001-366)):', expected: ''
I suspect this may be a platform bug. Here's some of the output,
which is 696 lines in full:
strftime test for Fri Mar 17 12:53:20 2000
Strftime test, platform: next3_3, Python version: 1.5.2
Conflict for %j (julian day (001-366)):
Expected 077, but got 076
Conflict for nonstandard '%c' format (near-asctime() format):
Expected Fri Mar 17 12:53:20 2000, but got Fri Mar 17 12:53:20 2000
Conflict for nonstandard '%x' format (%m/%d/%y %H:%M:%S):
Expected 03/17/00, but got Fri Mar 17 2000
Does not appear to support '%Z' format (time zone name)
Conflict for nonstandard '%D' format (mm/dd/yy):
Expected 03/17/00, but got ?
Conflict for nonstandard '%e' format (day of month as number, blank padded ( 0-31)):
Expected 17, but got ?
Conflict for nonstandard '%h' format (abbreviated month name):
Expected Mar, but got ?
Conflict for nonstandard '%k' format (hour, blank padded ( 0-23)):
Expected 12, but got ?
Conflict for nonstandard '%n' format (newline character):
Expected
, but got ?
Conflict for nonstandard '%r' format (%I:%M:%S %p):
Expected 12:53:20 PM, but got ?
Conflict for nonstandard '%R' format (%H:%M):
Expected 12:53, but got ?
Conflict for nonstandard '%s' format (seconds since the Epoch in UCT):
Expected 953326400, but got ?
Conflict for nonstandard '%t' format (tab character):
Expected , but got ?
Conflict for nonstandard '%T' format (%H:%M:%S):
Expected 12:53:20, but got ?
Conflict for nonstandard '%3y' format (year without century rendered using fieldwidth):
Expected 000, but got ?y
Conflict for %j (julian day (001-366)):
Expected 327, but got 326
Conflict for %W (week number of the year (Mon 1st)):
Expected 46, but got 47
Conflict for %j (julian day (001-366)):
Expected 328, but got 327
Conflict for %j (julian day (001-366)):
Expected 329, but got 328
Conflict for %j (julian day (001-366)):
Expected 330, but got 329
test test_time failed -- Writing: 'time.mktime(time.localtime(t)) <> t', expected: ''
(and that was all of the output from test_time. Presumably this is
related to the strftime bugs --- perhaps the mythical Y2K leap-year bug?)
I'm afraid I'm not sure what version of NeXTStep I'm on. 'arch'
reports 'hppa'; 'cc --version' reports '2.5.8'; 'uname -a' reports
'Command not found'.
I'm not trying to build a very sophisticated environment --- just the
defaults.
--
Kragen Sitaker
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
The power didn't go out on 2000-01-01 either. :)
====================================================================
Audit trail:
Mon Apr 03 18:40:11 2000 guido changed notes
Mon Apr 03 18:40:11 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:07
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] build on NeXTStep (PR#240)
Date: Fri, 24 Mar 2000 10:05:14 -0500
> I'm building Python on NeXTStep; I've encountered three minor problems.
>
> - importdl.c by default on NeXTStep allows linking with Objective-C
> modules, which is cool. Unfortunately, properly supporting this
> requires adding -ObjC to the cc command line in the Makefile.
> - posixmodule.c doesn't #include anything that declares fsync() and
> doesn't declare it itself, but tries to reference it. Adding a
> declaration of fsync() fixes the problem.
> - test_strftime and test_time fail.
> test test_strftime failed -- Writing: 'Conflict for %j (julian day (001-366)):', expected: ''
> I suspect this may be a platform bug. Here's some of the output,
> which is 696 lines in full:
[...]
> (and that was all of the output from test_time. Presumably this is
> related to the strftime bugs --- perhaps the mythical Y2K leap-year bug?)
>
> I'm afraid I'm not sure what version of NeXTStep I'm on. 'arch'
> reports 'hppa'; 'cc --version' reports '2.5.8'; 'uname -a' reports
> 'Command not found'.
>
> I'm not trying to build a very sophisticated environment --- just the
> defaults.
Kragen,
Can you send us some patches? We don't have a NextStep system around
to test any of this, and your description of the problem doesn't help
me to create fixes that will certainly work for you.
There's probably not much you can do about the strftime problem --
just don't use time.strftime()! :-)
Please read python.org/patches for info on how to submit patches.
Thanks for contributing!
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:07
By: none
Comment:
From: kragen@pobox.com (Kragen Sitaker)
Subject: Re: [Python-bugs-list] build on NeXTStep (PR#240)
Date: Tue, 28 Mar 2000 12:46:18 -0500 (EST)
Guido writes:
> [Kragen wrote:]
> > I'm afraid I'm not sure what version of NeXTStep I'm on. 'arch'
> > reports 'hppa'; 'cc --version' reports '2.5.8'; 'uname -a' reports
> > 'Command not found'.
It's NeXTStep 3.3.
> Can you send us some patches? We don't have a NextStep system around
> to test any of this, and your description of the problem doesn't help
> me to create fixes that will certainly work for you.
I can send a patch for importdl.c; the right thing to do for this would
be to modify the Makefile to change the flags passed to the compiler to
include -ObjC, but I don't know how to do that. My solution was to
change a #define in the source to turn off the ability to import
Objective-C modules, which is obviously far from optimal --- thus my
failure to include a patch for this in the first email.
In posixmodule.c, which needs fsync() declared, I'm not sure where to
declare it. I can certainly supply a patch that works for NeXTStep
3.3, but I don't understand the rat's-nest of #ifdefs there well enough
to be sure it won't break compilation on some other platform, or even
another version of NeXTStep --- thus my failure to include a patch for
this in the first email.
So I can send patches for both of these, but I am not sure if I should.
> Please read python.org/patches for info on how to submit patches.
Thanks.
--
Kragen Sitaker
The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
The power didn't go out on 2000-01-01 either. :)
-------------------------------------------------------
Date: 2000-Jul-31 14:07
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] build on NeXTStep (PR#240)
Date: Tue, 28 Mar 2000 14:41:28 -0500
> It's NeXTStep 3.3.
>
> > Can you send us some patches? We don't have a NextStep system around
> > to test any of this, and your description of the problem doesn't help
> > me to create fixes that will certainly work for you.
>
> I can send a patch for importdl.c; the right thing to do for this would
> be to modify the Makefile to change the flags passed to the compiler to
> include -ObjC, but I don't know how to do that. My solution was to
> change a #define in the source to turn off the ability to import
> Objective-C modules, which is obviously far from optimal --- thus my
> failure to include a patch for this in the first email.
>
> In posixmodule.c, which needs fsync() declared, I'm not sure where to
> declare it. I can certainly supply a patch that works for NeXTStep
> 3.3, but I don't understand the rat's-nest of #ifdefs there well enough
> to be sure it won't break compilation on some other platform, or even
> another version of NeXTStep --- thus my failure to include a patch for
> this in the first email.
>
> So I can send patches for both of these, but I am not sure if I should.
Maybe we should just drop it? I don't think NextStep 3.3 has much
future or even much current use, does it? it's only supported for
historic reasons. If you get it to work, fine -- but I don't think
the general public would benefit much from adding NS 3.3 support...
Or am I wrong?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110623&group_id=5470
From noreply@sourceforge.net Sun Aug 6 11:12:53 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 03:12:53 -0700
Subject: [Python-bugs-list] [Bug #110619] urllib.py fails with username/password proxies (PR#221)
Message-ID: <200008061012.DAA10460@delerium.i.sourceforge.net>
Bug #110619, was updated on 2000-Jul-31 14:06
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: urllib.py fails with username/password proxies (PR#221)
Details: Jitterbug-Id: 221
Submitted-By: tarka@zip.com.au
Date: Tue, 29 Feb 2000 19:15:45 -0500 (EST)
Version: 1.5.2
OS: Irix
urllib.py fails to handle proxies with user and password information
included in the proxy URL, e.g. http://ssmith:testpass@10.11.12.13:1234
The following example ...
import os, urllib
os.environ['http_proxy'] = "http://ssmith:testpass01@10.11.12.13:1234"
f = urllib.urlopen('http://www.python.org')
data = f.read()
print data
fails with the following errors :
Traceback (innermost last):
File "url.py", line 3, in ?
f = urllib.urlopen('http://www.python.org')
File "/var/share//lib/python1.5/urllib.py", line 59, in urlopen
return _urlopener.open(url)
File "/var/share//lib/python1.5/urllib.py", line 157, in open
return getattr(self, name)(url)
File "/var/share//lib/python1.5/urllib.py", line 253, in open_http
h = httplib.HTTP(host)
File "/var/share//lib/python1.5/httplib.py", line 51, in __init__
if host: self.connect(host, port)
File "/var/share//lib/python1.5/httplib.py", line 75, in connect
raise socket.error, "nonnumeric port"
IOError: [Errno socket error] nonnumeric port
====================================================================
Audit trail:
Mon May 22 17:35:04 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110619&group_id=5470
From noreply@sourceforge.net Sun Aug 6 12:57:04 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 04:57:04 -0700
Subject: [Python-bugs-list] [Bug #110641] KeyboardInterrupt while waiting for sys.ps2 input kills interpreter (PR#309)
Message-ID: <200008061157.EAA23277@bush.i.sourceforge.net>
Bug #110641, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: KeyboardInterrupt while waiting for sys.ps2 input kills interpreter (PR#309)
Details: Jitterbug-Id: 309
Submitted-By: skip@mojam.com
Date: Fri, 28 Apr 2000 17:00:40 -0400 (EDT)
Version: 1.5.2, 1.6a2
OS: Linux
If you hit Ctrl-C while the Python interpreter is sitting at the ps2 prompt the
interpreter exits instead of returning you to the top-level prompt.
% python
Python 1.5.2+ (#12, Feb 17 2000, 14:52:05) [GCC pgcc-2.91.66 19990314
(egcs-1.1.2 release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
% PYTHONSTARTUP= ./python
Python 1.6a2 (#7, Apr 24 2000, 23:02:54) [GCC pgcc-2.91.66 19990314 (egcs-1.1.2
release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
When run under gdb's control, you can see what's happening:
% gdb ./python
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-mandrake-linux"...
(gdb) set env PYTHONSTARTUP ""
(gdb) run
Starting program: /home/beluga/skip/src/python/dist/src/./python
Python 1.6a2 (#7, Apr 24 2000, 23:02:54) [GCC pgcc-2.91.66 19990314 (egcs-1.1.2
release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
Program received signal SIGINT, Interrupt.
0x4013bf14 in __libc_read () from /lib/libc.so.6
(gdb) bt
#0 0x4013bf14 in __libc_read () from /lib/libc.so.6
(gdb) c
Continuing.
File "", line 2
^
SyntaxError: invalid syntax
>>>
It appears that SIGINT isn't handled properly when awaiting console input in
certain circumstances. If you can entice the program to continue, things work
okay. I don't know interrupt handling from a hole in the ground or I'd
investigate further. It is quite annoying, especially considering that
Python's input history isn't continuous across sessions...
Skip
====================================================================
Audit trail:
Mon May 22 17:23:42 2000 guido changed notes
Mon May 22 17:23:42 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:40
By: twouters
Comment:
This seems to be platform specific: On Linux, up-to-date CVS compile, this is reproducible. On BSDI 4.1, however, with an almost-up-to-date CVS compile, ^C doesn't exit the interpreter.
-------------------------------------------------------
Date: 2000-Aug-06 04:57
By: twouters
Comment:
Oh, and it's also definately readline-related. (without readline compiled in, the bug doesn't get triggered, in any case.)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110641&group_id=5470
From jerry@quotepool.com Sun Aug 6 15:13:39 2000
From: jerry@quotepool.com (jerry@quotepool.com)
Date: Sun, 6 Aug 2000 10:13:39 -0400 (EDT)
Subject: [Python-bugs-list] Will you choose the RED or BLUE pill? mfmhl (PR#426)
Message-ID: <20000806141339.1D1D31D03B@dinsdale.python.org>
93% WHO RESPOND TO MY AD DON'T MAKE THE CUT!
(Only highly motivated people should call)
I'm dead serious! Now let me tell you why...
Most people don't have drive! They sit around waiting for something to happen.
They see that other people have nice homes, new cars, and MONEY, but why can't they?
They basically feel sorry for themselves, and I can't help these people!
Another reason people are not qualified...
They are skeptical. BUT, the truth is, they are skeptical of themselves!
They don't have the courage to break their routine.
They are comfortable with their set hours, their set pay, and their set future.
I was not comfortable with someone controlling my future,
and I'm not comfortable working with people who are!
STOP
If you are anything like the above, we won't be able to work together!
WHAT DO THE 7% WHO DO MAKE THE CUT DISCOVER?!
People I select through an "interview like" process are forever changed!
They are opened to a world around them that they didn't know existed.
In fact, it's a world that has existed around them their whole lives,
but was purposely hidden from them!
How would you like to...
- Drastically reduce personal, business and capital gains taxes?
- Protect all assets from any form of seizure, liens, or judgments?
- Create a six figure income every 4 months?
How about...
Restoring and preserving complete personal and financial privacy?
Amassing personal wealth, multiplying it and protecting it?
Realizing a 3 to 6 times greater return on your money?
Legally making yourself and your assets completely judgment-proof,
lien-proof, divorce-proof, attorney-proof, IRS-proof?
I could go on...
TAKE A SERIOUS LOOK AT YOUR LIFE
Do you think you are paid what you are worth?
Will you be set to retire in the next few years?
Do you control the course of your day? ...your life?
The fact is we have many people in our enterprise that earn over 50K per month
from the privacy of their own homes, and are retiring in 2 to 3 years (wealthy)
and have total freedom - both personal and financial!
Many have been conditioned to believe it must be illegal, immoral or unethical
to ever earn any real profits from our efforts.
The sad truth is, it's been designed that way by the ultra-rich
and ultra-powerful since before any of us were born!
Who am I?
I'm a BIG thinker, a BIG dreamer, and I believe that I deserve the best that life has to offer.
I answered an ad much like the one you are reading now,
and was eager to hear what it was about.
I knew that I couldn't invest only a few bucks and spend an hour or two
per week to achieve the results I was looking for. I found the right information
and now I control my own destiny!
If you are interested in radically changing your thoughts and your financial future,
I invite you to call TOLL FREE:
1 800 707 4817
My name is Krystina, and I look forward to working with some of you!
* REMEMBER *
I can't do it for you, but I can show you exactly how I do it.
It's as simple as that!
From noreply@sourceforge.net Sun Aug 6 17:39:44 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 09:39:44 -0700
Subject: [Python-bugs-list] [Bug #110693] 3 failed tests after install (PR#119)
Message-ID: <200008061639.JAA31406@bush.i.sourceforge.net>
Bug #110693, was updated on 2000-Jul-31 14:28
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Closed
Resolution: Wont Fix
Bug Group: Platform-specific
Priority: 5
Summary: 3 failed tests after install (PR#119)
Details: Jitterbug-Id: 119
Submitted-By: jsb@brodkey.com
Date: Tue, 26 Oct 1999 21:37:22 -0400 (EDT)
Version: 1.52
OS: Mandrake 6.1
test_long output:
long / * % divmod
long bit-operation identities
long str/hex/oct/atol
long miscellaneous operations
Traceback (innermost last):
File "/home/jerry/python/Python-1.5.2/Lib/test/test_long.py", line 251, in ?
test_misc()
File "/home/jerry/python/Python-1.5.2/Lib/test/test_long.py", line 225, in
test_misc
raise TestFailed, "int(long(-sys.maxint-1)) overflowed!"
test_support -- test failed: int(long(-sys.maxint-1)) overflowed!
test_socket output:
socket.error
Traceback (innermost last):
File "/home/jerry/python/Python-1.5.2/Lib/test/test_socket.py", line 71, in ?
ip = socket.gethostbyname(hostname)
socket.error: host not found
test_types output:
6. Built-in types
6.1 Truth value testing
6.2 Boolean operations
6.3 Comparisons
6.4 Numeric types (mostly conversions)
6.4.1 32-bit integers
6.4.2 Long integers
Traceback (innermost last):
File "/home/jerry/python/Python-1.5.2/Lib/test/test_types.py", line 89, in ?
if int(long(x)) != x: raise TestFailed, 'long op'
OverflowError: long int too long to convert
====================================================================
Audit trail:
Thu Oct 28 18:55:27 1999 guido changed notes
Thu Oct 28 18:55:27 1999 guido moved from incoming to platformbug
Follow-Ups:
Date: 2000-Aug-01 14:02
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] 3 failed tests after install (PR#119)
Date: Tue, 26 Oct 1999 22:34:23 -0400
There's no reason to submit this as a bug report yet -- most likely
this is a platform bug.
> Full_Name: jerald s brodkey
> Version: 1.52
> OS: Mandrake 6.1
> Submission from: dyn1-tnt1-120.cleveland.oh.ameritech.net (199.179.175.120)
>
> test_long output:
> long / * % divmod
> long bit-operation identities
> long str/hex/oct/atol
> long miscellaneous operations
> Traceback (innermost last):
> File "/home/jerry/python/Python-1.5.2/Lib/test/test_long.py", line 251, in ?
> test_misc()
> File "/home/jerry/python/Python-1.5.2/Lib/test/test_long.py", line 225, in
> test_misc
> raise TestFailed, "int(long(-sys.maxint-1)) overflowed!"
> test_support -- test failed: int(long(-sys.maxint-1)) overflowed!
Hm. Strange. Can you enter Python interactively and try to print the
values of these expressions?
sys.maxint
-sys.maxint-1
long(-sys.maxint-1)
int(long(-sys.maxint-1))
Please save the session and mail to me.
> test_socket output:
> socket.error
> Traceback (innermost last):
> File "/home/jerry/python/Python-1.5.2/Lib/test/test_socket.py", line 71, in ?
> ip = socket.gethostbyname(hostname)
> socket.error: host not found
This is common if your internet configuration doesn't have a DNS
setup; you can ignore it.
> test_types output:
> 6. Built-in types
> 6.1 Truth value testing
> 6.2 Boolean operations
> 6.3 Comparisons
> 6.4 Numeric types (mostly conversions)
> 6.4.1 32-bit integers
> 6.4.2 Long integers
> Traceback (innermost last):
> File "/home/jerry/python/Python-1.5.2/Lib/test/test_types.py", line 89, in ?
> if int(long(x)) != x: raise TestFailed, 'long op'
> OverflowError: long int too long to convert
Looks like the same one you had before.
What kind of hardware are you using? I wonder if there's some kind of
mismatch between the compiler and the hardware for certain long
integer or floating point ops.
Did you build this Python yourself or are you running the tests on a
binary that came with the OS? (Doesn't Mandrake come with Python? I
know Red Hat does!)
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:02
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] 3 failed tests after install (PR#119)
Date: Wed, 27 Oct 1999 00:53:49 -0400
> Full_Name: jerald s brodkey
> Version: 1.52
> OS: Mandrake 6.1
> Submission from: dyn1-tnt1-120.cleveland.oh.ameritech.net
> (199.179.175.120)
What kind of CPU?
> test_support -- test failed: int(long(-sys.maxint-1)) overflowed!
Last time I saw this it was eventually traced to a compiler optimization
bug, on an Intel platform running some flavor of Unix. If you recompile
Python with optimization turned off, and the problem goes away, it's almost
certainly the same problem. DejaNews can be used in that case to track down
the details.
-------------------------------------------------------
Date: 2000-Aug-01 14:02
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] 3 failed tests after install (PR#119)
Date: Wed, 27 Oct 1999 23:22:38 -0400
[Jerald s brodkey [mailto:jsb@brodkey.com]]
> Thanks for the answer. I recompiled it without optimization and
> now and now all tests passed except test_socket which is to be expected.
OK! See
http://www.deja.com/getdoc.xp?AN=503937876
for a thread about the cause and the cure (it's a known compiler bug).
> However:
>
> Guido also sent an answer and asked if I would run the following
> interactively:
> sys.maxint
> -sys.maxint-1
> long(-sys.maxint-1)
> int(long(-sys.maxint-1))
>
> I did that on the system compiled with optimization as well as the new one
> without.
>
> All give same output:
> Traceback (innermost last):
> File"" line 1, in ?
> NameError: sys
>
> I gather this is a problem?
Na, it just appears you've never used Python before. Spend a little time
reading the tutorial -- you'll like it! What Guido didn't tell you (because
any Python programmer would know this) is that you first need to enter the
line
import sys
Until you do that, the name "sys" doesn't mean anything to Python, and
that's why you're getting the NameError exceptions. See the thread
referenced above for the kind of output you *should* see when you enter
this.
-------------------------------------------------------
Date: 2000-Aug-01 14:02
By: none
Comment:
This is caused by an optimizer bug
(maybe for a particular CPU).
-------------------------------------------------------
Date: 2000-Aug-06 09:39
By: twouters
Comment:
Compiler optimizer bugs, probably fixed in recent Mandrake (because they stopped using pgcc, IIRC.)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110693&group_id=5470
From noreply@sourceforge.net Sun Aug 6 17:42:24 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 09:42:24 -0700
Subject: [Python-bugs-list] [Bug #110700] strftime crashes with invalid args (PR#183)
Message-ID: <200008061642.JAA31528@bush.i.sourceforge.net>
Bug #110700, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Closed
Resolution: Wont Fix
Bug Group: Platform-specific
Priority: 5
Summary: strftime crashes with invalid args (PR#183)
Details: Jitterbug-Id: 183
Submitted-By: calvin@cs.uni-sb.de
Date: Thu, 13 Jan 2000 11:00:38 -0500 (EST)
Version: 1.5.2
OS: Linux (Debian slink)
test.py:
import time
# crash it by swapping year and month argument
print time.strftime("%d.%m.%Y %H:%M:%S", (1,2000, 1, 0, 0, 0, 0, 1, 0))
python test.py
Segmentation fault
Well there were similar crashes with time.strptime calls. I think this
is a platform bug with the C function strftime, but I did not test this
in a C program.
====================================================================
Audit trail:
Thu Jan 13 11:04:15 2000 guido changed notes
Thu Jan 13 11:04:16 2000 guido moved from incoming to platformbug
Follow-Ups:
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] strftime crashes with invalid args (PR#183)
Date: Thu, 13 Jan 2000 11:03:50 -0500
> Full_Name: Bastian Kleineidam
> Version: 1.5.2
> OS: Linux (Debian slink)
> Submission from: www-proxy.rz.uni-sb.de (134.96.7.81)
>
>
> test.py:
> import time
> # crash it by swapping year and month argument
> print time.strftime("%d.%m.%Y %H:%M:%S", (1,2000, 1, 0, 0, 0, 0, 1, 0))
>
> python test.py
> Segmentation fault
>
> Well there were similar crashes with time.strptime calls. I think this
> is a platform bug with the C function strftime, but I did not test this
> in a C program.
Yes, this is a platform bug. Please report it to the C library folks
(sorry, I can't do that for you).
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Bastian Kleineidam
Subject: Re: [Python-bugs-list] strftime crashes with invalid args (PR#183)
Date: Thu, 13 Jan 2000 18:37:14 +0100 (CET)
[snip bug report]
:) Yes, this is a platform bug. Please report it to the C library folks
:) (sorry, I can't do that for you).
Ok, did it.
So the safe side is to check the arguments before calling time.strftime()
Bastian Kleineidam
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Bastian Kleineidam
Subject: Re: [Python-bugs-list] strftime crashes with invalid args (PR#183)
Date: Thu, 13 Jan 2000 19:39:52 +0100 (CET)
:) Yes, this is a platform bug. Please report it to the C library folks
:) (sorry, I can't do that for you).
I got answer from Andreas Jaeger that this bug is fixed with the current
glibc version 2.1.2.
Bastian Kleineidam
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
The Linux C library code has a long way to go...
-------------------------------------------------------
Date: 2000-Aug-06 09:42
By: twouters
Comment:
Caused by a (by now fixed) bug in GNU libc, not one in Python, therefor closed the bug report.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110700&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:03:43 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:03:43 -0700
Subject: [Python-bugs-list] [Bug #110820] Jonathan Craft: Possible to-do addition (PR#116)
Message-ID: <200008061703.KAA32196@bush.i.sourceforge.net>
Bug #110820, was updated on 2000-Aug-01 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Jonathan Craft: Possible to-do addition (PR#116)
Details: Jitterbug-Id: 116
Submitted-By: Guido van Rossum
Date: Mon, 25 Oct 1999 10:38:58 -0400
Version: None
OS: None
A worthy to-do item.
------- Forwarded Message
Date: Sat, 23 Oct 1999 08:24:32 -0000
From: Jonathan Craft
To: guido@python.org
Subject: Possible to-do addition
Hi Guido,
Is there a visual interface builder (as in VBasic, Hypercard, Icon)
for Tkinter? I haven't been able to find any information on it (I'm
new to Python). If not, that would be a good to-do.
Jonathan Craft mailto:jcchina@bigfoot.com
------- End of Forwarded Message
====================================================================
Audit trail:
Mon Oct 25 15:13:11 1999 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-06 10:03
By: twouters
Comment:
I believe several people are working on something like this (or at least said they were... they might have quit in despair :-) I'm not sure if this belongs on the Python buglist, though.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110820&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:05:59 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:05:59 -0700
Subject: [Python-bugs-list] [Bug #110629] Tkinter Image names may be reused (PR#28)
Message-ID: <200008061705.KAA32229@bush.i.sourceforge.net>
Bug #110629, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Tkinter Image names may be reused (PR#28)
Details: Jitterbug-Id: 28
Submitted-By: guido@python.org
Date: Wed, 14 Jul 1999 14:00:14 -0400 (EDT)
Version: 1.5.2b
OS:
Mark Lutz wrote me:
(BTW, this will probably never surface again (I'm stressing
the image object a bit), but I think there's a problem
with using the id() of an image as its name. I ran into
a situation where an image was drawn in the wrong place,
because a newly allocated image object had the same id()
as one very recently reclaimed. It's very obscure, will
only happen if you have > 1 canvas in a process and happen
to be creating and deleting images very quickly, and is
too complex for me to describe further at the moment ;-).
I worked around it by first generating image names from a
simple counter, and then prebuilding all images up front.)
====================================================================
Audit trail:
Wed Jul 14 14:00:28 1999 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110629&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:11:17 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:11:17 -0700
Subject: [Python-bugs-list] [Bug #110822] TCL_LIBRARY variable for win32 (PR#130)
Message-ID: <200008061711.KAA32386@bush.i.sourceforge.net>
Bug #110822, was updated on 2000-Aug-01 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 4
Summary: TCL_LIBRARY variable for win32 (PR#130)
Details: Jitterbug-Id: 130
Submitted-By: grant.griffin@alliedsignal.com
Date: Mon, 15 Nov 1999 15:26:44 -0500 (EST)
Version: 1.5.2
OS: Windows NT 4.0
I would like to suggest that the "TCL_LIBRARY" variable be automatically set by
the Win32 installer program. Currently, this is a manual process. It can be
frustrating for the user because when he tries to run a Tkinter program, it says
"cannot find tcl80.dll...". (I was able to figure out the solution here only by
digging through comp.lang.python in Deja.)
Therefore, I recommend the installer be changed as follows:
1) Do TCL installation before Python, not after.
2) Somehow figure out what the value of TCL_LIBRARY should be as a function of
the directory that the user had installed TCL in.
3) Automatically write the proper value of TCL_LIBRARY into the Windows
registry.
Alternatively, you could just add a prompt like "In order to use TCL with
Python, you must set the 'TCL_LIBRARY' environment variable to point to the
directory where tcl80.dll is installed."
Anyway, thanks, guys--keep up the GREAT work!
-Grant
====================================================================
Audit trail:
Tue Nov 16 13:58:27 1999 guido changed notes
Tue Nov 16 13:58:27 1999 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] TCL_LIBRARY variable for win32 (PR#130)
Date: Mon, 15 Nov 1999 15:35:20 -0500
> I would like to suggest that the "TCL_LIBRARY" variable be automatically set by
> the Win32 installer program. Currently, this is a manual process. It can be
> frustrating for the user because when he tries to run a Tkinter program, it says
> "cannot find tcl80.dll...". (I was able to figure out the solution here only by
> digging through comp.lang.python in Deja.)
>
> Therefore, I recommend the installer be changed as follows:
>
> 1) Do TCL installation before Python, not after.
> 2) Somehow figure out what the value of TCL_LIBRARY should be as a function of
> the directory that the user had installed TCL in.
> 3) Automatically write the proper value of TCL_LIBRARY into the Windows
> registry.
>
> Alternatively, you could just add a prompt like "In order to use TCL with
> Python, you must set the 'TCL_LIBRARY' environment variable to point to the
> directory where tcl80.dll is installed."
>
> Anyway, thanks, guys--keep up the GREAT work!
Thanks for the suggestion. The problem is that on Windows 95/98, the
environment is not kept in the registry! Editing autoexec.bat has
been suggested but is too error-prone.
But we will definitely revisit this problem again with the next
release (not due until late 2000); the best solution we can think of
is to integrate the Tcl files in the Python installation instead of
running the Tcl installer; this way we can be sure that Tcl is always
in the same directory as Python.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
We will try to fgix this for Python 1.6.
-------------------------------------------------------
Date: 2000-Aug-06 10:11
By: twouters
Comment:
Partly (or completely ?) resolved by including Tcl/Tk in the Python Installer for Windows.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110822&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:17:54 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:17:54 -0700
Subject: [Python-bugs-list] [Bug #110637] ihooks on windows and pythoncom (PR#294)
Message-ID: <200008061717.KAA32670@bush.i.sourceforge.net>
Bug #110637, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: ihooks on windows and pythoncom (PR#294)
Details: Jitterbug-Id: 294
Submitted-By: mak@mikroplan.com.pl
Date: Thu, 13 Apr 2000 04:09:35 -0400 (EDT)
Version: cvs
OS: windows
Hi,
Python module ihooks is not so compatible with builtin imp while importing
modules whose name is stored in registry eg. pythoncom/pywintypes.
import ihooks
ihooks.install()
import pythoncom
This code will fail inside pythonwin ide too !
====================================================================
Audit trail:
Tue Jul 11 08:29:17 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110637&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:23:37 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:23:37 -0700
Subject: [Python-bugs-list] [Bug #110829] REQ: array module should provide "swap to native byte order" functionality, similar to struct module (PR#166)
Message-ID: <200008061723.KAA00374@bush.i.sourceforge.net>
Bug #110829, was updated on 2000-Aug-01 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: REQ: array module should provide "swap to native byte order" functionality, similar to struct module (PR#166)
Details: Jitterbug-Id: 166
Submitted-By: aa8vb@ipass.net
Date: Wed, 22 Dec 1999 07:57:58 -0500 (EST)
Version: 1.5.2
OS: Irix
In implementing a Python reader for VPF GIS data, I noticed that the struct
module makes it very easy to read in data that may be in a different byte
order than the local machine:
val = struct.unpack( "" byte order prefixes used
in the struct module were added to the array module.
Thanks,
Randall
====================================================================
Audit trail:
Wed Jan 12 18:16:54 2000 guido changed notes
Wed Jan 12 18:16:54 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:12
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] REQ: array module should provide "swap to native byte order" functionality, similar to struct module (PR#166)
Date: Wed, 22 Dec 1999 09:30:21 -0500
> In implementing a Python reader for VPF GIS data, I noticed that the struct
> module makes it very easy to read in data that may be in a different byte
> order than the local machine:
>
> val = struct.unpack( "
> This parses from a little-endian file/buffer, and swaps bytes "if needed" to
> the endianness of the local machine.
>
> However, using the array module is not so convenient. The developer has to
> write code to sense the byte order of the local machine, and tell the
> array module whether or not to swap bytes. I.e. there is no
> "swap to native byte order" functionality:
>
> def _IsByteSwapNeeded( file_byte_order ):
> """ The array module doesn't do byte swapping to the native byte order.
> So we have to get under the hood and check it ourselves.
> """
> def host_endian():
> if ord( array.array( "i", [1] ).tostring()[ 0 ] ): return 'L'
> else: return 'M'
(I presume 'L' is little-endian, but what does 'M' stand for?)
> assert file_byte_order in 'LM'
> return ( host_endian() != file_byte_order )
>
> a = array.array( "l", buf )
> if _IsByteSwapNeeded( 'L' ):
> a.byteswap()
> val = a.tolist()
>
>
> The reason for using the array module (versus the struct module with
> repeat counts) is for more efficient memory storage and access of large
> numbers of lists containing large numbers of coordinates. struct insists
> on converting everything at once, and the length must be exactly right.
> array provides direct access to the any element of slice of a list so it
> is my preferred choice.
>
> It would be useful if the "<" and ">" byte order prefixes used
> in the struct module were added to the array module.
You're right that this is more work than it should be.
However I don't think that adding '<' to the format string is the
right solution -- the format string declares the format of the data in
the array, not how it should be converted from elsewhere. (The array
module has other uses besides I/O of binary data.)
I can see several solutions:
- Add a byte order indicator to some standard module (e.g. the array
module, or the sys module) so you can write
a = array.array("l", buf)
if sys.byte_order == 'big':
a.byteswap()
- Add a byte order flag to all the array methods that add raw data to
the array object (constructor, fromfile(), fromstring(); and for
symmetry also to the methods that write raw data out (tofile(),
tostring()). A problem with tofile() is that in order to do the
byteswap we'd either have to allocate temporary memory or byteswap in
place, and then byteswap back after writing.
I vote for the byte order indicator, giving total control to the user.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:12
By: none
Comment:
From: "Fred L. Drake, Jr."
Subject: Re: [Python-bugs-list] REQ: array module should provide "swap to native byte order" functionality, similar to struct module (PR#166)
Date: Wed, 22 Dec 1999 10:43:32 -0500 (EST)
guido@cnri.reston.va.us writes:
> I vote for the byte order indicator, giving total control to the user.
I agree, but I'd also like to see an indicator for the native byte
order somewhere (like sys) as well. (How possible would this be for
JPython, Barry?)
-Fred
--
Fred L. Drake, Jr.
Corporation for National Research Initiatives
-------------------------------------------------------
Date: 2000-Aug-01 14:12
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] REQ: array module should provide "swap to native byte order" functionality, similar to struct module (PR#166)
Date: Wed, 22 Dec 1999 11:45:34 -0500
> guido@cnri.reston.va.us writes:
> > I vote for the byte order indicator, giving total control to the user.
>
> I agree, but I'd also like to see an indicator for the native byte
> order somewhere (like sys) as well. (How possible would this be for
> JPython, Barry?)
Ack! I was ambiguous! I meant to see a native byte order somewhere!
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:12
By: none
Comment:
From: "Barry A. Warsaw"
Subject: Re: [Python-bugs-list] REQ: array module should provide "swap to native byte order" functionality, similar to struct module (PR#166)
Date: Wed, 22 Dec 1999 11:59:07 -0500 (EST)
>>>>> "Fred" == writes:
Fred> I agree, but I'd also like to see an indicator for the
Fred> native byte order somewhere (like sys) as well. (How
Fred> possible would this be for JPython, Barry?)
Java's native format is bigendian, regardless of the system's
underlying endian-ness. I'm not aware of any way of figuring out what
the system's endian-ness is.
-Barry
-------------------------------------------------------
Date: 2000-Aug-01 14:12
By: none
Comment:
From: Randall Hopper
Subject: Re: [Python-bugs-list] REQ: array module should provide "swap to native byte order" functionality, similar to struct module (PR#166)
Date: Thu, 30 Dec 1999 19:19:09 -0500
Guido van Rossum:
|Randall Hopper:
|> However, using the array module is not so convenient. The developer has to
|> write code to sense the byte order of the local machine, and tell the
|> array module whether or not to swap bytes. I.e. there is no
|> "swap to native byte order" functionality:
|>
|> def _IsByteSwapNeeded( file_byte_order ):
|> """ The array module doesn't do byte swapping to the native byte order.
|> So we have to get under the hood and check it ourselves.
|> """
|> def host_endian():
|> if ord( array.array( "i", [1] ).tostring()[ 0 ] ): return 'L'
|> else: return 'M'
|
|(I presume 'L' is little-endian, but what does 'M' stand for?)
L/M - LSB/MSB - [L]east/[M]ost Significant Byte First
though:
L/B - [L]ittle/[B]ig Endian
might have been more intuitive.
|However I don't think that adding '<' to the format string is the
|right solution -- the format string declares the format of the data in
|the array, not how it should be converted from elsewhere. (The array
|module has other uses besides I/O of binary data.)
...
|I can see several solutions:
|- Add a byte order indicator to some standard module (e.g. the array
| module, or the sys module) so you can write a = array.array("l", buf) if
| sys.byte_order == 'big': a.byteswap()
|- Add a byte order flag to all the array methods that add raw data to
| the array object (constructor, fromfile(), fromstring(); and for
| symmetry also to the methods that write raw data out (tofile(),
| tostring()). A problem with tofile() is that in order to do the
| byteswap we'd either have to allocate temporary memory or byteswap in
| place, and then byteswap back after writing.
Having considered this again from what you've said, I agree that a byte
order indicator would probably be better for the array case.
I see your point: temporary buffers for reads or writes would be needed
since array is a type used for storage whereas struct is not. A byte order
indicator leads to more user code in doing the byte swapping and is
inconsistent with struct's, but it does avoid all (potentially large)
temporary buffer generation whether byte swapping is needed or not, which
is important.
Thanks,
Randall
-------------------------------------------------------
Date: 2000-Aug-01 14:12
By: none
Comment:
Actually, all we need is a simpler way to discover the native byte order.
A flag in the struct module would do just fine.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110829&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:34:16 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:34:16 -0700
Subject: [Python-bugs-list] [Bug #110822] TCL_LIBRARY variable for win32 (PR#130)
Message-ID: <200008061734.KAA00671@bush.i.sourceforge.net>
Bug #110822, was updated on 2000-Aug-01 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Fixed
Bug Group: Feature Request
Priority: 4
Summary: TCL_LIBRARY variable for win32 (PR#130)
Details: Jitterbug-Id: 130
Submitted-By: grant.griffin@alliedsignal.com
Date: Mon, 15 Nov 1999 15:26:44 -0500 (EST)
Version: 1.5.2
OS: Windows NT 4.0
I would like to suggest that the "TCL_LIBRARY" variable be automatically set by
the Win32 installer program. Currently, this is a manual process. It can be
frustrating for the user because when he tries to run a Tkinter program, it says
"cannot find tcl80.dll...". (I was able to figure out the solution here only by
digging through comp.lang.python in Deja.)
Therefore, I recommend the installer be changed as follows:
1) Do TCL installation before Python, not after.
2) Somehow figure out what the value of TCL_LIBRARY should be as a function of
the directory that the user had installed TCL in.
3) Automatically write the proper value of TCL_LIBRARY into the Windows
registry.
Alternatively, you could just add a prompt like "In order to use TCL with
Python, you must set the 'TCL_LIBRARY' environment variable to point to the
directory where tcl80.dll is installed."
Anyway, thanks, guys--keep up the GREAT work!
-Grant
====================================================================
Audit trail:
Tue Nov 16 13:58:27 1999 guido changed notes
Tue Nov 16 13:58:27 1999 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] TCL_LIBRARY variable for win32 (PR#130)
Date: Mon, 15 Nov 1999 15:35:20 -0500
> I would like to suggest that the "TCL_LIBRARY" variable be automatically set by
> the Win32 installer program. Currently, this is a manual process. It can be
> frustrating for the user because when he tries to run a Tkinter program, it says
> "cannot find tcl80.dll...". (I was able to figure out the solution here only by
> digging through comp.lang.python in Deja.)
>
> Therefore, I recommend the installer be changed as follows:
>
> 1) Do TCL installation before Python, not after.
> 2) Somehow figure out what the value of TCL_LIBRARY should be as a function of
> the directory that the user had installed TCL in.
> 3) Automatically write the proper value of TCL_LIBRARY into the Windows
> registry.
>
> Alternatively, you could just add a prompt like "In order to use TCL with
> Python, you must set the 'TCL_LIBRARY' environment variable to point to the
> directory where tcl80.dll is installed."
>
> Anyway, thanks, guys--keep up the GREAT work!
Thanks for the suggestion. The problem is that on Windows 95/98, the
environment is not kept in the registry! Editing autoexec.bat has
been suggested but is too error-prone.
But we will definitely revisit this problem again with the next
release (not due until late 2000); the best solution we can think of
is to integrate the Tcl files in the Python installation instead of
running the Tcl installer; this way we can be sure that Tcl is always
in the same directory as Python.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
We will try to fgix this for Python 1.6.
-------------------------------------------------------
Date: 2000-Aug-06 10:11
By: twouters
Comment:
Partly (or completely ?) resolved by including Tcl/Tk in the Python Installer for Windows.
-------------------------------------------------------
Date: 2000-Aug-06 10:34
By: gvanrossum
Comment:
Yes, this is fixed in the 1.6 windows installation (through a helper module FixTk.py which is imported by importing Tkinter).
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110822&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:39:50 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:39:50 -0700
Subject: [Python-bugs-list] [Bug #110669] Tkinter: widget.bind('sequence') incorrect (PR#368)
Message-ID: <200008061739.KAA00839@bush.i.sourceforge.net>
Bug #110669, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Wont Fix
Bug Group: Not a Bug
Priority: 5
Summary: Tkinter: widget.bind('sequence') incorrect (PR#368)
Details: Jitterbug-Id: 368
Submitted-By: rozen@rgv.hp.com
Date: Fri, 23 Jun 2000 15:31:19 -0400 (EDT)
Version: 1.5.2
OS: Linux
With Tcl/Tk, bind tag sequence returns the string which is the command.
With Python, widget.bind('sequence') seems to return a reference to the
command not the command.
The following reproduces the problem on my machine. Try running the file
and observe the print output. Pretty strange.
#! /usr/bin/env python
from Tkinter import *
root = Tk()
def init():
pass
def greeting(str):
import Dialog
Dialog.Dialog(title="greetings",
text=str,
bitmap="",default=0,strings=("cont",))
class New_Toplevel_1:
def __init__(self, master=None):
self.ent17 = Entry (master)
self.ent17.place(in_=master,x=45,y=50)
self.ent17.configure(background="plum")
self.ent17.configure(font="helvetica 14 bold")
self.ent17.configure(foreground="black")
self.ent17.configure(insertbackground="black")
self.ent17.configure(selectbackground="black")
self.ent17.configure(selectforeground="ivory")
self.hello = StringVar()
self.ent17.configure(textvariable=self.hello)
self.ent17.configure(width="35")
self.ent17.bind('q',lambda e: greeting('q'))
x = self.ent17.bind()
print 'x =', x
x = self.ent17.bind('q')
print 'x =', x
# I expected x to be "lambda e: greeting('q')"
# I actually got the following
# x = set _tkinter_break [135926416 %# %b %f %h %k %s %t %w %x %y %A %E
%K %N %W %T %X %Y]
# if {"$_tkinter_break" == "break"} break
def vp_start_gui():
global w
root.title('New_Toplevel_1')
root.geometry('500x200+216+41')
root.configure(bg='wheat')
w = New_Toplevel_1 (root)
root.mainloop()
if __name__ == '__main__':
vp_start_gui()
====================================================================
Audit trail:
Tue Jul 11 08:24:20 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Tkinter: widget.bind('sequence') incorrect (PR#368)
Date: Fri, 23 Jun 2000 15:46:04 -0500
> With Tcl/Tk, bind tag sequence returns the string which is the command.
> With Python, widget.bind('sequence') seems to return a reference to the
> command not the command.
>
> The following reproduces the problem on my machine. Try running the file
> and observe the print output. Pretty strange.
The string returned is in fact the command bound -- this is a wrapper
function. Since (typically) the argument to bind is a Python
function, not a Tcl command, a wrapper is used to pass the event data
to the Python function.
This doesn't qualify as a bug -- it's just different.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-06 10:39
By: twouters
Comment:
Like Guido said, not a bug, just different.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110669&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:53:34 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:53:34 -0700
Subject: [Python-bugs-list] [Bug #110708] bug in time.sleep (PR#64)
Message-ID: <200008061753.KAA01324@bush.i.sourceforge.net>
Bug #110708, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: bug in time.sleep (PR#64)
Details: Jitterbug-Id: 64
Submitted-By: ddula@atl.mediaone.net
Date: Wed, 25 Aug 1999 14:02:51 -0400 (EDT)
Version: 152c1
OS: Debian Alpha Linux (potato) 2.2.1
This is a interesting bug that seems to have started after I upgraded to debian
potato from slink.
It must be a library related bug but this report might help somebody
troubleshoot.
At first I thought it was a bug in threading because it prevented the solaris
hack sleep from returning
thus my thread.start() never returned.
But further digging show that
import time
time.sleep(0.1) # will always hang on on this platform
Work around is to always sleep at least one second - I will do some more looking
at the time class when I get a chance.
Dave Dula
====================================================================
Audit trail:
Mon Aug 30 12:35:54 1999 guido moved from incoming to platformbug
Mon Aug 30 12:36:15 1999 guido changed notes
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110708&group_id=5470
From noreply@sourceforge.net Sun Aug 6 18:54:55 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 10:54:55 -0700
Subject: [Python-bugs-list] [Bug #110631] Debugger (win and idle) (PR#283)
Message-ID: <200008061754.KAA01342@bush.i.sourceforge.net>
Bug #110631, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Debugger (win and idle) (PR#283)
Details: Jitterbug-Id: 283
Submitted-By: musingattheruins@yahoo.com
Date: Mon, 10 Apr 2000 12:30:44 -0400 (EDT)
Version: 1.5.2
OS: Win32
The python debugger (both Idle and PythonWin) does not undertand packages. Can
run scripts from the command line that cannot be run in the debugger...
Create package 'Test' in the directory "My Modules", add an __init__.py (empty)
to the directory "My modules\Test", create file testfile.py with the
contents...
class TheTest:
def __init__(self):
self.i = 1
def go(self):
return self.i
Add the path to the Python path with the following file (test.reg)...
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\PythonPath\TheTest]
@="C:\\My modules"
then try the following at the python prompt:
import Test.testfile
j = Test.testfile.TheTest()
k = j.go
runs fine right? Yes it does, now step through it in the debugger and you
get...
import Test.testfile
j = Test.testfile.TheTest() #exception: attribute 'TheTest'
k = j.go
Does not appear to be realted to the class (you can change it to a 'function in
a module' instead of a 'method in a class in a module' and you get the a similar
result.)
Debugger does not understand packages.
====================================================================
Audit trail:
Tue Jul 11 08:29:15 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110631&group_id=5470
From noreply@sourceforge.net Sun Aug 6 19:36:15 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 11:36:15 -0700
Subject: [Python-bugs-list] [Bug #111203] 1.6b1 build (docs?) pyexpat problem on Windows
Message-ID: <200008061836.LAA27908@delerium.i.sourceforge.net>
Bug #111203, was updated on 2000-Aug-06 11:36
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: 1.6b1 build (docs?) pyexpat problem on Windows
Details: pyexpat is not documented as one of those subprojects needing external software, but apparently it is one; it needs xmlparse and xmltok, .h and .lib to build and .dll
to run. The docs don't mention where to get those from,
but I had them around (from a Perl site build...) and
feeding them to the Python 1.6b1 build fixed it. So I
think it's just a doc-bug.
Alex
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111203&group_id=5470
From noreply@sourceforge.net Sun Aug 6 19:42:14 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 11:42:14 -0700
Subject: [Python-bugs-list] [Bug #111204] 1.6b1 test_winreg tries importing wrong module
Message-ID: <200008061842.LAA28074@delerium.i.sourceforge.net>
Bug #111204, was updated on 2000-Aug-06 11:42
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: 1.6b1 test_winreg tries importing wrong module
Details: test_winreg.py has an
import winreg
which fails since no such module exists. Changing to:
import _winreg
lets the test succeed fully. Should the module be
build as winreg, or is it a bug in test_winreg.py?
Alex
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111204&group_id=5470
From noreply@sourceforge.net Sun Aug 6 20:21:24 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 12:21:24 -0700
Subject: [Python-bugs-list] [Bug #110677] PRIVATE: various minor Tkinter things (PR#388)
Message-ID: <200008061921.MAA29341@delerium.i.sourceforge.net>
Bug #110677, was updated on 2000-Jul-31 14:13
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: PRIVATE: various minor Tkinter things (PR#388)
Details: Jitterbug-Id: 388
Submitted-By: markus.oberhumer@jk.uni-linz.ac.at
Date: Wed, 5 Jul 2000 09:38:11 -0400 (EDT)
Version: python CVS
OS: all
Tkinter.Wm.wm_state() lacks a missing "newstate=None" optional parameter.
Tkinter.Text lacks some important methods: [xy]view_moveto, [xy]view_scroll
Canvas.CanvasItem & Canvas.Group:
- bind lacks an optional "add" param
- unbind lacks an optional "funcid" param
- tkraise/lower should call self.canvas.tag_XXXX
- bbox() return value is inconsistent with Canvas.bbox()
====================================================================
Audit trail:
Tue Jul 11 08:24:23 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110677&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:13:22 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:13:22 -0700
Subject: [Python-bugs-list] [Bug #110706] Compile error (PR#44)
Message-ID: <200008062013.NAA05906@bush.i.sourceforge.net>
Bug #110706, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: Compile error (PR#44)
Details: Jitterbug-Id: 44
Submitted-By: rene@kronos.szabinet.hu
Date: Sun, 1 Aug 1999 16:39:42 -0400 (EDT)
Version: 1.5.2
OS: Linux
Compile error with Python-1.5.2 on
Linux Slackware 4.0, kernel 2.2.10-ac8, gcc 2.7.2.3, make 3.76.1
./configure --prefix=/usr/local --with-threads && make
...
./socketmodule.c: In function `setipaddr':
./socketmodule.c:392: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
./socketmodule.c:392: too many arguments to function `gethostbyname_r'
./socketmodule.c:392: warning: assignment makes integer from pointer without a
cast
./socketmodule.c: In function `PySocket_gethostbyname_ex':
./socketmodule.c:1471: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
./socketmodule.c:1471: too many arguments to function `gethostbyname_r'
./socketmodule.c:1471: warning: assignment makes integer from pointer without a
cast
./socketmodule.c: In function `PySocket_gethostbyaddr':
./socketmodule.c:1534: warning: passing arg 7 of `gethostbyaddr_r' from
incompatible pointer type
./socketmodule.c:1534: too many arguments to function `gethostbyaddr_r'
./socketmodule.c:1534: warning: assignment makes integer from pointer without a
cast
make[1]: *** [socketmodule.o] Error 1
make: *** [Modules] Error 2
====================================================================
Audit trail:
Wed Aug 04 12:12:39 1999 guido moved from incoming to platformbug
Mon Aug 30 12:37:34 1999 guido changed notes
Mon Oct 25 15:15:46 1999 guido changed notes
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110706&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:15:13 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:15:13 -0700
Subject: [Python-bugs-list] [Bug #110644] bug in PyLong_FromLongLong (PR#324)
Message-ID: <200008062015.NAA05944@bush.i.sourceforge.net>
Bug #110644, was updated on 2000-Jul-31 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: bug in PyLong_FromLongLong (PR#324)
Details: Jitterbug-Id: 324
Submitted-By: Thomas.Malik@t-online.de
Date: Wed, 10 May 2000 15:37:28 -0400 (EDT)
Version: 1.5.2
OS: all
there's a bug in PyLong_FromLongLong, resulting in truncation of negative 64 bit
integers. PyLong_FromLongLong starts with:
if( ival <= (LONG_LONG)LONG_MAX ) {
return PyLong_FromLong( (long)ival );
}
else if( ival <= (unsigned LONG_LONG)ULONG_MAX ) {
return PyLong_FromUnsignedLong( (unsigned long)ival );
}
else {
....
Now, if ival is smaller than -LONG_MAX, it falls outside the long integer range
(being a 64 bit negative integer), but gets handled by the first if-then-case in
above code ('cause it is, of course, smaller than LONG_MAX). This results in
truncation of the 64 bit negative integer to a more or less arbitrary 32 bit
number. The way to fix it is to compare the absolute value of imax against
LONG_MAX in the first condition. The second condition (ULONG_MAX) must, at
least, check wether ival is positive.
====================================================================
Audit trail:
Mon May 22 17:13:25 2000 guido changed notes
Mon May 22 17:13:25 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110644&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:16:36 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:16:36 -0700
Subject: [Python-bugs-list] [Bug #110670] Win32 os.listdir raises confusing errors (PR#374)
Message-ID: <200008062016.NAA05972@bush.i.sourceforge.net>
Bug #110670, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: Win32 os.listdir raises confusing errors (PR#374)
Details: Jitterbug-Id: 374
Submitted-By: tpeters@beopen.com
Date: Thu, 29 Jun 2000 02:25:18 -0400 (EDT)
Version: 1.6a2
OS: Windows
Copying this over from the SourceForge bug manager:
https://sourceforge.net/bugs/?func=detailbug&group_id=5470&bug_id=108381
Here's the original complaint:
On Win32, os.listdir raises "No such process" when the directory
does not exist.
The error returned from GetLastError really is ERROR_PATH_NOT_FOUND,
not ESRCH.
Here's confirmation under Win98 1.6a2:
C:\Python16>python
Python 1.6a2 (#0, Apr 6 2000, 11:45:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import os
>>> os.listdir('/cow')
Traceback (most recent call last):
File "", line 1, in ?
OSError: [Errno 3] No such process: '/cow'
>>>
====================================================================
Audit trail:
Tue Jul 11 08:24:21 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110670&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:21:49 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:21:49 -0700
Subject: [Python-bugs-list] [Bug #110665] Compiling python on hpux 11.00 with threads (PR#360)
Message-ID: <200008062021.NAA06148@bush.i.sourceforge.net>
Bug #110665, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: Compiling python on hpux 11.00 with threads (PR#360)
Details: Jitterbug-Id: 360
Submitted-By: philipp.jocham@salomon.at
Date: Fri, 16 Jun 2000 08:47:06 -0400 (EDT)
Version: 1.5.2
OS: HP-UX 11.00
There are two missing details in the configure process to make this work
out of the box.
First: The function
pthread_create
isn't found in library libpthread.a but in libcma.a, because
pthread_create is just a macro in sys/pthread.h pointing to
__pthread_create_system
After patching ./configure directly and running
./configure --with-thread
(now detecting the correct library /usr/lib/libpthread.a) I also
added -lcl to Modules/Makefile at
LIBS= -lnet -lnsl -ldld -lpthread -lcl
otherwise importing of modules with threads didn't work
(in this case oci_.sl from DCOracle).
I'm not sure about the correct syntax or wether it's the correct
place and method, but I would suggest a solution like the following
code snippet.
[...]
AC_MSG_CHECKING(for --with-thread)
[...]
AC_DEFINE(_POSIX_THREADS)
LIBS="$LIBS -lpthread -lcl"
LIBOBJS="$LIBOBJS thread.o"], [
AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
[...]
I hope this helps to make installation process smoother.
Fell free to contact me, if there are further questions.
Philipp
--
I confirm that, to the best of my knowledge and belief, this
contribution is free of any claims of third parties under
copyright, patent or other rights or interests ("claims"). To
the extent that I have any such claims, I hereby grant to CNRI a
nonexclusive, irrevocable, royalty-free, worldwide license to
reproduce, distribute, perform and/or display publicly, prepare
derivative versions, and otherwise use this contribution as part
of the Python software and its related documentation, or any
derivative versions thereof, at no cost to CNRI or its licensed
users, and to authorize others to do so.
I acknowledge that CNRI may, at its sole discretion, decide
whether or not to incorporate this contribution in the Python
software and its related documentation. I further grant CNRI
permission to use my name and other identifying information
provided to CNRI by me for use in connection with the Python
software and its related documentation.
====================================================================
Audit trail:
Tue Jul 11 08:26:01 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110665&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:34:28 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:34:28 -0700
Subject: [Python-bugs-list] [Bug #110689] PRIVATE: Extra space bug in readline/rlcompleter/raw_input? (PR#45)
Message-ID: <200008062034.NAA06608@bush.i.sourceforge.net>
Bug #110689, was updated on 2000-Jul-31 14:15
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Closed
Resolution: Wont Fix
Bug Group: Not a Bug
Priority: 5
Summary: PRIVATE: Extra space bug in readline/rlcompleter/raw_input? (PR#45)
Details: Jitterbug-Id: 45
Submitted-By: skip@mojam.com
Date: Wed, 4 Aug 1999 11:55:04 -0400 (EDT)
Version: 1.5.2
OS: Linux
I just tried using the readline/rlcompleter stuff in my own
program for the first time. I noticed that when using the
completion key to complete an input from a set of choices it
tacks on an extra space to the end of the string. This seems
like a bug to me. There's no way for the program to know if the
enter typed the space explicitly or if it was appended by
raw_input(). Is this perhaps a readline bug? I haven't delved
into the source code at this point.
Here's a script that demonstrates the problem. Try running it
three times, once entering
s TAB RET
once entering
spam RET
and once entering
spam SPC RET
You will see that the first and third cases are
indistinguishable.
#!/usr/bin/env python
import string, readline, rlcompleter, sys
class Completer:
def __init__(self):
self.list = []
def complete(self, text, state):
if state == 0:
self.matches = self.get_matches(text)
try:
return self.matches[state]
except IndexError:
return None
def set_choices(self, list):
self.list = list
def get_matches(self, text):
matches = []
for elt in self.list:
if string.find(elt, text) == 0:
matches.append(elt)
return matches
completer = Completer()
def select_from_list(list):
completer.set_choices(list)
readline.parse_and_bind("tab: complete")
readline.set_completer(completer.complete)
sys.stderr.write("Select from [%s]: " % string.join(list, "|"))
result = raw_input()
return result
result = select_from_list(["spam", "ham", "eggs", "juice"])
print `result`, ord(result[-1])
====================================================================
Audit trail:
Wed Aug 04 12:12:40 1999 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:02
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] PRIVATE: Extra space bug in readline/rlcompleter/raw_input? (PR#45)
Date: Wed, 04 Aug 1999 12:09:13 -0400
> I just tried using the readline/rlcompleter stuff in my own
> program for the first time. I noticed that when using the
> completion key to complete an input from a set of choices it
> tacks on an extra space to the end of the string. This seems
> like a bug to me. There's no way for the program to know if the
> enter typed the space explicitly or if it was appended by
> raw_input(). Is this perhaps a readline bug? I haven't delved
> into the source code at this point.
As far as I know this is a problem with the completion strategy
hardcoded in the GNU readline code. I don't know of a fix.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-06 13:34
By: twouters
Comment:
I agree with Guido: the extra space is added by Readline, for the simple purpose of distinguishing between a successful, unambiguous completion, and a half-finished completion that stopped at the first 'junction'. In other words, in the 'namespace' containing 'eggs', 'spamandham' and 'spamandeggs',
eg
will complete to 'eggs' because it's a finished completion, but
spa
will complete to 'spamand', (without a space), so you know you have more possible completions. If you disambiguate by continuing it with 'h', and then press TAB again, it gets expanded into 'spamandham'.
One possible solution is to never return a single possibility, but always a dummy possibility as well. Not very pretty, and not very nice if you use TABTAB (list all possible completions) but it should work.
The other solutions is to provide a replacement for readline :-)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110689&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:37:46 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:37:46 -0700
Subject: [Python-bugs-list] [Bug #110686] cStringIO lacks the readlines method (PR#409)
Message-ID: <200008062037.NAA06749@bush.i.sourceforge.net>
Bug #110686, was updated on 2000-Jul-31 14:14
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 4
Summary: cStringIO lacks the readlines method (PR#409)
Details: Jitterbug-Id: 409
Submitted-By: pierre@saiph.com
Date: Sun, 23 Jul 2000 13:41:59 -0400 (EDT)
Version: 1.5.2
OS: sparc solaris
cStringIO is supposed to be the C version of For some reason,
it does not provide the readlines method.
The obvious turnaround is to use StringIO instead: no hurry to fix,
at least on my side.
====================================================================
Audit trail:
Mon Jul 24 18:41:02 2000 jeremy moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110686&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:43:06 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:43:06 -0700
Subject: [Python-bugs-list] [Bug #110842] dl.RTLD_GLOBAL missing (PR#313)
Message-ID: <200008062043.NAA06932@bush.i.sourceforge.net>
Bug #110842, was updated on 2000-Aug-01 14:15
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: dl.RTLD_GLOBAL missing (PR#313)
Details: Jitterbug-Id: 313
Submitted-By: loewis@informatik.hu-berlin.de
Date: Thu, 4 May 2000 09:54:13 -0400 (EDT)
Version: 1.5.2
OS: Solaris
The dl module does not support all flags to dlopen available on a specific
system; eg. dl.open("foo.so",dl.RTLD_GLOBAL) does not work.
On Solaris, the following constants are defined, in addition
RTLD_NOLOAD
RTLD_GLOBAL
RTLD_LOCAL
RTLD_PARENT
RTLD_GROUP
RTLD_WORLD
RTLD_NODELETE
====================================================================
Audit trail:
Mon May 22 17:25:17 2000 guido moved from incoming to request
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110842&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:50:05 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:50:05 -0700
Subject: [Python-bugs-list] [Bug #110680] bad pos value on match object (PR#397)
Message-ID: <200008062050.NAA07114@bush.i.sourceforge.net>
Bug #110680, was updated on 2000-Jul-31 14:14
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: bad pos value on match object (PR#397)
Details: Jitterbug-Id: 397
Submitted-By: jeremy@beopen.com
Date: Thu, 13 Jul 2000 21:42:47 -0400 (EDT)
Version: CVS Thu Jul 13 21:43:09 EDT 2000
OS:
The pos attribute of a match object is supposed to match the value of
the optional pos argument passed to match or search. The default
value of the argument is zero. The current implementation sets pos to
be the start of the match instead.
This program demonstrates:
import re
buf = "abcdef"
rx = re.compile("b(c)")
mo = rx.search(buf)
print mo.pos, mo.endpos
print mo.start(1), mo.end(1)
bitdiddle:/tmp> python1.5 retest.py
0 6
2 3
bitdiddle:/tmp> python retest.py
1 6
2 3
====================================================================
Audit trail:
Fri Jul 14 11:35:54 2000 jeremy moved from incoming to open
Follow-Ups:
Date: 2000-Aug-06 13:50
By: twouters
Comment:
Jeremy, this looks fixed. (I get the '1.5' behaviour in both 'sre' and 'pre' in current CVS snapshots.) Please re-open this bugreport (and assign to effbot, I assume) if you still see the bug (and mark it platform-dependant -- I don't see it on BSDI or Linux, in any case.)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110680&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:53:24 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:53:24 -0700
Subject: [Python-bugs-list] [Bug #110664] PRIVATE: Bug in re module (PR#36)
Message-ID: <200008062053.NAA07267@bush.i.sourceforge.net>
Bug #110664, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: PRIVATE: Bug in re module (PR#36)
Details: Jitterbug-Id: 36
Submitted-By: chenna@embl-heidelberg.de
Date: Fri, 23 Jul 1999 06:51:43 -0400 (EDT)
Version: 1.5.1
OS: OSF1
Hello I get
Stack overflow: pid 14731, proc emparse1.py, addr 0x11fdfffd8, pc 0x120068cd8
Segmentation fault
when I run the following. The problem is re module unable to search
for the pattern that is too large, but this is a requirement for my
application in biology. I enclose the source code with this.
Please email me the solution as soon as possible
Thanks
Ramu
___________________________
#!/usr/pub/bin/python1.5
#
#
#
# (C) Chenna Ramu, EMBL, Heidelberg, Germany
#
# parser for biological databases
#
import string
import sys
import re
parserDict = {
'id' : r'((^ID [^\n]+\n)+)' ,
'ac' : r'((^AC [^\n]+\n)+)' ,
'dt' : r'((^DT [^\n]+\n)+)' ,
'de' : r'((^DE [^\n]+\n)+)' ,
'gn' : r'((^GN [^\n]+\n)+)' ,
'os' : r'((^OS [^\n]+\n)+)' ,
'oc' : r'((^OC [^\n]+\n)+)' ,
'ref' : r'(('
r'(^RN [^\n]+\n)'
r'((^RP [^\n]+\n)+)'
r'((^RX [^\n]+\n)?)'
r'((^RA [^\n]+\n)+)'
r'((^RT [^\n]+\n)*)'
r'((^RL [^\n]+\n)+)'
r')+)',
'cc' : r'((^CC [^\n]+\n)+)' ,
'dr' : r'((^DR [^\n]+\n)+)' ,
'kw' : r'((^KW [^\n]+\n)+)' ,
'ft' : r'((^FT [^\n]+\n)+)' ,
'sq' : r'(^SQ [^\n]+\n)' \
r'((^ [^\n]+\n)+)'
}
_hrefLink = {'embl':['%s','^DR ([^;]+)']} #should be like this
hrefLink = {'EMBL':"%s",
'MIM':"%s"}
em_rep = r'(^DR )(?P[^;]+); (?P[^;]+)'
class embl:
def __init__(self,parserDict={}):
self.parserDict = {}
self.reDict = {} #keep the compiled re's
self.fields = []
if parserDict:
self.Init(parserDict)
def Init(self,parserDict):
self.parserDict = parserDict
self.fields = parserDict.keys()
for j in self.fields:
setattr(self, j, None)
self.reDict[j] = re.compile(parserDict[j],re.MULTILINE)
def Parse(self,str):
if not self.parserDict:
print "No parser specified"
return
for k,v in parserDict.items():
## tmp = re.compile(v,re.MULTILINE) # move this to __init__
tmp = self.reDict[k]
mat = tmp.search(str)
if mat:
setattr(self, k, mat.group() )
def Field(self,name):
try:
return getattr(self,name)
except AttributeError:
return None
def PrintFields(self):
flds = self.fields
for j in flds:
print "==> ",j
print getattr(self,j)
def ReParse(self,str,retToken,pat):
""" str:string to parse, retToken:return token, pat:parser """
_p = re.compile(pat)
m = _p.search(str)
if m:
return m.group(retToken)
else:
return None
def Href(match):
""" Replaces the hrefs """
dbase = match.group('dbase')
id = match.group('id')
try:
defi = hrefLink[dbase]
except KeyError:
defi = None
if defi:
tmp = match.group(1) + dbase + '; '+defi %(dbase,id,id)
else:
tmp = match.group(1)+ dbase + '; ' + id
return tmp
def test(fileName):
sys.path.insert(0,'/home/chenna/py')
## from seqFormat import *
e = embl(parserDict)
# f = open('acha_mouse.dat','r')
f = open(fileName,'r')
a = f.readlines()
f.close()
a = string.join(a,'')
e.Parse(a)
e.PrintFields()
import string
print ' the fields are ',e.fields
## seq = string.split(e.sq,';')[-1]
## s = Seq(seq,'test')
## print 'check===>',s.seq
## s.SeqPrint('swiss')
seqLen = e.ReParse(e.sq[0:50],'seqLen',r'^SQ [^ ]+ *(?P(\d+))')
print e.sq
print "length of the sequence ",seqLen
print e.ref
dr = e.dr
print dr
p = re.compile(em_rep,re.M)
dr = p.sub(Href,dr)
print dr
print e.Field('id')
print e.Field('dr')
print e.Field('mm')
return
def test1(dumm=None):
tmp = ['SQ Sequence 1041931 BP; 8972 A; 5950 C; 6264 G; 8224 T; 0
other;\n']
for j in range(1,17365):
t = ' ' + 'tcagtcagtg ' * 6 + '\n'
tmp.append(t)
a = string.join(tmp)
e = embl(parserDict)
e.Parse(a)
e.PrintFields()
if __name__ == '__main__':
try:
test1(sys.argv[1])
except:
test1()
====================================================================
Audit trail:
Sat Jul 24 16:53:53 1999 guido changed notes
Sat Jul 24 16:53:53 1999 guido moved from incoming to open
Sat Jul 24 17:04:17 1999 guido changed notes
Follow-Ups:
Date: 2000-Aug-06 13:53
By: twouters
Comment:
Fair chance this is already fixed, either in 1.5.2 remodule, or in the new 'sre' by Fredrik. Maybe /F can say something useful here.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110664&group_id=5470
From noreply@sourceforge.net Sun Aug 6 21:56:35 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 13:56:35 -0700
Subject: [Python-bugs-list] [Bug #110673] win32api.GetFullPathName (build 129) (PR#380)
Message-ID: <200008062056.NAA07318@bush.i.sourceforge.net>
Bug #110673, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: win32api.GetFullPathName (build 129) (PR#380)
Details: Jitterbug-Id: 380
Submitted-By: 2jerry@writeme.com
Date: Mon, 3 Jul 2000 17:14:02 -0400 (EDT)
Version: 1.5.2 (win32api build 129)
OS: pc win98
next to code:
full_path_lst = map(os.path.abspath, sys.path)
according to that sys.path include the source directory at the first place of
sys.path.
I noticed that if I call the module in its own directory (python -i module.py)
the first item of sys.path is ''.
That all ok: abspath function in os module call getcwd() function if path is
Null.
...
good day for UNIX like men (as me :))
...
but in NT or WIN 98 workstation:
os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
and
win32api.GetFullPathName('') return '' and not current directory.
Maybe is it a functionality .. but is os-depend functionality available for a
longtime ?
Jerome.vacher alias Jerry the foolish dracomorpheus.
====================================================================
Audit trail:
Tue Jul 11 08:24:22 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 16:19:30 +1000
Can anyone else here confirm that:
a) os.abspath('') on Linux does indeed return the CWD.
b) It is supposed to :-)
If confirmed, this would be a bug in ntpath.py. It catches win32api
exceptions, and returns the input name in that case. This would be
triggered by:
>>> win32api.GetFullPathName('')
Traceback (most recent call last):
File "", line 1, in ?
pywintypes.api_error: (127, 'GetFullPathName', 'The specified procedure
could not be found.')
Is this indeed something we should fix?
Mark.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> 2jerry@writeme.com
> Sent: Tuesday, 4 July 2000 7:14 AM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] win32api.GetFullPathName (build 129)
> (PR#380)
>
>
> Full_Name: Jerome VACHER
> Version: 1.5.2 (win32api build 129)
> OS: pc win98
> Submission from: ppp-55.dialup-166.worldonline.fr (212.83.166.55)
>
>
> next to code:
> full_path_lst = map(os.path.abspath, sys.path)
>
> according to that sys.path include the source directory at the
> first place of
> sys.path.
>
> I noticed that if I call the module in its own directory (python
> -i module.py)
> the first item of sys.path is ''.
> That all ok: abspath function in os module call getcwd()
> function if path is
> Null.
> ...
> good day for UNIX like men (as me :))
> ...
> but in NT or WIN 98 workstation:
> os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
> and
> win32api.GetFullPathName('') return '' and not current directory.
>
> Maybe is it a functionality .. but is os-depend functionality
> available for a
> longtime ?
>
> Jerome.vacher alias Jerry the foolish dracomorpheus.
>
>
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Fred L. Drake, Jr."
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 13:34:24 -0400 (EDT)
Mark Hammond writes:
> Can anyone else here confirm that:
>
> a) os.abspath('') on Linux does indeed return the CWD.
Yes, that's right.
> b) It is supposed to :-)
I think that's the right thing to do.
-Fred
--
Fred L. Drake, Jr.
BeOpen PythonLabs Team Member
-------------------------------------------------------
Date: 2000-Aug-06 13:56
By: twouters
Comment:
Possibly already fixed, or at least Mark has looked at it :)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110673&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:10:15 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:10:15 -0700
Subject: [Python-bugs-list] [Bug #110837] Tkinter Optionmenu doesn't accept 'font' resource (PR#229)
Message-ID: <200008062110.OAA00358@delerium.i.sourceforge.net>
Bug #110837, was updated on 2000-Aug-01 14:14
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Wont Fix
Bug Group: Feature Request
Priority: 5
Summary: Tkinter Optionmenu doesn't accept 'font' resource (PR#229)
Details: Jitterbug-Id: 229
Submitted-By: aa8vb@yahoo.com
Date: Thu, 9 Mar 2000 08:57:50 -0500 (EST)
Version: 1.5.2
OS: IRIX 6.5
menu = apply( OptionMenu, ( parent, var ) + tuple( option_names ),
{ 'font':PANEL_FONT } )
generates:
TypeError: unexpected keyword argument: font
It would be helpful if the 'font' resource were accepted and used to create the
menubutton and child command widgets.
In its absense, folks need to poke at the internals of OptionMenu (obviously
not a good idea) or establish a parent frame for each option menu with a
unique name and use option_add to stuff *Class*Font: resources into the Tk
resource database.
If the 'font' option were supported, it would simplify this greatly.
Thanks,
Randall
====================================================================
Audit trail:
Mon Apr 03 18:37:34 2000 guido changed notes
Mon Apr 03 18:37:34 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:14
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Tkinter Optionmenu doesn't accept 'font' resource (PR#229)
Date: Thu, 09 Mar 2000 10:45:55 -0500
> It would be helpful if the 'font' resource were accepted and used to
> create the menubutton and child command widgets.
Unfortunately, the underlying Tk command, tk_optionmenu, doesn't
support this. Nothing I can do about it.
(See
http://dev.scriptics.com/man/tcl8.3/TkCmd/optionMenu.htm.)
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:14
By: none
Comment:
Probably won't be done.
-------------------------------------------------------
Date: 2000-Aug-06 14:10
By: twouters
Comment:
Not much Python can do, since it's a Tk limitation.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110837&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:12:55 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:12:55 -0700
Subject: [Python-bugs-list] [Bug #110853] Segmentation fault with kernel 2.2.12 (PR#103)
Message-ID: <200008062112.OAA00402@delerium.i.sourceforge.net>
Bug #110853, was updated on 2000-Aug-01 14:37
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Irreproducible
Priority: 5
Summary: Segmentation fault with kernel 2.2.12 (PR#103)
Details: Jitterbug-Id: 103
Submitted-By: apsteffe@netwood.net
Date: Mon, 11 Oct 1999 22:21:00 -0400 (EDT)
Version: 1.5.2
OS: Linux
I'm using glibc 2.0.6 and kernel 2.2.12 and gcc-2.7.2.1 . When I try to
execute httplib.HTTP() or urllib.urlretrieve() I get a segmentation fault.
The functions work ok with kernel 1.2.13 .
====================================================================
Audit trail:
Mon Oct 18 18:08:00 1999 guido changed notes
Mon Oct 18 18:08:00 1999 guido changed notification
Mon Oct 18 18:08:00 1999 guido moved from incoming to irreproducible
Follow-Ups:
Date: 2000-Aug-01 14:37
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Segmentation fault with kernel 2.2.12 (PR#103)
Date: Mon, 11 Oct 1999 23:09:13 -0400
> Full_Name: Alfred Steffens Jr.
> Version: 1.5.2
> OS: Linux
> Submission from: p138.netwood.net (209.247.185.38)
>
> I'm using glibc 2.0.6 and kernel 2.2.12 and gcc-2.7.2.1 . When I try to
> execute httplib.HTTP() or urllib.urlretrieve() I get a segmentation fault.
> The functions work ok with kernel 1.2.13 .
The Linux and glibc kernel versions don't mean much to me. Can you
fire up a debugger and see where in the C code it crashes? Also, is
this for a specific URL or is it for any URL? If a specific URL, I'd
like to know which one.
Finally, did you get or build the Python executable matching your
kernel? A Linux upgrade from 1.x to 2.x seems a big deal, it's
possible that you'll need a new Python installation or build.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:37
By: none
Comment:
Probably caused by a huge jump in Linux kernel version without recompiling
Python.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110853&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:14:32 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:14:32 -0700
Subject: [Python-bugs-list] [Bug #110622] pdb bug (PR#236)
Message-ID: <200008062114.OAA00517@delerium.i.sourceforge.net>
Bug #110622, was updated on 2000-Jul-31 14:06
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: pdb bug (PR#236)
Details: Jitterbug-Id: 236
Submitted-By: jsolbrig@webcom.com
Date: Tue, 14 Mar 2000 19:55:22 -0500 (EST)
Version: 1.5.2
OS: Win32/win95
pdb (python debugger) tends to drop (ignore) breaks in multi-file debugging.
I wish I had time to isolate the offending code but I don't.
====================================================================
Audit trail:
Mon May 22 17:37:26 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110622&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:25:13 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:25:13 -0700
Subject: [Python-bugs-list] [Bug #110625] trouble building under Solaris 7 (PR#260)
Message-ID: <200008062125.OAA00809@delerium.i.sourceforge.net>
Bug #110625, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: trouble building under Solaris 7 (PR#260)
Details: Jitterbug-Id: 260
Submitted-By: lipman@helix.nih.gov
Date: Fri, 31 Mar 2000 18:03:56 -0500 (EST)
Version: 1.5.2
OS: Solaris 7 106541-08
When I built Python on my machine:
SunOS 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-5_10
Python's internal symbols (for instance PySequence_Length) were not
included in the dynamic symbol table of the python executable. This
prevented the Numerical-15.2 extensions from importing properly. My
machine has both the Sun linker (in /usr/ccs/bin) and the GNU linker
installed. I use the GNU linker, which is first in the $PATH under
which Python was built.
A workaround for this problem is to change the following line in
Modules/Makefile.pre from
LDFLAGS=
to
LDFLAGS= -export-dynamic
This will only work for the GNU linker.
====================================================================
Audit trail:
Mon May 22 17:39:59 2000 guido changed notes
Mon May 22 17:39:59 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-06 14:25
By: twouters
Comment:
This might be fixed by newer autoconf ?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110625&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:28:07 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:28:07 -0700
Subject: [Python-bugs-list] [Bug #110840] -with-cxx option to configure script (PR#24)
Message-ID: <200008062128.OAA00847@delerium.i.sourceforge.net>
Bug #110840, was updated on 2000-Aug-01 14:15
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: -with-cxx option to configure script (PR#24)
Details: Jitterbug-Id: 24
Submitted-By: guido@python.org
Date: Wed, 14 Jul 1999 11:16:51 -0400 (EDT)
Version: 1.5.2
OS: Unix
Geoff Furnish has a patch for the configure script which might be reasonable.
See http://www.python.org/sigs/c++-sig/sig_code.html
====================================================================
Audit trail:
Wed Jul 14 11:18:10 1999 guido moved from incoming to request
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110840&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:30:42 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:30:42 -0700
Subject: [Python-bugs-list] [Bug #110844] Annoyance in ftpmirror.py script (PR#48)
Message-ID: <200008062130.OAA00964@delerium.i.sourceforge.net>
Bug #110844, was updated on 2000-Aug-01 14:15
Here is a current snapshot of the bug.
Project: Python
Category: demos and tools
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Annoyance in ftpmirror.py script (PR#48)
Details: Jitterbug-Id: 48
Submitted-By: mok@imsb.au.dk
Date: Mon, 9 Aug 1999 10:27:00 -0400 (EDT)
Version: 1.5.2
OS: Linux Linux 2.0.36
The script ftpmirror.py contains some useful (for me) routines, but the file
cannot be imported unless the following (trivial) patch is applied
395c395,396
< main()
---
> if __name__ == "__main__":
> main()
====================================================================
Audit trail:
Tue Aug 10 17:46:08 1999 guido moved from incoming to request
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110844&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:32:54 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:32:54 -0700
Subject: [Python-bugs-list] [Bug #110702] closing a popen file descriptor (PR#33)
Message-ID: <200008062132.OAA00988@delerium.i.sourceforge.net>
Bug #110702, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: closing a popen file descriptor (PR#33)
Details: Jitterbug-Id: 33
Submitted-By: laik@cs.stanford.edu
Date: Tue, 20 Jul 1999 14:00:11 -0400 (EDT)
Version: 1.5.2
OS: Linux 2.2.10
I can't close a pipe's file descriptor without an error:
>>> import os
>>> p1 = os.popen("cat dummy1", "r")
>>> p2 = os.popen("cat dummy2", "r")
>>> p1.close()
Traceback (innermost last):
File "", line 1, in ?
IOError: (0, 'Error')
It only happens if I do two or more popens. If I try to close any file
descriptor
but the last one I opened, I get this mysterious IOError. It happens regardless
of the order I try to close the descriptors.
====================================================================
Audit trail:
Sat Jul 24 17:02:54 1999 guido sent reply 1
Sat Jul 24 17:03:22 1999 guido changed notes
Sat Jul 24 17:03:22 1999 guido moved from incoming to open
Sat Jul 24 17:05:25 1999 guido moved from open to platformbug
Follow-Ups:
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Guido van Rossum
Subject: Re: closing a popen file descriptor (PR#33)
Date: Sat Jul 24 17:02:54 1999
> Full_Name: Kevin Lai
> Version: 1.5.2
> OS: Linux 2.2.10
> Submission from: (NULL) (192.25.214.6)
>
>
> I can't close a pipe's file descriptor without an error:
>
>>>> import os
>>>> p1 = os.popen("cat dummy1", "r")
>>>> p2 = os.popen("cat dummy2", "r")
>>>> p1.close()
> Traceback (innermost last):
> File "", line 1, in ?
> IOError: (0, 'Error')
>
> It only happens if I do two or more popens. If I try to close any file
> descriptor
> but the last one I opened, I get this mysterious IOError. It happens
regardless
> of the order I try to close the descriptors.
Kevin, this works on other platforms I can try (Solaris 2.6, linux 2.0.34).
One possibility is that the C library in the Linux version you are using
has changed; the IOError means that its pclose() returns an error indicator.
The (0, 'Error') message means that pclose() didn't set the errno variable.
It could be a bug in the Linux C library, or a change in interface that
requires Python to interpret the error return differently.
Can you help us discover which is the case? Does the man page for pclose()
say anything about this? Does this fail in an equivalent C program?
--Guido van Rossum
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
From: laik@tnt.Stanford.EDU
Subject: Re: closing a popen file descriptor (PR#33)
Date: Tue, 27 Jul 1999 01:41:15 -0700
Guido,
Thanks for your quick reply. As far as I can tell, the man page for
pclose() doesn't mention any API changes. I have included the popen()
and wait4() man pages for the system I am using (PII 300, Linux
2.2.10, glibc 2.1.1).
I have written a short C program which tries to exercise the bug. On my
system, it gives these results:
[laik@nebraska]~>gcc popen.c
[laik@nebraska]~>a.out
pclose(p1): 0, WIFEXITED: 1, WEXITSTATUS:0, WIFSIGNALED:0
pclose(p2): 0, WIFEXITED: 1, WEXITSTATUS:0, WIFSIGNALED:0
pclose(p3): 0, WIFEXITED: 1, WEXITSTATUS:0, WIFSIGNALED:0
On a Linux 2.0.33, glibc 2.0.7 system, it gives the same
results. However, my system exhibits the problem under Python, while
the other does not. I conclude that my C program doesn't mimic the
Python program well enough to trigger the bug, but I don't know how to
fix that.
#include
#define _USE_BSD
#include
#include
#include
main()
{
FILE *p1, *p2, *p3;
int pc1, pc2, pc3;
p1 = popen("ls", "r");
p2 = popen("ls", "r");
p3 = popen("ls", "r");
sleep(1);
pc1 = pclose(p1);
printf("pclose(p1): %d, WIFEXITED: %d, WEXITSTATUS:%d, WIFSIGNALED:%d\n",
pc1, WIFEXITED(pc1), WEXITSTATUS(pc1), WIFSIGNALED(pc1));
pc2 = pclose(p2);
printf("pclose(p2): %d, WIFEXITED: %d, WEXITSTATUS:%d, WIFSIGNALED:%d\n",
pc1, WIFEXITED(pc2), WEXITSTATUS(pc2), WIFSIGNALED(pc2));
pc3 = pclose(p3);
printf("pclose(p3): %d, WIFEXITED: %d, WEXITSTATUS:%d, WIFSIGNALED:%d\n",
pc3, WIFEXITED(pc3), WEXITSTATUS(pc3), WIFSIGNALED(pc3));
}
POPEN(3) Linux Programmer's Manual POPEN(3)
NAME
popen, pclose - process I/O
SYNOPSIS
#include
FILE *popen(const char *command, const char *type);
int pclose(FILE *stream);
DESCRIPTION
The popen() function opens a process by creating a pipe,
forking, and invoking the shell. Since a pipe is by defi-
nition unidirectional, the type argument may specify only
reading or writing, not both; the resulting stream is cor-
respondingly read-only or write-only.
The command argument is a pointer to a null-terminated
string containing a shell command line. This command is
passed to /bin/sh using the -c flag; interpretation, if
any, is performed by the shell. The mode argument is a
pointer to a null-terminated string which must be either
`r' for reading or `w' for writing.
The return value from popen() is a normal standard I/O
stream in all respects save that it must be closed with
pclose() rather than fclose(). Writing to such a stream
writes to the standard input of the command; the command's
standard output is the same as that of the process that
called popen(), unless this is altered by the command
itself. Conversely, reading from a ``popened'' stream
reads the command's standard output, and the command's
standard input is the same as that of the process that
called popen.
Note that output popen streams are fully buffered by
default.
The pclose function waits for the associated process to
terminate and returns the exit status of the command as
returned by wait4.
RETURN VALUE
The popen function returns NULL if the fork(2) or pipe(2)
calls fail, or if it cannot allocate memory.
The pclose function returns -1 if wait4 returns an error,
or some other error is detected.
ERRORS
The popen function does not set errno if memory allocation
fails. If the underlying fork() or pipe() fails, errno is
set appropriately. If the mode argument is invalid, and
this condition is detected, errno is set to EINVAL.
If pclose() cannot obtain the child status, errno is set
to ECHILD.
CONFORMING TO
POSIX.2
BUGS
Since the standard input of a command opened for reading
shares its seek offset with the process that called
popen(), if the original process has done a buffered read,
the command's input position may not be as expected. Sim-
ilarly, the output from a command opened for writing may
become intermingled with that of the original process.
The latter can be avoided by calling fflush(3) before
popen.
Failure to execute the shell is indistinguishable from the
shell's failure to execute command, or an immediate exit
of the command. The only hint is an exit status of 127.
HISTORY
A popen() and a pclose() function appeared in Version 7
AT&T UNIX.
SEE ALSO
fork(2), sh(1), pipe(2), wait4(2), fflush(3), fclose(3),
fopen(3), stdio(3), system(3).
BSD MANPAGE 7 May 1998 1
WAIT4(2) Linux Programmer's Manual WAIT4(2)
NAME
wait3, wait4 - wait for process termination, BSD style
SYNOPSIS
#define _USE_BSD
#include
#include
#include
pid_t wait3(int *status, int options,
struct rusage *rusage)
pid_t wait4(pid_t pid, int *status, int options,
struct rusage *rusage)
DESCRIPTION
The wait3 function suspends execution of the current pro-
cess until a child has exited, or until a signal is deliv-
ered whose action is to terminate the current process or
to call a signal handling function. If a child has
already exited by the time of the call (a so-called "zom-
bie" process), the function returns immediately. Any sys-
tem resources used by the child are freed.
The wait4 function suspends execution of the current pro-
cess until a child as specified by the pid argument has
exited, or until a signal is delivered whose action is to
terminate the current process or to call a signal handling
function. If a child as requested by pid has already
exited by the time of the call (a so-called "zombie" pro-
cess), the function returns immediately. Any system
resources used by the child are freed.
The value of pid can be one of:
< -1 which means to wait for any child process whose
process group ID is equal to the absolute value of
pid.
-1 which means to wait for any child process; this is
equivalent to calling wait3.
0 which means to wait for any child process whose
process group ID is equal to that of the calling
process.
> 0 which means to wait for the child whose process ID
is equal to the value of pid.
The value of options is a bitwise OR of zero or more of
the following constants:
WNOHANG which means to return immediately if no child is
there to be waited for.
WUNTRACED
which means to also return for children which are
stopped, and whose status has not been reported.
If status is not NULL, wait3 or wait4 store status infor-
mation in the location pointed to by status.
This status can be evaluated with the following macros
(these macros take the stat buffer (an int) as an argument
-- not a pointer to the buffer!):
WIFEXITED(status)
is non-zero if the child exited normally.
WEXITSTATUS(status)
evaluates to the least significant eight bits of
the return code of the child which terminated,
which may have been set as the argument to a call
to exit() or as the argument for a return state-
ment in the main program. This macro can only be
evaluated if WIFEXITED returned non-zero.
WIFSIGNALED(status)
returns true if the child process exited because
of a signal which was not caught.
WTERMSIG(status)
returns the number of the signal that caused the
child process to terminate. This macro can only be
evaluated if WIFSIGNALED returned non-zero.
WIFSTOPPED(status)
returns true if the child process which caused the
return is currently stopped; this is only possible
if the call was done using WUNTRACED.
WSTOPSIG(status)
returns the number of the signal which caused the
child to stop. This macro can only be evaluated
if WIFSTOPPED returned non-zero.
If rusage is not NULL, the struct rusage as
defined in it points to will be
filled with accounting information. See
getrusage(2) for details.
RETURN VALUE
The process ID of the child which exited, -1 on error (in
particular, when no unwaited-for child processes of the
specified kind exist) or zero if WNOHANG was used and no
child was available yet. In the latter two cases errno
will be set appropriately.
ERRORS
ECHILD No unwaited-for child process as specified does
exist.
ERESTARTSYS
if WNOHANG was not set and an unblocked signal or a
SIGCHLD was caught. This error is returned by the
system call. The library interface is not allowed
to return ERESTARTSYS, but will return EINTR.
CONFORMING TO
SVr4, POSIX.1
SEE ALSO
signal(2), getrusage(2), wait(2), signal(7)
Linux 23 June 1997 1
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
Perhaps a bug or interface change in Linux popen()?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110702&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:32:07 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:32:07 -0700
Subject: [Python-bugs-list] [Bug #110690] Bug in os.environ for Windows (PR#50)
Message-ID: <200008062132.OAA00983@delerium.i.sourceforge.net>
Bug #110690, was updated on 2000-Jul-31 14:15
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Bug in os.environ for Windows (PR#50)
Details: Jitterbug-Id: 50
Submitted-By: bobalex@uppercase.xerox.com
Date: Wed, 11 Aug 1999 19:19:16 -0400 (EDT)
Version: 1.5.2
OS: WinNT
os.environ for Windows appears to be a map-type object that converts its keys to
upper case. Retrieval using a mixed case key works in some cases, but some
overloaded "operators" don't seem to do the right thing unless I pass an
all-upper-case key. E.g.:
>>> os.environ["x"] = "y" # Stores pair {"X": "y"}
>>> os.environ["x"] # Works, indicates an effort is made
'y' # to retrieve mixed case keys
>>> os.environ.get("x", "NOT FOUND") # Doesn't see the key "x"
'NOT FOUND'
>>> os.environ.get("X", "NOT FOUND") # Works with all-upper-case key
'y'
>>> del os.environ["x"] # Doesn't see the key "x"
Traceback (innermost last):
File "", line 1, in ?
File "E:\Program Files\Python\Lib\UserDict.py", line 16, in __delitem__
def __delitem__(self, key): del self.data[key]
KeyError: x
>>> del os.environ["X"] # Works with all-upper-case key
====================================================================
Audit trail:
Mon Aug 30 12:33:44 1999 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110690&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:33:40 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:33:40 -0700
Subject: [Python-bugs-list] [Bug #110705] combination of socket.gethostbyname and os.system hangs program (PR#401)
Message-ID: <200008062133.OAA01104@delerium.i.sourceforge.net>
Bug #110705, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: combination of socket.gethostbyname and os.system hangs program (PR#401)
Details: Jitterbug-Id: 401
Submitted-By: andyg@one.net.au
Date: Mon, 17 Jul 2000 04:26:12 -0400 (EDT)
Version: Python 1.5.2 (#3, Jun 29 2000, 15:52:04) [GCC 2.8.1] on sunos5
OS: SunOS psol002 5.6 Generic_105181-21 sun4u sparc SUNW,Ultra-Enterprise
A combination of socket.gethostbyname and os.system appears to hang
python intermittently. We run Dec and Sun systems - it only appears
to be a problem with sun systems.
The following is the simplest way I can reproduce the problem:
test.py:
--------------------------------
#!/usr/local/bin/python
import os
import socket
print socket.gethostbyname( "a hostname (but not localhost)" )
os.system("echo fred")
hang.sh:
--------------------------------
#!/bin/ksh
while true ; do
./test.py
done
output:
---------------------------------
10.666.666.666
fred
10.666.666.666
fred
... eventually ...
10.666.666.666
If "a hostname" is "localhost" it doesn't hang. For anything else which it
can successfully resolve, it seems to hang.
Thanks !
Andy.
====================================================================
Audit trail:
Mon Jul 24 18:39:07 2000 jeremy changed notes
Mon Jul 24 18:39:07 2000 jeremy moved from incoming to platformbug
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110705&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:34:51 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:34:51 -0700
Subject: [Python-bugs-list] [Bug #110683] compiling on WinNT (PR#403)
Message-ID: <200008062134.OAA01112@delerium.i.sourceforge.net>
Bug #110683, was updated on 2000-Jul-31 14:14
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: compiling on WinNT (PR#403)
Details: Jitterbug-Id: 403
Submitted-By: falk.lehmann@gmx.net
Date: Mon, 17 Jul 2000 21:59:56 -0400 (EDT)
Version: 1.6a2
OS: WinNT 4.0
I tried to compile Python 1.6a2 on a WinNT box using VC++ 6.00.
The compiler stops with some warnings and an error message:
K:\Projects\Python-1.6a2\Modules\socketmodule.c(2081) : error C2099: initializer
is not a constant
K:\Projects\Python-1.6a2\Modules\socketmodule.c(1947) : warning C4047:
'function' : 'int ' differs in levels of indirection from 'void *'
K:\Projects\Python-1.6a2\Modules\socketmodule.c(1947) : warning C4024: 'memset'
: different types for formal and actual parameter 2
K:\Projects\Python-1.6a2\Modules\socketmodule.c(1948) : warning C4047:
'function' : 'int ' differs in levels of indirection from 'void *'
K:\Projects\Python-1.6a2\Modules\socketmodule.c(1948) : warning C4024: 'memset'
: different types for formal and actual parameter 2
K:\Projects\Python-1.6a2\Modules\socketmodule.c(1933) : warning C4101: 'str' :
unreferenced local variable
K:\Projects\Python-1.6a2\Modules\socketmodule.c(2083) : warning C4047:
'initializing' : 'int ' differs in levels of indirection from 'char [4]'
K:\Projects\Python-1.6a2\Modules\socketmodule.c(2084) : warning C4047:
'initializing' : 'char *' differs in levels of indirection from 'unsigned int '
K:\Projects\Python-1.6a2\Modules\socketmodule.c(2087) : warning C4047:
'initializing' : 'int ' differs in levels of indirection from 'void (__cdecl
*)(struct _object *)'
K:\Projects\Python-1.6a2\Modules\socketmodule.c(2089) : warning C4047:
'initializing' : 'int (__cdecl *)(struct _object *,struct _iobuf *,int )'
differs in levels of indirection from 'struct _object *(__cdecl *)(struct
_object *,char *)'
Thanks in advance for fixing (at least the error).
Falk
====================================================================
Audit trail:
Tue Jul 25 07:25:55 2000 guido changed notes
Tue Jul 25 07:25:55 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] compiling on WinNT (PR#403)
Date: Mon, 24 Jul 2000 11:35:24 -0500
> I tried to compile Python 1.6a2 on a WinNT box using VC++ 6.00.
Please try the current CVS tree (on its way to 2.0); we have no
problems compiling this on VC 6.0.
--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:02
By: none
Comment:
From: Falk Lehmann
Subject: Re: [Python-bugs-list] compiling on WinNT (PR#403)
Date: Mon, 24 Jul 2000 13:46:45 -0500
[magical fwd by GvR]
Guido,
sorry, but forgot to write, that I switched on the USE_SSL macro.
And then the _socket module does not compile.
Falk
> > I tried to compile Python 1.6a2 on a WinNT box using VC++ 6.00.
>
> Please try the current CVS tree (on its way to 2.0); we have no
> problems compiling this on VC 6.0.
>
> --Guido van Rossum (home page: http://dinsdale.python.org/~guido/)
>
-------------------------------------------------------
Date: 2000-Aug-01 14:02
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] compiling on WinNT (PR#403)
Date: Mon, 24 Jul 2000 14:00:20 -0500
> sorry, but forgot to write, that I switched on the USE_SSL macro.
> And then the _socket module does not compile.
It appears that the Python SSL code hasn't been ported to Windows.
We'll add this to our TODO list, but it's low priority... Perhaps you
could give it a shot yourself? See www.python.org/patches/ for how to
contribute.
--Guido van Rossum (home page: http://dinsdale.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:02
By: none
Comment:
Windows compile fails when using openSSL.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110683&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:35:35 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:35:35 -0700
Subject: [Python-bugs-list] [Bug #110695] complexobject.c optimization error on SGI (PR#144)
Message-ID: <200008062135.OAA01124@delerium.i.sourceforge.net>
Bug #110695, was updated on 2000-Jul-31 14:28
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: complexobject.c optimization error on SGI (PR#144)
Details: Jitterbug-Id: 144
Submitted-By: robert.harrison@pnl.gov
Date: Fri, 3 Dec 1999 01:35:19 -0500 (EST)
Version: 1.5.2
OS: IRIX64 6.5
On an SGI (IRIX64 6.5, MIPSpro Compilers: Version 7.3.1m, -n32)
Python-1.5.2/Objects/complexobject.c does not compile correctly
with optimization. The problem shows up as a bus error in
PyComplex_ImagAsDouble when importing Numeric Python. All works fine
when this one file is compiled with -O0 (-O1 and higher fail).
I assume that this is probably just a compiler error.
====================================================================
Audit trail:
Fri Dec 03 10:39:28 1999 guido changed notes
Fri Dec 03 10:39:28 1999 guido moved from incoming to platformbug
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110695&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:36:06 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:36:06 -0700
Subject: [Python-bugs-list] [Bug #110870] Coredump in moduleobjectc.c:134 (PR#79)
Message-ID: <200008062136.OAA01146@delerium.i.sourceforge.net>
Bug #110870, was updated on 2000-Aug-01 14:42
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: 3rd Party
Priority: 5
Summary: Coredump in moduleobjectc.c:134 (PR#79)
Details: Jitterbug-Id: 79
Submitted-By: ajung@sz-sb.de
Date: Mon, 13 Sep 1999 07:29:09 -0400 (EDT)
Version: 1.5.2
OS: Solaris 2.6/Sparc
(ojs@bonnie:~/PROD/lib/site-python/ojs) 73 : !gdb
gdb python core
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (sparc-sun-solaris2.4), Copyright 1996 Free Software Foundation,
Inc...
Core was generated by `python -v prod_descr.py'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libmp.so.2...done.
Reading symbols from
/usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1...done.
Reading symbols from
/ojs/home/ojs/PROD/lib/python1.5/site-packages/DateTime/mxDateTime/mxDateTime.so...done.
#0 0x49220 in _PyModule_Clear (m=0xc76e4) at moduleobject.c:134
134 if (value != Py_None && PyString_Check(key)) {
(gdb) bt
#0 0x49220 in _PyModule_Clear (m=0xc76e4) at moduleobject.c:134
#1 0x29fe4 in PyImport_Cleanup () at import.c:308
#2 0x30d18 in Py_Finalize () at pythonrun.c:206
#3 0x21c8c in Py_Main (argc=3, argv=0xeffff964) at main.c:298
#4 0x216e4 in main (argc=3, argv=0xeffff964) at python.c:12
I get the traceback above from a small module that
contains just 2 import statements. One module contains just
the declaration of 2 classes and the second module contains some
dicts,lists...nothing special. When I change the order of both import
statements in the main script no core dump occurs.
Any idea ?
Andreas
====================================================================
Audit trail:
Wed Sep 15 23:50:12 1999 guido changed notes
Wed Sep 15 23:50:12 1999 guido moved from incoming to irreproducible
Thu Sep 16 10:15:31 1999 guido changed notes
Thu Sep 16 10:15:32 1999 guido moved from irreproducible to 3rdpartybug
Follow-Ups:
Date: 2000-Aug-01 14:42
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Coredump in moduleobjectc.c:134 (PR#79)
Date: Thu, 16 Sep 1999 10:04:18 -0400
> I was able to get more information. The problem might occur with the following code:
>
> * module.py*
>
> from prod_support import read_current_prodids
>
> PRODIDS = read_current_prodids()
>
>
> * main.py *
>
> import module.py
>
>
> When I run python on main.py I get the bus error. When I switch module.py to:
>
> import prod_support
> PRODIDS = prod_support.read_current_prodids()
>
> everything is ok. The function read_current_prodids() uses DCOracle (Digicool/Zope).
> I'm not sure if this causes the problem - I'll try to figure it out.
Probably something in the prod_support module causes the problem. I'm
quite sure the problem is not in Python itself, so the Python bugs
list is not the place to report the bug.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:42
By: none
Comment:
Probably caused by DCOracle or other 3rd party extension.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110870&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:39:07 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:39:07 -0700
Subject: [Python-bugs-list] [Bug #110867] DCOracle select max() always returns integers (PR#289)
Message-ID: <200008062139.OAA01273@delerium.i.sourceforge.net>
Bug #110867, was updated on 2000-Aug-01 14:41
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: 3rd Party
Priority: 5
Summary: DCOracle select max() always returns integers (PR#289)
Details: Jitterbug-Id: 289
Submitted-By: bchen@exelixis.com
Date: Tue, 11 Apr 2000 18:52:54 -0400 (EDT)
Version: 1.5.2
OS: SUN Solaris
I am using DCOracle to retrieve the max and min values of
an attribute from a database. The attribute contains
floating point numbers. If I use
select attr_name
from table_name
I got a list of floating point numbers. But if I call
select max(attr_name)
from table_name
I always got integers. Can anyone help me figure out
what's wrong?
Thanks,
Bin
====================================================================
Audit trail:
Sat Jul 01 02:44:48 2000 fdrake moved from incoming to 3rdpartybug
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110867&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:39:24 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:39:24 -0700
Subject: [Python-bugs-list] [Bug #110707] does not compile under BSDI (PR#57)
Message-ID: <200008062139.OAA01284@delerium.i.sourceforge.net>
Bug #110707, was updated on 2000-Jul-31 14:29
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: does not compile under BSDI (PR#57)
Details: Jitterbug-Id: 57
Submitted-By: jital@knoggin.com
Date: Fri, 20 Aug 1999 04:18:04 -0400 (EDT)
Version: py152
OS: BSDI IServer
seems to think it is a NeXT arch or something
$ ./configure --prefix=/usr/home/knoggin/usr/local/
--exec-prefix=/usr/home/knoggin/usr/local/
creating cache ./config.cache
checking MACHDEP... bsdos3
checking CCC...
checking for --without-gcc... no
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking LINKCC... $(PURIFY) $(CC)
checking LDLIBRARY...
checking for ranlib... ranlib
checking for ar... ar
checking how to run the C preprocessor... gcc -D_HAVE_BSDI -E
checking for AIX... no
checking for minix/config.h... no
checking whether gcc -D_HAVE_BSDI accepts -OPT:Olimit=0... no
checking whether gcc -D_HAVE_BSDI accepts -Olimit 1500... no
checking for C preprocessor type... ansi
checking for ANSI C header files... yes
checking for dlfcn.h... yes
checking for fcntl.h... yes
checking for limits.h... yes
checking for locale.h... yes
checking for ncurses.h... yes
checking for pthread.h... yes
checking for signal.h... yes
checking for stdarg.h... yes
checking for stddef.h... yes
checking for stdlib.h... yes
checking for thread.h... no
checking for unistd.h... yes
checking for utime.h... yes
checking for sys/audioio.h... no
checking for sys/file.h... yes
checking for sys/lock.h... yes
checking for sys/param.h... yes
checking for sys/select.h... yes
checking for sys/time.h... yes
checking for sys/times.h... yes
checking for sys/un.h... yes
checking for sys/utsname.h... yes
checking for sys/wait.h... yes
checking for dirent.h that defines DIR... yes
checking for opendir in -ldir... no
checking for clock_t in time.h... yes
checking for mode_t... yes
checking for off_t... yes
checking for pid_t... yes
checking return type of signal handlers... void
checking for size_t... yes
checking for uid_t in sys/types.h... yes
checking size of int... 4
checking size of long... 4
checking size of void *... 4
checking for long long support... yes
checking size of long long... 8
checking size of off_t... 8
checking whether to enable large file support... yes
checking for --with-next-framework... no
checking for --with-dyld... required for framework build
checking SO... .so
checking LDSHARED... ld
checking CCSHARED...
checking LINKFORSHARED...
checking for dlopen in -ldl... yes
checking for shl_load in -ldld... no
checking for t_open in -lnsl... no
checking for socket in -lsocket... no
checking for socket in -lnet... no
checking for --with-libs... no
checking for --with(out)-readline... not specified.
checking for --with-dec-threads... no
checking for --with-threads... no
checking for --with-thread... no
checking for --with-sgi-dl... no
checking for --with-dl-dld... no
checking for alarm... yes
checking for chown... yes
checking for clock... yes
checking for dlopen... yes
checking for execv... yes
checking for flock... yes
checking for fork... yes
checking for fsync... yes
checking for fdatasync... no
checking for ftime... no
checking for ftruncate... yes
checking for getpeername... yes
checking for getpgrp... yes
checking for getpid... yes
checking for getpwent... yes
checking for gettimeofday... yes
checking for getwd... yes
checking for kill... yes
checking for link... yes
checking for lstat... yes
checking for mkfifo... yes
checking for mktime... yes
checking for nice... yes
checking for pause... yes
checking for plock... no
checking for pthread_init... yes
checking for putenv... yes
checking for readlink... yes
checking for select... yes
checking for setgid... yes
checking for setlocale... yes
checking for setuid... yes
checking for setsid... yes
checking for setpgid... yes
checking for setpgrp... yes
checking for setvbuf... yes
checking for sigaction... yes
checking for siginterrupt... yes
checking for sigrelse... no
checking for strftime... yes
checking for strptime... no
checking for symlink... yes
checking for tcgetpgrp... yes
checking for tcsetpgrp... yes
checking for timegm... no
checking for times... yes
checking for truncate... yes
checking for uname... yes
checking for waitpid... yes
checking for fseek64... no
checking for fseeko... no
checking for fstatvfs... no
checking for ftell64... no
checking for ftello... no
checking for statvfs... no
checking for dup2... yes
checking for getcwd... yes
checking for strdup... yes
checking for strerror... yes
checking for memmove... yes
checking for getpgrp... (cached) yes
checking for setpgrp... (cached) yes
checking for gettimeofday... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... yes
checking for time.h that defines altzone... no
checking whether sys/select.h and sys/time.h may both be included... yes
checking whether char is unsigned... no
checking for working const... yes
checking for working volatile... yes
checking for working signed char... yes
checking for prototypes... yes
checking for variable length prototypes and stdarg.h... yes
checking for bad exec* prototypes... no
checking for bad static forward... no
checking whether va_list is an array... no
checking for gethostbyname_r... no
checking for gethostbyname... yes
checking for __fpu_control in -lieee... no
checking for --with-fpectl... checking for --with-libm=STRING... default
LIBM="-
lm"
checking for --with-libc=STRING... default LIBC=""
checking for hypot... yes
checking for hypot... (cached) yes
checking for genuine getopt... yes
checking what malloc(0) returns... nonnull
updating cache ./config.cache
creating ./config.status
creating Makefile
creating Objects/Makefile
creating Parser/Makefile
creating Python/Makefile
creating Modules/Makefile.pre
creating Modules/Setup.thread
creating config.h
pcvendor:~/usr/local/src/Python-1.5.2 $ make
(cd Modules; make -f Makefile.pre Makefile)
cp ./Setup.in Setup
echo "# Edit this file for local setup changes" >Setup.local
rm -f ../libpython1.5.a
/bin/sh ./makesetup Setup.thread Setup.local Setup
making Makefile in subdirectory .
`Makefile' is up to date.
making Makefile in subdirectory Parser
`Makefile' is up to date.
making Makefile in subdirectory Objects
`Makefile' is up to date.
making Makefile in subdirectory Python
`Makefile' is up to date.
making Makefile in subdirectory Modules
`Makefile' is up to date.
(rm -f Modules/hassignal; cd Modules; make hassignal)
rm -f hassignal
for i in regexmodule.o regexpr.o pcremodule.o pypcre.o posixmodule.o
signalmo
dule.o arraymodule.o cmathmodule.o mathmodule.o stropmodule.o
structmodule.
o timemodule.o operator.o fcntlmodule.o pwdmodule.o grpmodule.o
selectmodu
le.o socketmodule.o errnomodule.o md5module.o md5c.o shamodule.o
rotormodul
e.o newmodule.o binascii.o parsermodule.o cStringIO.o cPickle.o config.o
ge
tpath.o main.o getbuildinfo.o; do if test "$i" = "signalmodule.o"; then echo
y
es >hassignal; break; fi; done
cd Parser ; make OPT="-g -O2" VERSION="1.5"
prefix="/usr/home/knoggin/usr/local
/" exec_prefix="/usr/home/knoggin/usr/local/" all
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c pgenmain.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c acceler.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c grammar1.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c listnode.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c node.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c parser.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c parsetok.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c tokenizer.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c bitset.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c metagrammar.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c firstsets.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c grammar.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c pgen.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c printgrammar.c
gcc -D_HAVE_BSDI -g -O2 pgenmain.o acceler.o grammar1.o listnode.o node.o
parse
r.o parsetok.o tokenizer.o bitset.o metagrammar.o firstsets.o grammar.o
pgen.o
printgrammar.o -ldl -o pgen
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c myreadline.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c intrcheck.c
cd Objects ; make OPT="-g -O2" VERSION="1.5"
prefix="/usr/home/knoggin/usr/local/" exec_prefix="/usr/home/knoggin/usr/local/"
all
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c abstract.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c bufferobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c classobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c cobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c complexobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c fileobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c floatobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c frameobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c funcobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c intobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c listobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c longobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c dictobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c methodobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c moduleobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c object.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c rangeobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c sliceobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c stringobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c tupleobject.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c typeobject.c
cd Python ; make OPT="-g -O2" VERSION="1.5"
prefix="/usr/home/knoggin/usr/local/" exec_prefix="/usr/home/knoggin/usr/local/"
all
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c bltinmodule.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c ceval.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c compile.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c errors.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c frozen.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c frozenmain.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getargs.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getcompiler.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getcopyright.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getmtime.c
gcc -D_HAVE_BSDI -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H
-DPLATFORM='"bsdos3"' ./getplatform.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c getversion.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c graminit.c
gcc -D_HAVE_BSDI -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c import.c
gcc -D_HAVE_BSDI -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -I/ ./importdl.c
./importdl.c:269: mach-o/dyld.h: No such file or directory
*** Error code 1
Stop.
*** Error code 1
Stop.
====================================================================
Audit trail:
Mon Aug 30 12:40:26 1999 guido changed notes
Mon Aug 30 12:40:26 1999 guido moved from incoming to irreproducible
Tue Oct 19 23:20:49 1999 guido sent reply 1
Tue Oct 19 23:21:36 1999 guido changed notes
Tue Oct 19 23:21:36 1999 guido moved from irreproducible to open
Tue Oct 19 23:30:25 1999 guido changed notes
Tue Oct 19 23:30:25 1999 guido moved from open to platformbug
Follow-Ups:
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Guido van Rossum
Subject: Re: does not compile under BSDI (PR#57)
Date: Tue Oct 19 23:20:49 1999
This same bug was reported by someone else for the same platform.
We arrived at the work-around of deleting the line
#define WITH_DYLD
from the config.h generated by the configure script.
If you are still experiencing problems building Python, please
try this.
--Guido van Rossum
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] does not compile under BSDI (PR#57)
Date: Fri, 20 Aug 1999 07:57:10 -0400
> Full_Name: John Ital
> Version: py152
> OS: BSDI IServer
>
> seems to think it is a NeXT arch or something
>
[...]
> gcc -D_HAVE_BSDI -c -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -I/ ./importdl.c
> ./importdl.c:269: mach-o/dyld.h: No such file or directory
> *** Error code 1
Very strange. I've never seen this before. It appears that somehow
USE_DYLD is defined at that point, which can only happen if WITH_DYLD
is defined, which can only happen if you specify --with-next-framework
or --with-dyld on the configure command line, which you didn't.
Perhaps you have a buggy preprocessor that is confused by the tangle
of #ifdefs in importdl.c?
I don't know how to help you; I know Python has been built
successfully on bsdos3 before, so I'm guessing it's something in your
setup, not a Python bug.
If you need more help, please ask a newsgroup -- either
comp.lang.python or a BSD specific one.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:03
By: none
Comment:
Work-around: if you delete
#define WITH_DYLD
from config.h, the build succeeds.
-------------------------------------------------------
Date: 2000-Aug-03 09:00
By: twouters
Comment:
For the record, I cannot reproduce this on the BSDI 3.1 systems we still have lying around. It *might* have been specific to BSDI 3.0, which we no longer have (for various reasons, like y2k bugs ;) and I've heard similar (but not the same) reports about BSD/OS running under a 'virtual' machine. However, I've never seen or heard about those 'virtual' BSD/OSes, other than in that c.l.py posting.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110707&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:41:25 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:41:25 -0700
Subject: [Python-bugs-list] [Bug #110859] Environment dependency in re parser (PR#290)
Message-ID: <200008062141.OAA01310@delerium.i.sourceforge.net>
Bug #110859, was updated on 2000-Aug-01 14:38
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Not a Bug
Priority: 3
Summary: Environment dependency in re parser (PR#290)
Details: Jitterbug-Id: 290
Submitted-By: nmm1@cam.ac.uk
Date: Wed, 12 Apr 2000 07:44:54 -0400 (EDT)
Version: 1.5.2
OS: Irix 6.5
The following code works perfectly when used interactively:
from re import match
if match(r'"([^\"]|\?""|\\?)*"','"abc"') :
print "Hello"
When run non-interactively (e.g. 'python junk.py'), it fails:
File "junk.py", line 3, in ?
if match(r'"([^\"]|\?""|\\?)*"','"abc"') :
File "/usr/local/Python-1.5.2/lib/python1.5/re.py", line 40, in match
return _cachecompile(pattern, flags).match(string)
File "/usr/local/Python-1.5.2/lib/python1.5/re.py", line 33, in _cachecompile
value = compile(pattern, flags)
File "/usr/local/Python-1.5.2/lib/python1.5/re.py", line 79, in compile
code=pcre_compile(pattern, flags, groupindex)
pcre.error: ('operand of unlimited repeat could match the empty string', 17)
====================================================================
Audit trail:
Tue Jul 11 08:29:16 2000 guido moved from incoming to open
Thu Jul 13 20:37:02 2000 fdrake changed notes
Thu Jul 13 20:37:02 2000 fdrake moved from open to irreproducible
Follow-Ups:
Date: 2000-Aug-01 14:38
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] Environment dependency in re parser (PR#290)
Date: Wed, 12 Apr 2000 22:30:46 -0400
> Full_Name: Nick Maclaren
> Version: 1.5.2
> OS: Irix 6.5
> Submission from: posh.mcc.wwwcache.ja.net (194.83.240.29)
>
>
> The following code works perfectly when used interactively:
>
> from re import match
>
> if match(r'"([^\"]|\?""|\\?)*"','"abc"') :
> print "Hello"
>
> When run non-interactively (e.g. 'python junk.py'), it fails:
>
> File "junk.py", line 3, in ?
> if match(r'"([^\"]|\?""|\\?)*"','"abc"') :
> File "/usr/local/Python-1.5.2/lib/python1.5/re.py", line 40, in match
> return _cachecompile(pattern, flags).match(string)
> File "/usr/local/Python-1.5.2/lib/python1.5/re.py", line 33, in
> _cachecompile
> value = compile(pattern, flags)
> File "/usr/local/Python-1.5.2/lib/python1.5/re.py", line 79, in compile
> code=pcre_compile(pattern, flags, groupindex)
> pcre.error: ('operand of unlimited repeat could match the empty
> string', 17)
It yields the same error for me whether run interactively or from file,
under the released 1.5.2 for Windows, here run from a DOS box:
D:\Python>python
Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from re import match
>>> if match(r'"([^\"]|\?""|\\?)*"','"abc"') :
... print "Hello"
...
Traceback (innermost last):
File "", line 1, in ?
File "D:\Python\Lib\re.py", line 40, in match
return _cachecompile(pattern, flags).match(string)
File "D:\Python\Lib\re.py", line 33, in _cachecompile
value = compile(pattern, flags)
File "D:\Python\Lib\re.py", line 79, in compile
code=pcre_compile(pattern, flags, groupindex)
pcre.error: ('operand of unlimited repeat could match the empty string', 17)
>>>
The error msg is appropriate, since the third branch of the alternative
matches 0 or 1 backslashes, so the alternative as a whole can match the
empty string -- the error msg means exactly what it says. This is
functioning correctly as designed.
Perhaps you're using an interactive shell with a filter (readline?) that's
chewing up some of the backslashes itself?
-------------------------------------------------------
Date: 2000-Aug-01 14:38
By: none
Comment:
Something from outside of Python appears to causing this.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110859&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:41:48 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:41:48 -0700
Subject: [Python-bugs-list] [Bug #110676] fd.readlines() hangs (via popen3) (PR#385)
Message-ID: <200008062141.OAA01320@delerium.i.sourceforge.net>
Bug #110676, was updated on 2000-Jul-31 14:13
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: fd.readlines() hangs (via popen3) (PR#385)
Details: Jitterbug-Id: 385
Submitted-By: aron@gweep.net
Date: Tue, 4 Jul 2000 19:07:55 -0400 (EDT)
Version: 1.5.2
OS: Red Hat Linux 6.1 (2.1.12-20)
The following scripts cause a hang at the denoted line. To execute
this code, copy the first bit to master.py and the second to slave.py
(both should be in the same directory). Then, "cd" to that directory
and "python master.py".
Manually killing the program is necessary.
This script has also been tested on a Solaris 5.7 box and worked.
---master.py---
import popen2
r,w,e = popen2.popen3 ( 'python slave.py' )
r.readlines() # Hangs here
e.readlines()
r.close()
e.close()
w.close()
---end---
---slave.py---
import sys
e = sys.stderr.write
w = sys.stdout.write
e(400*'this is a test\n')
w(400*'this is another test\n')
---end---
====================================================================
Audit trail:
Tue Jul 11 08:24:23 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110676&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:42:36 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:42:36 -0700
Subject: [Python-bugs-list] [Bug #110835] Find out size of primitive object (PR#214)
Message-ID: <200008062142.OAA01332@delerium.i.sourceforge.net>
Bug #110835, was updated on 2000-Aug-01 14:13
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Find out size of primitive object (PR#214)
Details: Jitterbug-Id: 214
Submitted-By: loewis@informatik.hu-berlin.de
Date: Fri, 25 Feb 2000 14:28:33 -0500 (EST)
Version: 1.5.2
OS: Solaris
This is a feature request made on python-help. If you want to estimate
how much memory your application uses, you currently have to count the bytes
manually. If there was a builtin function (say, sys.sizeof), counting would
be much easier. It would be documented as
sizeof(object) -> integer
Return the number of bytes that an object uses internally. This only counts
the number of bytes used by the object itself, not those of any of its
attributes.
Ie. sys.sizeof(0) would give 12 on my system, the size of a dictionary would
count the dictentries, but the size of an instanceobject would not count the
the size of the __dict__ attribute.
====================================================================
Audit trail:
Tue Mar 07 14:42:18 2000 guido changed notes
Tue Mar 07 14:42:18 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:14
By: none
Comment:
Interesting idea.
Is this what we need?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110835&group_id=5470
From noreply@sourceforge.net Sun Aug 6 22:43:01 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 14:43:01 -0700
Subject: [Python-bugs-list] [Bug #110642] freeze with "-s service" and "-m" (PR#315)
Message-ID: <200008062143.OAA01352@delerium.i.sourceforge.net>
Bug #110642, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: demos and tools
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: freeze with "-s service" and "-m" (PR#315)
Details: Jitterbug-Id: 315
Submitted-By: tdickenson@geminidataloggers.com
Date: Fri, 5 May 2000 05:50:37 -0400 (EDT)
Version: 1.5.2
OS: Windows
There is a problem with combining two different options to freeze. Those options
are:
1. "-s service" indicating that the frozen program is a windows service. one
effect of this is that the myscript.py file on the freeze command line should be
available for import, not as __main__
2. "-m" indicating that extra modules are to be included in the freeze.
The relevant block of code is at line 335...
# Add the main script as either __main__, or the actual module name.
if python_entry_is_main:
mf.run_script(scriptfile)
else:
if modargs:
mf.import_hook(scriptfile)
else:
mf.load_file(scriptfile)
For a service, the outer 'else' block is entered.
If -m is not specified then the inner 'else' block is entered. mf.load_file
assumes its parameter is a filename (to be imported from), an everything is
happy.
If -m is specified then the inner 'if' block is entered. mf.import_hook assumes
its parameter is a module to imported. This fails because "myscript.py" is not a
module name, and can not be imported.
I think this block of code was naively copy/pasted from the block above it
(where it correctly implements the -m option), and never tested with the -m
option.
This block (starting line 335) should be replaced with
# Add the main script as either __main__, or the actual module name.
if python_entry_is_main:
mf.run_script(scriptfile)
else:
mf.load_file(scriptfile)
I have tested this patch on windows, freezing service and non-service scripts,
both with and without -m
====================================================================
Audit trail:
Mon May 22 17:28:43 2000 guido changed notes
Mon May 22 17:28:43 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:10
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] freeze with "-s service" and "-m" (PR#315)
Date: Fri, 5 May 2000 23:19:14 +1000
> I think this block of code was naively copy/pasted from the
> block above it
Quite likely!
> This block (starting line 335) should be replaced with
...
If you submit a patch to this effect (to the patches address), I would be
happy to bless it (and given that the service code is mine, I guess that
would be all that is needed...)
Thanks,
Mark.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110642&group_id=5470
From noreply@sourceforge.net Sun Aug 6 23:55:09 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 6 Aug 2000 15:55:09 -0700
Subject: [Python-bugs-list] [Bug #110673] os.abspatth() error due to win32api.GetFullPathName (PR#380)
Message-ID: <200008062255.PAA11182@bush.i.sourceforge.net>
Bug #110673, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: os.abspatth() error due to win32api.GetFullPathName (PR#380)
Details: Jitterbug-Id: 380
Submitted-By: 2jerry@writeme.com
Date: Mon, 3 Jul 2000 17:14:02 -0400 (EDT)
Version: 1.5.2 (win32api build 129)
OS: pc win98
next to code:
full_path_lst = map(os.path.abspath, sys.path)
according to that sys.path include the source directory at the first place of
sys.path.
I noticed that if I call the module in its own directory (python -i module.py)
the first item of sys.path is ''.
That all ok: abspath function in os module call getcwd() function if path is
Null.
...
good day for UNIX like men (as me :))
...
but in NT or WIN 98 workstation:
os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
and
win32api.GetFullPathName('') return '' and not current directory.
Maybe is it a functionality .. but is os-depend functionality available for a
longtime ?
Jerome.vacher alias Jerry the foolish dracomorpheus.
====================================================================
Audit trail:
Tue Jul 11 08:24:22 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 16:19:30 +1000
Can anyone else here confirm that:
a) os.abspath('') on Linux does indeed return the CWD.
b) It is supposed to :-)
If confirmed, this would be a bug in ntpath.py. It catches win32api
exceptions, and returns the input name in that case. This would be
triggered by:
>>> win32api.GetFullPathName('')
Traceback (most recent call last):
File "", line 1, in ?
pywintypes.api_error: (127, 'GetFullPathName', 'The specified procedure
could not be found.')
Is this indeed something we should fix?
Mark.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> 2jerry@writeme.com
> Sent: Tuesday, 4 July 2000 7:14 AM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] win32api.GetFullPathName (build 129)
> (PR#380)
>
>
> Full_Name: Jerome VACHER
> Version: 1.5.2 (win32api build 129)
> OS: pc win98
> Submission from: ppp-55.dialup-166.worldonline.fr (212.83.166.55)
>
>
> next to code:
> full_path_lst = map(os.path.abspath, sys.path)
>
> according to that sys.path include the source directory at the
> first place of
> sys.path.
>
> I noticed that if I call the module in its own directory (python
> -i module.py)
> the first item of sys.path is ''.
> That all ok: abspath function in os module call getcwd()
> function if path is
> Null.
> ...
> good day for UNIX like men (as me :))
> ...
> but in NT or WIN 98 workstation:
> os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
> and
> win32api.GetFullPathName('') return '' and not current directory.
>
> Maybe is it a functionality .. but is os-depend functionality
> available for a
> longtime ?
>
> Jerome.vacher alias Jerry the foolish dracomorpheus.
>
>
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Fred L. Drake, Jr."
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 13:34:24 -0400 (EDT)
Mark Hammond writes:
> Can anyone else here confirm that:
>
> a) os.abspath('') on Linux does indeed return the CWD.
Yes, that's right.
> b) It is supposed to :-)
I think that's the right thing to do.
-Fred
--
Fred L. Drake, Jr.
BeOpen PythonLabs Team Member
-------------------------------------------------------
Date: 2000-Aug-06 13:56
By: twouters
Comment:
Possibly already fixed, or at least Mark has looked at it :)
-------------------------------------------------------
Date: 2000-Aug-06 15:55
By: mhammond
Comment:
This is not a bug in win32api.GetFullPathName(), but rather the use of GetFullPathName() to implement os.abspath(). Bug summary changed accordingly. Confirmed as a bug, and I will fix it!
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110673&group_id=5470
From noreply@sourceforge.net Mon Aug 7 12:36:19 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Mon, 7 Aug 2000 04:36:19 -0700
Subject: [Python-bugs-list] [Bug #110645] XMLLIB, JPython and re (PR#328)
Message-ID: <200008071136.EAA26837@delerium.i.sourceforge.net>
Bug #110645, was updated on 2000-Jul-31 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: XMLLIB, JPython and re (PR#328)
Details: Jitterbug-Id: 328
Submitted-By: peter@verecomm.com
Date: Mon, 15 May 2000 15:21:33 -0400 (EDT)
Version: 1.52
OS: Linux
There's a problem with the xmllib module when used with JPython. Specifically,
the JPython re module has trouble with the () characters in strings passed into
re.compile. Until the JPython folks fix the re module, I'd like to ask that the
xmllib module be modified to escape the () characters. Here's the output from
diff:
$ diff xmllib.py /usr/lib/python1.5/
29c29
< '(?P'+_QStr+'|[-a-zA-Z0-9.:+*%?!\(\)_#=~]+))?')
---
> '(?P'+_QStr+'|[-a-zA-Z0-9.:+*%?!()_#=~]+))?')
45,46c45,46
< _PublicLiteral = '(?P<%s>"[-\'\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
< "'[-\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
---
> _PublicLiteral = '(?P<%s>"[-\'()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
> "'[-()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
Thanks!
====================================================================
Audit trail:
Mon May 22 17:29:00 2000 guido changed notes
Tue Jul 11 08:29:18 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110645&group_id=5470
From noreply@sourceforge.net Mon Aug 7 13:07:42 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Mon, 7 Aug 2000 05:07:42 -0700
Subject: [Python-bugs-list] [Bug #110664] PRIVATE: Bug in re module (PR#36)
Message-ID: <200008071207.FAA27885@delerium.i.sourceforge.net>
Bug #110664, was updated on 2000-Jul-31 14:11
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: PRIVATE: Bug in re module (PR#36)
Details: Jitterbug-Id: 36
Submitted-By: chenna@embl-heidelberg.de
Date: Fri, 23 Jul 1999 06:51:43 -0400 (EDT)
Version: 1.5.1
OS: OSF1
Hello I get
Stack overflow: pid 14731, proc emparse1.py, addr 0x11fdfffd8, pc 0x120068cd8
Segmentation fault
when I run the following. The problem is re module unable to search
for the pattern that is too large, but this is a requirement for my
application in biology. I enclose the source code with this.
Please email me the solution as soon as possible
Thanks
Ramu
___________________________
#!/usr/pub/bin/python1.5
#
#
#
# (C) Chenna Ramu, EMBL, Heidelberg, Germany
#
# parser for biological databases
#
import string
import sys
import re
parserDict = {
'id' : r'((^ID [^\n]+\n)+)' ,
'ac' : r'((^AC [^\n]+\n)+)' ,
'dt' : r'((^DT [^\n]+\n)+)' ,
'de' : r'((^DE [^\n]+\n)+)' ,
'gn' : r'((^GN [^\n]+\n)+)' ,
'os' : r'((^OS [^\n]+\n)+)' ,
'oc' : r'((^OC [^\n]+\n)+)' ,
'ref' : r'(('
r'(^RN [^\n]+\n)'
r'((^RP [^\n]+\n)+)'
r'((^RX [^\n]+\n)?)'
r'((^RA [^\n]+\n)+)'
r'((^RT [^\n]+\n)*)'
r'((^RL [^\n]+\n)+)'
r')+)',
'cc' : r'((^CC [^\n]+\n)+)' ,
'dr' : r'((^DR [^\n]+\n)+)' ,
'kw' : r'((^KW [^\n]+\n)+)' ,
'ft' : r'((^FT [^\n]+\n)+)' ,
'sq' : r'(^SQ [^\n]+\n)' \
r'((^ [^\n]+\n)+)'
}
_hrefLink = {'embl':['%s','^DR ([^;]+)']} #should be like this
hrefLink = {'EMBL':"%s",
'MIM':"%s"}
em_rep = r'(^DR )(?P[^;]+); (?P[^;]+)'
class embl:
def __init__(self,parserDict={}):
self.parserDict = {}
self.reDict = {} #keep the compiled re's
self.fields = []
if parserDict:
self.Init(parserDict)
def Init(self,parserDict):
self.parserDict = parserDict
self.fields = parserDict.keys()
for j in self.fields:
setattr(self, j, None)
self.reDict[j] = re.compile(parserDict[j],re.MULTILINE)
def Parse(self,str):
if not self.parserDict:
print "No parser specified"
return
for k,v in parserDict.items():
## tmp = re.compile(v,re.MULTILINE) # move this to __init__
tmp = self.reDict[k]
mat = tmp.search(str)
if mat:
setattr(self, k, mat.group() )
def Field(self,name):
try:
return getattr(self,name)
except AttributeError:
return None
def PrintFields(self):
flds = self.fields
for j in flds:
print "==> ",j
print getattr(self,j)
def ReParse(self,str,retToken,pat):
""" str:string to parse, retToken:return token, pat:parser """
_p = re.compile(pat)
m = _p.search(str)
if m:
return m.group(retToken)
else:
return None
def Href(match):
""" Replaces the hrefs """
dbase = match.group('dbase')
id = match.group('id')
try:
defi = hrefLink[dbase]
except KeyError:
defi = None
if defi:
tmp = match.group(1) + dbase + '; '+defi %(dbase,id,id)
else:
tmp = match.group(1)+ dbase + '; ' + id
return tmp
def test(fileName):
sys.path.insert(0,'/home/chenna/py')
## from seqFormat import *
e = embl(parserDict)
# f = open('acha_mouse.dat','r')
f = open(fileName,'r')
a = f.readlines()
f.close()
a = string.join(a,'')
e.Parse(a)
e.PrintFields()
import string
print ' the fields are ',e.fields
## seq = string.split(e.sq,';')[-1]
## s = Seq(seq,'test')
## print 'check===>',s.seq
## s.SeqPrint('swiss')
seqLen = e.ReParse(e.sq[0:50],'seqLen',r'^SQ [^ ]+ *(?P(\d+))')
print e.sq
print "length of the sequence ",seqLen
print e.ref
dr = e.dr
print dr
p = re.compile(em_rep,re.M)
dr = p.sub(Href,dr)
print dr
print e.Field('id')
print e.Field('dr')
print e.Field('mm')
return
def test1(dumm=None):
tmp = ['SQ Sequence 1041931 BP; 8972 A; 5950 C; 6264 G; 8224 T; 0
other;\n']
for j in range(1,17365):
t = ' ' + 'tcagtcagtg ' * 6 + '\n'
tmp.append(t)
a = string.join(tmp)
e = embl(parserDict)
e.Parse(a)
e.PrintFields()
if __name__ == '__main__':
try:
test1(sys.argv[1])
except:
test1()
====================================================================
Audit trail:
Sat Jul 24 16:53:53 1999 guido changed notes
Sat Jul 24 16:53:53 1999 guido moved from incoming to open
Sat Jul 24 17:04:17 1999 guido changed notes
Follow-Ups:
Date: 2000-Aug-06 13:53
By: twouters
Comment:
Fair chance this is already fixed, either in 1.5.2 remodule, or in the new 'sre' by Fredrik. Maybe /F can say something useful here.
-------------------------------------------------------
Date: 2000-Aug-07 05:07
By: effbot
Comment:
It works fine under SRE, but bombs under PRE using a recent 2.0 build (tested on Windows).
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110664&group_id=5470
From noreply@sourceforge.net Tue Aug 8 00:29:03 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Mon, 7 Aug 2000 16:29:03 -0700
Subject: [Python-bugs-list] [Bug #111319] Autoconfig breakdown with gnu libc-2.1.3
Message-ID: <200008072329.QAA19294@delerium.i.sourceforge.net>
Bug #111319, was updated on 2000-Aug-07 16:29
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: Autoconfig breakdown with gnu libc-2.1.3
Details:
Pythons config.h (which is included via Python.h)
defines this on redhat-6.2:
/* Define to `int' if doesn't define. */
#define socklen_t int
The trouble is that gnu libc-2.1.3 does not define
socklen_t in . It defines it in
:
/* Type for length arguments in socket calls. */
typedef unsigned int socklen_t;
In this case, pythons definition causes a compilation
failure which can be demonstrated by the following simple
program:
#include
#include
int main() { return 0; }
My guess is that the autoconfig macros need to be updated
to search as well.
Mike Romberg (romberg@fsl.noaa.gov)
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111319&group_id=5470
From noreply@sourceforge.net Tue Aug 8 12:22:50 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Tue, 8 Aug 2000 04:22:50 -0700
Subject: [Python-bugs-list] [Bug #110645] XMLLIB, JPython and re (PR#328)
Message-ID: <200008081122.EAA16392@bush.i.sourceforge.net>
Bug #110645, was updated on 2000-Jul-31 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Closed
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Summary: XMLLIB, JPython and re (PR#328)
Details: Jitterbug-Id: 328
Submitted-By: peter@verecomm.com
Date: Mon, 15 May 2000 15:21:33 -0400 (EDT)
Version: 1.52
OS: Linux
There's a problem with the xmllib module when used with JPython. Specifically,
the JPython re module has trouble with the () characters in strings passed into
re.compile. Until the JPython folks fix the re module, I'd like to ask that the
xmllib module be modified to escape the () characters. Here's the output from
diff:
$ diff xmllib.py /usr/lib/python1.5/
29c29
< '(?P'+_QStr+'|[-a-zA-Z0-9.:+*%?!\(\)_#=~]+))?')
---
> '(?P'+_QStr+'|[-a-zA-Z0-9.:+*%?!()_#=~]+))?')
45,46c45,46
< _PublicLiteral = '(?P<%s>"[-\'\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
< "'[-\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
---
> _PublicLiteral = '(?P<%s>"[-\'()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
> "'[-()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
Thanks!
====================================================================
Audit trail:
Mon May 22 17:29:00 2000 guido changed notes
Tue Jul 11 08:29:18 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-08 04:22
By: sjoerd
Comment:
This bug was fixed in revision 1.18.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110645&group_id=5470
From noreply@sourceforge.net Tue Aug 8 19:26:28 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Tue, 8 Aug 2000 11:26:28 -0700
Subject: [Python-bugs-list] [Bug #111403] 1.6b1 dumps core dereferencing a NULL tstate
Message-ID: <200008081826.LAA23686@delerium.i.sourceforge.net>
Bug #111403, was updated on 2000-Aug-08 11:26
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: 1.6b1 dumps core dereferencing a NULL tstate
Details:
This is from an embeded python. I've not yet been
able to reproduce this with a small example. But
perhaps this stacktrace will be of some help. The
problem seems to be that eval_code2() calls PyThreadState_GET() and gets a NULL pointer back.
This pointer is dereferenced in PyFrame_New() later
on which causes the core dump. The documentation
seems to say that PyThreadState_GET() should never
return NULL. So, there must be a bug in there
somewhere. Here is the stack trace:
#0 0x86858c8 in PyFrame_New (tstate=0x0, code=0x90fff70, globals=0x9284378,
locals=0x0) at frameobject.c:120
120 PyFrameObject *back = tstate->frame;
(gdb) bt
#0 0x86858c8 in PyFrame_New (tstate=0x0, code=0x90fff70, globals=0x9284378,
locals=0x0) at frameobject.c:120
#1 0x866b022 in eval_code2 (co=0x90fff70, globals=0x9284378, locals=0x0,
args=0x8eb362c, argcount=5, kws=0x0, kwcount=0, defs=0x0, defcount=0,
owner=0x925d2e8) at ceval.c:397
#2 0x866e4ee in call_function (func=0x911aca0, arg=0x95ea3b0, kw=0x0)
at ceval.c:2521
#3 0x866e09d in PyEval_CallObjectWithKeywords (func=0x95f7a60, arg=0x95ea3b0,
kw=0x0) at ceval.c:2359
#4 0x863f6cf in PyObject_CallObject (o=0x95f7a60, a=0x95ea3b0)
at abstract.c:1370
#5 0x83e56ed in DrawingArea::process (this=0x95f5f48, event=@0xbfffeb80)
at DrawingArea.C:971
#6 0x83e5b3d in DrawingArea::dspCB (this=0x95e0b68) at DrawingArea.C:1027
#7 0x832050f in TkFDWatcher::callback (data=0x95e2048) at TkFDWatcher.C:169
#8 0x8752612 in FileHandlerEventProc (evPtr=0x935a4d8, flags=-1)
at ./tclUnixNotfy.c:405
#9 0x8741d10 in Tcl_ServiceEvent (flags=-1) at ./../generic/tclNotify.c:444
#10 0x8741fae in Tcl_DoOneEvent (flags=2) at ./../generic/tclNotify.c:747
#11 0x86a8757 in Tkapp_MainLoop (self=0x8f6a178, args=0x8eb6af0)
at ./_tkinter.c:1794
#12 0x866e19e in call_builtin (func=0x8f7b7f0, arg=0x8eb6af0, kw=0x0)
at ceval.c:2396
#13 0x866e0ab in PyEval_CallObjectWithKeywords (func=0x8f7b7f0, arg=0x8eb6af0,
kw=0x0) at ceval.c:2361
#14 0x866d0cb in eval_code2 (co=0x8fb2d18, globals=0x903b9f8, locals=0x0,
args=0x8f277b4, argcount=0, kws=0x8f277b4, kwcount=0, defs=0x90447c4,
defcount=1, owner=0x0) at ceval.c:1680
#15 0x866cdda in eval_code2 (co=0x8f28b10, globals=0x8f294d0, locals=0x0,
args=0x8f27600, argcount=1, kws=0x8f27604, kwcount=0, defs=0x0,
defcount=0, owner=0x92c6238) at ceval.c:1579
#16 0x866cdda in eval_code2 (co=0x8f5b300, globals=0x8f294d0, locals=0x0,
args=0x8eb8600, argcount=0, kws=0x8eb8600, kwcount=0, defs=0x0,
defcount=0, owner=0x0) at ceval.c:1579
#17 0x866cdda in eval_code2 (co=0x8f27ae0, globals=0x8eb0038,
locals=0x8eb0038, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0,
defcount=0, owner=0x0) at ceval.c:1579
#18 0x866afc8 in PyEval_EvalCode (co=0x8f27ae0, globals=0x8eb0038,
locals=0x8eb0038) at ceval.c:290
#19 0x867d7c7 in run_node (n=0x8f1d0e0, filename=0x89fcacf "",
globals=0x8eb0038, locals=0x8eb0038) at pythonrun.c:885
#20 0x867d777 in run_err_node (n=0x8f1d0e0, filename=0x89fcacf "",
globals=0x8eb0038, locals=0x8eb0038) at pythonrun.c:870
#21 0x867d719 in PyRun_String (str=0x8f1ca68 "import GFE; GFE.main()\n",
start=257, globals=0x8eb0038, locals=0x8eb0038) at pythonrun.c:847
#22 0x867ce4e in PyRun_SimpleString (
command=0x8f1ca68 "import GFE; GFE.main()\n") at pythonrun.c:589
#23 0x8681c51 in Py_Main (argc=4, argv=0xbffff204) at main.c:248
#24 0x80d90e1 in main (argc=4, argv=0xbffff204) at main.C:30
Mike Romberg (romberg@fsl.noaa.gov)
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111403&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:15:43 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:15:43 -0700
Subject: [Python-bugs-list] [Bug #110603] Tkinter winfo_visualsavailable method (PR#156)
Message-ID: <200008090915.CAA31163@bush.i.sourceforge.net>
Bug #110603, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Tkinter winfo_visualsavailable method (PR#156)
Details: Jitterbug-Id: 156
Submitted-By: piers@cs.su.oz.au
Date: Thu, 9 Dec 1999 17:09:50 -0500 (EST)
Version: 1.5.2
OS: Solaris/Linux/win95
The Tkinter winfo_visualsavailable method fails if there is only one visual
available, as the code assumes a list is returned, when in fact
Tcl/Tk returns a string in the form '{truecolor 24}'
====================================================================
Audit trail:
Tue Dec 14 17:15:16 1999 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110603&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:16:20 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:16:20 -0700
Subject: [Python-bugs-list] [Bug #110605] Tkinter inconsistency (missing methods) (PR#161)
Message-ID: <200008090916.CAA31175@bush.i.sourceforge.net>
Bug #110605, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Tkinter inconsistency (missing methods) (PR#161)
Details: Jitterbug-Id: 161
Submitted-By: Guido van Rossum
Date: Thu, 16 Dec 1999 15:49:26 -0500
Version: None
OS: None
------- Forwarded Message
Date: Thu, 16 Dec 1999 13:48:20 +1100
From: Jonathan Giddy
To: guido@python.org
Subject: Tkinter inconsistency (missing methods)
In Tkinter.py, most scrollable widgets support [xy]view_moveto and
[xy]view_scroll, in addition to a basic [xy]view method.
However, the Text widget is missing these additional methods.
Thanks,
Jon.
------- End of Forwarded Message
====================================================================
Audit trail:
Wed Jan 12 18:30:41 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110605&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:17:13 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:17:13 -0700
Subject: [Python-bugs-list] [Bug #110671] Tk-based widgets misbehave with dead keys (PR#376)
Message-ID: <200008090917.CAA31202@bush.i.sourceforge.net>
Bug #110671, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: 3rd Party
Priority: 5
Summary: Tk-based widgets misbehave with dead keys (PR#376)
Details: Jitterbug-Id: 376
Submitted-By: fstajano@uk.research.att.com
Date: Thu, 29 Jun 2000 12:49:44 -0400 (EDT)
Version: 1.6a2
OS: Windows 98 and 2000
This is a problem of the underlying widget set and not of Idle itself, but Idle
is where I encountered it (I normally use Emacs), and since Python 1.6 is the
unicode version I suppose it's worth looking into anyway (what good is it to
have international chars if you can't input them ;-)).
If, on Windows, you use a keyboard layout with dead keys, such as "United States
- International", then Idle does not respond properly to dead keys. In
particular, double-quote comes out as single-quote; single-quote comes out as
space; and accented characters come out as non-accented.
The lack of support for the accented chars is a minor nuisance, but the problems
with quotes are a major one -- Idle is almost unusable under these
circumstances. Not as bad as Pythonwin, though, which just crashes.
[As you will know, the US-I keyboard defines things like single-quote and
double-quote as dead keys so that one can produce accents and umlauts
respectively by following the dead key with the appropriate vowel. To produce a
double-quote on its own, you have to press double-quote followed by space.]
====================================================================
Audit trail:
Tue Jul 11 08:24:21 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110671&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:18:08 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:18:08 -0700
Subject: [Python-bugs-list] [Bug #110677] PRIVATE: various minor Tkinter things (PR#388)
Message-ID: <200008090918.CAA31221@bush.i.sourceforge.net>
Bug #110677, was updated on 2000-Jul-31 14:13
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: PRIVATE: various minor Tkinter things (PR#388)
Details: Jitterbug-Id: 388
Submitted-By: markus.oberhumer@jk.uni-linz.ac.at
Date: Wed, 5 Jul 2000 09:38:11 -0400 (EDT)
Version: python CVS
OS: all
Tkinter.Wm.wm_state() lacks a missing "newstate=None" optional parameter.
Tkinter.Text lacks some important methods: [xy]view_moveto, [xy]view_scroll
Canvas.CanvasItem & Canvas.Group:
- bind lacks an optional "add" param
- unbind lacks an optional "funcid" param
- tkraise/lower should call self.canvas.tag_XXXX
- bbox() return value is inconsistent with Canvas.bbox()
====================================================================
Audit trail:
Tue Jul 11 08:24:23 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110677&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:21:00 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:21:00 -0700
Subject: [Python-bugs-list] [Bug #110823] Tkinter missing button state symbols (PR#132)
Message-ID: <200008090921.CAA31377@bush.i.sourceforge.net>
Bug #110823, was updated on 2000-Aug-01 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Tkinter missing button state symbols (PR#132)
Details: Jitterbug-Id: 132
Submitted-By: aa8vb@yahoo.com
Date: Thu, 18 Nov 1999 08:16:55 -0500 (EST)
Version: 1.5.2
OS: IRIX 6.5
I have:
picture.bind( "" , click_cb )
picture.bind( "", click_cb )
In click_cb(), event.state is 0 for ButtonPress and 256 for ButtonRelease.
Where are the Tkinter constants for these? Or how should one distinguish
between a press and release in a callback?
(I want to avoid having a separate callback for each type of event.)
====================================================================
Audit trail:
Thu Nov 18 10:42:46 1999 guido changed notes
Thu Nov 18 10:42:46 1999 guido moved from incoming to notabug
Thu Nov 18 14:07:59 1999 guido changed notes
Thu Nov 18 14:07:59 1999 guido moved from notabug to request
Follow-Ups:
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Tkinter missing button state symbols (PR#132)
Date: Thu, 18 Nov 1999 10:41:31 -0500
> Full_Name: Randall Hopper
> Version: 1.5.2
> OS: IRIX 6.5
> Submission from: ethyl-f.rtpfddi.epa.gov (134.67.65.11)
>
>
> I have:
>
> picture.bind( "" , click_cb )
> picture.bind( "", click_cb )
>
> In click_cb(), event.state is 0 for ButtonPress and 256 for ButtonRelease.
>
> Where are the Tkinter constants for these? Or how should one distinguish
> between a press and release in a callback?
>
> (I want to avoid having a separate callback for each type of event.)
This is not a question for the bugs list.
Write to help@python.org or use the newsgroup for help. I don't know
offhand what the answer is to your question; I suspect that the answer
is in the Tcl/Tk man page for the bind command though.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Randall Hopper
Subject: Re: [Python-bugs-list] Tkinter missing button state symbols (PR#132)
Date: Thu, 18 Nov 1999 14:04:13 -0500
Guido van Rossum:
|> Full_Name: Randall Hopper
|> Version: 1.5.2
|> OS: IRIX 6.5
|> Submission from: ethyl-f.rtpfddi.epa.gov (134.67.65.11)
|>
|>
|> I have:
|>
|> picture.bind( "" , click_cb )
|> picture.bind( "", click_cb )
|>
|> In click_cb(), event.state is 0 for ButtonPress and 256 for ButtonRelease.
|>
|> Where are the Tkinter constants for these? Or how should one distinguish
|> between a press and release in a callback?
|>
|> (I want to avoid having a separate callback for each type of event.)
|
|This is not a question for the bugs list.
|
|Write to help@python.org or use the newsgroup for help. I don't know
|offhand what the answer is to your question; I suspect that the answer
|is in the Tcl/Tk man page for the bind command though.
My fault. I should have rephrased the question into a statement. Tkinter
does not provide symbol defines for event.state values (%s keyword in Tcl).
Tcl doesn't either, but it would be useful if Tkinter did.
This is a small enhancement request rather than a hard bug, but I thought
the submission form was for probably applicable for both.
Thanks,
Randall
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Tkinter missing button state symbols (PR#132)
Date: Thu, 18 Nov 1999 14:05:57 -0500
Yes, requests are okay. Sorry for the confusion.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
Should add a symbol as he suggests.
-------------------------------------------------------
Date: 2000-Aug-09 02:21
By: effbot
Comment:
IIRC, these constants are platform (X library) dependent (they have to be exported from _tkinter.c, not Tkconstants.py).
I'll investigate. Feel free to assign the bug to me if you like.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110823&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:27:41 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:27:41 -0700
Subject: [Python-bugs-list] [Bug #110866] re group self-reference weird behavior (PR#2)
Message-ID: <200008090927.CAA31600@bush.i.sourceforge.net>
Bug #110866, was updated on 2000-Aug-01 14:41
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: 3rd Party
Priority: 5
Summary: re group self-reference weird behavior (PR#2)
Details: Jitterbug-Id: 2
Submitted-By: guido@python.org
Date: Mon, 12 Jul 1999 15:03:24 -0400 (EDT)
Version: 1.5.2
OS: Unix, Windows
Try the following:
import re
re.search("((.)\\1+)","a")
This isn't proper syntax (you shouldn't reference a group
inside itself), but it seems to hang -- in fact it takes
several minutes to execute.
Possibly it runs out of some resource on its path to infinite
recursion and then backtracks?
====================================================================
Audit trail:
Mon Jul 12 15:33:07 1999 guido moved from incoming to open
Mon Jul 12 19:02:35 1999 guido changed notes
Thu Jul 13 20:28:48 2000 fdrake changed notes
Thu Jul 13 20:28:48 2000 fdrake changed notification
Thu Jul 13 20:28:48 2000 fdrake moved from open to 3rdpartybug
Follow-Ups:
Date: 2000-Aug-01 14:41
By: none
Comment:
AMK: pcre bug that's been fixed in more recent releases, but that's no longer
relevant with SRE in the picture.
-------------------------------------------------------
Date: 2000-Aug-09 02:27
By: effbot
Comment:
on the other hand, SRE says "nothing to repeat" -- which isn't really what it should do. Looks like the width calculation messes up on GROUPREF's...
I've reassigned it to myself!
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110866&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:33:57 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:33:57 -0700
Subject: [Python-bugs-list] [Bug #110869] REs beginning with .* (PR#47)
Message-ID: <200008090933.CAA31834@bush.i.sourceforge.net>
Bug #110869, was updated on 2000-Aug-01 14:42
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Closed
Resolution: None
Bug Group: 3rd Party
Priority: 5
Summary: REs beginning with .* (PR#47)
Details: Jitterbug-Id: 47
Submitted-By: nfakh@bom2.vsnl.net.in
Date: Sun, 8 Aug 1999 11:42:13 -0400 (EDT)
Version: 1.5.1, 1.5.2
OS: Linux (RedHat 5.2)
Let p = ".*" + r , where r is a regular expression. Let s be any string
such that re.search(r,s).group() does not contain any characters before
the first newline character. Then re.search(p,s) seems to fail in all
the examples that I've tried.
Example:
>>> r = "d"
>>> s = "abc\nabd"
>>> print re.search(".*" + r, s)
None
I woud have thought that re.search(".*" + r, s) should match 'abd'.
====================================================================
Audit trail:
Tue Aug 10 17:45:54 1999 guido changed notes
Tue Aug 10 17:45:54 1999 guido moved from incoming to open
Thu Jul 13 20:33:39 2000 fdrake changed notes
Thu Jul 13 20:33:39 2000 fdrake changed notification
Thu Jul 13 20:33:39 2000 fdrake moved from open to 3rdpartybug
Follow-Ups:
Date: 2000-Aug-01 14:42
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] REs beginning with .* (PR#47)
Date: Mon, 09 Aug 1999 10:25:54 -0400
I think you're right, especially since re.search("a.*d", "abc\nabd")
correctly matches "abd". I've forwarded this to Andrew Kuchling who
is maintaining the re module.
--Guido van Rossum (home page: http://www.python.org/~guido/)
> Let p = ".*" + r , where r is a regular expression. Let s be any string
> such that re.search(r,s).group() does not contain any characters before
> the first newline character. Then re.search(p,s) seems to fail in all
> the examples that I've tried.
>
> Example:
> >>> r = "d"
> >>> s = "abc\nabd"
> >>> print re.search(".*" + r, s)
> None
>
> I woud have thought that re.search(".*" + r, s) should match 'abd'.
-------------------------------------------------------
Date: 2000-Aug-01 14:42
By: none
Comment:
AMK says it's a misfired optimization (see string-sig archives).
Fixed in a more recent pcre release, but no longer relevant with the
coming of SRE in Python 2.0.
-------------------------------------------------------
Date: 2000-Aug-09 02:33
By: effbot
Comment:
Works in SRE. I've added a test to the regression test suite, and closed this bug.
(if we decide to fix more bugs in PCRE, just run the new regression suite on it...)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110869&group_id=5470
From noreply@sourceforge.net Wed Aug 9 10:35:18 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 02:35:18 -0700
Subject: [Python-bugs-list] [Bug #110924] exec unicodeobject doesn't work
Message-ID: <200008090935.CAA31860@bush.i.sourceforge.net>
Bug #110924, was updated on 2000-Aug-02 08:17
Here is a current snapshot of the bug.
Project: Python
Category: Parser/Compiler
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: exec unicodeobject doesn't work
Details: exec u"print 42"
doesn't work.
Follow-Ups:
Date: 2000-Aug-09 02:35
By: effbot
Comment:
python doesn't support 16-bit source code -- so what exactly do you want exec to do?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110924&group_id=5470
From noreply@sourceforge.net Wed Aug 9 14:38:39 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 06:38:39 -0700
Subject: [Python-bugs-list] [Bug #111481] os.stat() doesn't return st_rdev
Message-ID: <200008091338.GAA09318@bush.i.sourceforge.net>
Bug #111481, was updated on 2000-Aug-09 06:38
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: os.stat() doesn't return st_rdev
Details: The call os.stat() returns the fields st_mode, st_ino,
st_nlink, st_uid, st_gid, st_size, st_atime, st_mtime
st_ctime from "struct stat".
To be able to explore device nodes on a linux system
the field st_rdev needed as the major and minor device number is stored in this field.
It would be nice if it could be added as an extra element
in the tuple returned by os.stat, os.lstat etc.
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111481&group_id=5470
From elcultural.com@python.org Wed Aug 9 15:21:57 2000
From: elcultural.com@python.org (elcultural.com@python.org)
Date: Wed, 9 Aug 2000 10:21:57 -0400 (EDT)
Subject: [Python-bugs-list] Actualidad Cultural (PR#427)
Message-ID: <20000809142157.248061CD29@dinsdale.python.org>
Actualidad Cultural
From noreply@sourceforge.net Wed Aug 9 15:32:55 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 07:32:55 -0700
Subject: [Python-bugs-list] [Bug #111486] sys.argv in 1.6b1
Message-ID: <200008091432.HAA11671@bush.i.sourceforge.net>
Bug #111486, was updated on 2000-Aug-09 07:32
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: sys.argv in 1.6b1
Details: version: 1.6b1
os: Win2k
script
> import sys
>
> for a in sys.argv:
> print a
called with
> C:\Temp\site\bin>test 1 2 3
gives following result
> C:\Temp\site\bin\test.py
the parameters "1 2 3" are lost.
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111486&group_id=5470
From noreply@sourceforge.net Wed Aug 9 16:07:37 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 08:07:37 -0700
Subject: [Python-bugs-list] [Bug #110858] libreadline problems (PR#272)
Message-ID: <200008091507.IAA13272@bush.i.sourceforge.net>
Bug #110858, was updated on 2000-Aug-01 14:38
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Closed
Resolution: None
Bug Group: Not a Bug
Priority: 5
Summary: libreadline problems (PR#272)
Details: Jitterbug-Id: 272
Submitted-By: les@infolabs.com
Date: Tue, 4 Apr 2000 13:59:28 -0400 (EDT)
Version: 1.6a1
OS: Linux
Linux 2.2.14, GCC 2.95.2, glibc-2.0.112
Python-1.6a1 immediately dumps core when I start it with the readline module
enabled. I'm using libreadline-4.1, and gdb tells me it's segfaulting in
libc when it tries to flush stdout. I 'downgraded' to readline-2.2.1 and got
it to work by forcing the readline module to link with the static libreadline.a
but it won't link to the dynamic libreadline.so. Same thing with today's CVS
source (April 4).
I strongly suspect the libreadline-4.1 problems are related to threads, but I
can't figure out the 2.2.1 linking problem:
gcc -shared readline.o -lreadline -ltermcap -o readline.so
/usr/local/lib/libreadline.so: In function `tilde_expand_word':
/home/les/readline-2.2.1/tilde.c:386: multiple definition of `_DYNAMIC'
/usr/lib/crti.o(.dynamic+0x0): first defined here
/usr/local/lib/libreadline.so: In function `tilde_expand_word':
/home/les/readline-2.2.1/tilde.c:386: multiple definition of
`_GLOBAL_OFFSET_TAB
LE_'
/usr/lib/crti.o(.got.plt+0x0): first defined here
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: bfd assertion fail elflink.h:1498
/usr/bin/ld: readline.so: undefined versioned symbol name
__ctype_tolower@@GLIBC
_2.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
collect2: ld returned 1 exit status
====================================================================
Audit trail:
Mon May 22 17:46:57 2000 guido changed notes
Mon May 22 17:46:57 2000 guido moved from incoming to irreproducible
Follow-Ups:
Date: 2000-Aug-01 14:38
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] libreadline problems (PR#272)
Date: Tue, 04 Apr 2000 16:12:48 -0400
> Full_Name: Les Johnson
> Version: 1.6a1
> OS: Linux
> Submission from: morr0639.gti.net (208.216.122.39)
>
>
> Linux 2.2.14, GCC 2.95.2, glibc-2.0.112
>
> Python-1.6a1 immediately dumps core when I start it with the readline module
> enabled. I'm using libreadline-4.1, and gdb tells me it's segfaulting in
> libc when it tries to flush stdout. I 'downgraded' to readline-2.2.1 and got
> it to work by forcing the readline module to link with the static libreadline.a
> but it won't link to the dynamic libreadline.so. Same thing with today's CVS
> source (April 4).
>
> I strongly suspect the libreadline-4.1 problems are related to threads, but I
> can't figure out the 2.2.1 linking problem:
>
> gcc -shared readline.o -lreadline -ltermcap -o readline.so
> /usr/local/lib/libreadline.so: In function `tilde_expand_word':
> /home/les/readline-2.2.1/tilde.c:386: multiple definition of `_DYNAMIC'
> /usr/lib/crti.o(.dynamic+0x0): first defined here
> /usr/local/lib/libreadline.so: In function `tilde_expand_word':
> /home/les/readline-2.2.1/tilde.c:386: multiple definition of
> `_GLOBAL_OFFSET_TAB
> LE_'
> /usr/lib/crti.o(.got.plt+0x0): first defined here
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: bfd assertion fail elflink.h:1498
> /usr/bin/ld: readline.so: undefined versioned symbol name
> __ctype_tolower@@GLIBC
> _2.0
> /usr/bin/ld: failed to set dynamic section sizes: Bad value
> collect2: ld returned 1 exit status
Seems like a bug in /usr/bin/ld to me... Not much else I can do about
this here. Try bouncing this off the binutils support list?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:38
By: none
Comment:
From: Les Johnson
Subject: Re: [Python-bugs-list] libreadline problems (PR#272)
Date: Thu, 6 Apr 2000 11:01:17 -0400
I originally wrote:
>> Linux 2.2.14, GCC 2.95.2, glibc-2.0.112
>>
>> Python-1.6a1 immediately dumps core when I start it with the readline module
>> enabled. I'm using libreadline-4.1, and gdb tells me it's segfaulting in
>> libc when it tries to flush stdout.
...and Guido replied:
> Seems like a bug in /usr/bin/ld to me... Not much else I can do about
> this here. Try bouncing this off the binutils support list?
Not a bug in /usr/bin/ld, but I resolved this one by upgrading from
glibc2.0.112 to glibc2.1.3. No more core dumps, and readline works
fine. Thanks!
- Les Johnson
-------------------------------------------------------
Date: 2000-Aug-01 14:38
By: none
Comment:
What to do?
-------------------------------------------------------
Date: 2000-Aug-09 08:07
By: twouters
Comment:
This wasn't a bug in Python.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110858&group_id=5470
From noreply@sourceforge.net Wed Aug 9 16:59:25 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 08:59:25 -0700
Subject: [Python-bugs-list] [Bug #110641] KeyboardInterrupt while waiting for sys.ps2 input kills interpreter (PR#309)
Message-ID: <200008091559.IAA15622@bush.i.sourceforge.net>
Bug #110641, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: KeyboardInterrupt while waiting for sys.ps2 input kills interpreter (PR#309)
Details: Jitterbug-Id: 309
Submitted-By: skip@mojam.com
Date: Fri, 28 Apr 2000 17:00:40 -0400 (EDT)
Version: 1.5.2, 1.6a2
OS: Linux
If you hit Ctrl-C while the Python interpreter is sitting at the ps2 prompt the
interpreter exits instead of returning you to the top-level prompt.
% python
Python 1.5.2+ (#12, Feb 17 2000, 14:52:05) [GCC pgcc-2.91.66 19990314
(egcs-1.1.2 release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
% PYTHONSTARTUP= ./python
Python 1.6a2 (#7, Apr 24 2000, 23:02:54) [GCC pgcc-2.91.66 19990314 (egcs-1.1.2
release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
When run under gdb's control, you can see what's happening:
% gdb ./python
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-mandrake-linux"...
(gdb) set env PYTHONSTARTUP ""
(gdb) run
Starting program: /home/beluga/skip/src/python/dist/src/./python
Python 1.6a2 (#7, Apr 24 2000, 23:02:54) [GCC pgcc-2.91.66 19990314 (egcs-1.1.2
release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
Program received signal SIGINT, Interrupt.
0x4013bf14 in __libc_read () from /lib/libc.so.6
(gdb) bt
#0 0x4013bf14 in __libc_read () from /lib/libc.so.6
(gdb) c
Continuing.
File "", line 2
^
SyntaxError: invalid syntax
>>>
It appears that SIGINT isn't handled properly when awaiting console input in
certain circumstances. If you can entice the program to continue, things work
okay. I don't know interrupt handling from a hole in the ground or I'd
investigate further. It is quite annoying, especially considering that
Python's input history isn't continuous across sessions...
Skip
====================================================================
Audit trail:
Mon May 22 17:23:42 2000 guido changed notes
Mon May 22 17:23:42 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:40
By: twouters
Comment:
This seems to be platform specific: On Linux, up-to-date CVS compile, this is reproducible. On BSDI 4.1, however, with an almost-up-to-date CVS compile, ^C doesn't exit the interpreter.
-------------------------------------------------------
Date: 2000-Aug-06 04:57
By: twouters
Comment:
Oh, and it's also definately readline-related. (without readline compiled in, the bug doesn't get triggered, in any case.)
-------------------------------------------------------
Date: 2000-Aug-09 08:59
By: twouters
Comment:
I've been toying with this, and the problem *is* readline. Readline overrides a number of signal handlers, in order to do cleanup when exiting, and apparently does not restore them on exit :-S The signals readline 'overrides' the handlers of are:
SIGINT
SIGALRM
SIGTSTP
SIGTTOU
SIGTTIN
SIGTERM
SIGWINCH
Which means that the signal handlers for these signals *vanish* when using readline. Interactive mode uses readline, but scripts can themselves, too. I'm not sure why this isn't showing on BSDI, but it might have something to do with the BSD vs the SysV signal handling routines. I'm also not sure if it's possible to fix this problem; it might be a bug in readline, or it might be documented behaviour. But I wasn't able to find a reference to signal handling in the 2.2.1 readline info files.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110641&group_id=5470
From noreply@sourceforge.net Wed Aug 9 17:05:43 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 09:05:43 -0700
Subject: [Python-bugs-list] [Bug #110641] KeyboardInterrupt while waiting for sys.ps2 input kills interpreter (PR#309)
Message-ID: <200008091605.JAA15906@bush.i.sourceforge.net>
Bug #110641, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: KeyboardInterrupt while waiting for sys.ps2 input kills interpreter (PR#309)
Details: Jitterbug-Id: 309
Submitted-By: skip@mojam.com
Date: Fri, 28 Apr 2000 17:00:40 -0400 (EDT)
Version: 1.5.2, 1.6a2
OS: Linux
If you hit Ctrl-C while the Python interpreter is sitting at the ps2 prompt the
interpreter exits instead of returning you to the top-level prompt.
% python
Python 1.5.2+ (#12, Feb 17 2000, 14:52:05) [GCC pgcc-2.91.66 19990314
(egcs-1.1.2 release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
% PYTHONSTARTUP= ./python
Python 1.6a2 (#7, Apr 24 2000, 23:02:54) [GCC pgcc-2.91.66 19990314 (egcs-1.1.2
release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
When run under gdb's control, you can see what's happening:
% gdb ./python
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-mandrake-linux"...
(gdb) set env PYTHONSTARTUP ""
(gdb) run
Starting program: /home/beluga/skip/src/python/dist/src/./python
Python 1.6a2 (#7, Apr 24 2000, 23:02:54) [GCC pgcc-2.91.66 19990314 (egcs-1.1.2
release)] on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> if 1:
...
Program received signal SIGINT, Interrupt.
0x4013bf14 in __libc_read () from /lib/libc.so.6
(gdb) bt
#0 0x4013bf14 in __libc_read () from /lib/libc.so.6
(gdb) c
Continuing.
File "", line 2
^
SyntaxError: invalid syntax
>>>
It appears that SIGINT isn't handled properly when awaiting console input in
certain circumstances. If you can entice the program to continue, things work
okay. I don't know interrupt handling from a hole in the ground or I'd
investigate further. It is quite annoying, especially considering that
Python's input history isn't continuous across sessions...
Skip
====================================================================
Audit trail:
Mon May 22 17:23:42 2000 guido changed notes
Mon May 22 17:23:42 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:40
By: twouters
Comment:
This seems to be platform specific: On Linux, up-to-date CVS compile, this is reproducible. On BSDI 4.1, however, with an almost-up-to-date CVS compile, ^C doesn't exit the interpreter.
-------------------------------------------------------
Date: 2000-Aug-06 04:57
By: twouters
Comment:
Oh, and it's also definately readline-related. (without readline compiled in, the bug doesn't get triggered, in any case.)
-------------------------------------------------------
Date: 2000-Aug-09 08:59
By: twouters
Comment:
I've been toying with this, and the problem *is* readline. Readline overrides a number of signal handlers, in order to do cleanup when exiting, and apparently does not restore them on exit :-S The signals readline 'overrides' the handlers of are:
SIGINT
SIGALRM
SIGTSTP
SIGTTOU
SIGTTIN
SIGTERM
SIGWINCH
Which means that the signal handlers for these signals *vanish* when using readline. Interactive mode uses readline, but scripts can themselves, too. I'm not sure why this isn't showing on BSDI, but it might have something to do with the BSD vs the SysV signal handling routines. I'm also not sure if it's possible to fix this problem; it might be a bug in readline, or it might be documented behaviour. But I wasn't able to find a reference to signal handling in the 2.2.1 readline info files.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110641&group_id=5470
From noreply@sourceforge.net Wed Aug 9 17:04:03 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 09:04:03 -0700
Subject: [Python-bugs-list] [Bug #110611] Signal processing bug (Linux threads, readline, whatever else) (PR#196)
Message-ID: <200008091604.JAA15835@bush.i.sourceforge.net>
Bug #110611, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: Signal processing bug (Linux threads, readline, whatever else) (PR#196)
Details: Jitterbug-Id: 196
Submitted-By: Gregor Hoffleit
Date: Tue, 1 Feb 2000 14:43:09 +0100
Version: None
OS: None
--FL5UXtIhxfXey3p5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Hi,
this must be the strangest bug report ever sent to bugs-py ;-).
I don't expect a resolution for this bug from you, I just wanted to make
sure this thing is recorded and the BTS. Perhaps somebody could give me a
hint where I could look for the misbehavior. Candidates seem to be glibc,
LinuxThreads, GNU readline, the Python readline module and the Python thread
support ;-)
In 1.5.2, there's a strange problem with signals on Linux systems. This has
been discussed before on the mailing list, probably it even has a relation
to Bug#102 ("incorrect signal processing"), but IMHO this reports adds a few
other aspects. Definitely it is a (platform-specific) problem in 1.5.2.
I have problems describing the bug, since the behavior seems to depend on so
many parameters. The most obvious incarnation of the problem is probably
this:
In the Python 1.5.2 interpreter included with Debian 2.2 ("potato"), if you
press Control-C on the command line (or send a SIGINT), the interpreter
exits to the shell:
freefly;104> python
Python 1.5.2 (#0, Sep 13 1999, 09:12:57) [GCC 2.95.1 19990816 (release)]=
on
linux2=20
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> [Ctrl-C]
freefly;105>=20
Normally, you'd expect a KeyboardInterrupt exception here.
Now I tried and compiled different configurations of Python (each from a
pristine source tree) on this Debian system:
(151+t+rl) Python 1.5.1 (threads, readline)
(152) Python 1.5.2 (no threads, no readline) =20
(152+rl) Python 1.5.2 (no threads, readline)
(152+t) Python 1.5.2 (threads, no readline)
(152+t+rl) Python 1.5.2 (threads, readline)
(152+pth+rl) Python 1.5.2 (GNU Pth threads, readline)
Thread support was realized with glibc 2.1.2's LinuxThreads, i.e. pthreads.
readline was GNU readline 2.1 (for the record, I also tried 4.1beta3, but
this made no difference).
When I refer to Debian 2.1 ("slink"), this is a system with glibc 2.0.7 and
the same GNU readline version 2.1.
The following tables show the output of some experiments with those
configurations. The [] brackets show the keys pressed. Note that a line like
"[Ctrl-C][Enter]" implies that the interpreter showed no visible reaction to
the first Ctrl-C! "----" lines mean that I started up a new clean session.
(1) This is what happens when you start up a new interpreter and press
Ctrl-C once, twice and so on, while on the command line:
152,152+t 152+rl,152+pth+rl 152+t+rl 151+t+rl
=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D
------------------ ---------------- ------------- ----------------
>>> [Ctrl-C][Ctrl-C] >>> [Ctrl-C] >>> [Ctrl-C] >>> [Ctrl-C][Ct...]
KeyboardInterrupt KeyboardInterrupt freefly:5> ----------------
>>> [Ctrl-C] >>> [Ctrl-C] -------------
KeyboardInterrupt KeyboardInterrupt
>>> [Ctrl-C] >>> [Ctrl-C]
KeyboardInterrupt KeyboardInterrupt
>>> [Ctrl-C] >>> [Ctrl-C]
KeyboardInterrupt KeyboardInterrupt
------------------ ----------------
152+t+rl (on a Debian 2.1 system)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
---------------------
>>> [Ctrl-C]
KeyboardInterrupt
>>> [Ctrl-C][Ctr...]
---------------------
-> 1.5.2 with readline but without LinuxThreads is right.
-> For some reason, 1.5.2 without readline ignores the first SIGINT.
-> 1.5.2 with both readline and LinuxThreads kill the interpreter.
-> 1.5.1 seems to ignore all SIGINTs's. =20
-> For 1.5.2 running glibc 2.0.7 (instead of 2.1.2) and readline, the
interpreter doesn't get killed, but still after the first SIGINT all
following SIGINTs are ignored.
=20
-> It's worth a note that with only one of readline or thread support, the
package seems to behave more reasonable; have both enabled is bad.
=20
-> With threading support by means of GNU Pth (instead of the native libc6
LinuxThreads), the package behaves more correctly, too!
=20
(2) Now on those systems who seemed to ignore the first SIGINT, I pressed
Enter after it:
152,152+t 151+t+rl
=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=
=3D
--------------------- --------------------
>>> [Ctrl-C][Enter] >>> [Ctrl-C][Enter]
Traceback (innermost last): Traceback (innermost last):
File "", line 0, in ? File "", line 0, in ?
KeyboardInterrupt KeyboardInterrupt
>>> [Ctrl-C] >>> [Ctrl-C][Enter]
KeyboardInterrupt Traceback (innermost last):
--------------------- File "", line 0, in ?
KeyboardInterrupt
>>>
--------------------
=20
-> Obviously, the interpreter *DID* record the SIGINT in the first place,
it just didn't provoke any immediate action=20
-> On 1.5.2 without readline, the second and all following SIGINTs are
handled as one would expect.
-> 1.5.1 with thread and readline shows this strange behavior not only for
the first, but also for the second and any following SIGINT.
=20
(3) On the glibc 2.0.7 system, I verified that indeed all subsequent SIGINTs
are ignored. You're not able even to interrupt a loop, after the
interpreter has received a SIGINT while he was on the command line:
=20
152+t+rl (on a Debian 2.1 system)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
---------------------
>>> [Ctrl-C]
KeyboardInterrupt
>>> [Ctrl-C][Enter]
>>> [Ctrl-C][Enter]
{kein weiteres SIGINT
wird akzeptiert, auch im Laufen:}
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C]
400
401
=2E..
999
>>>
---------------------
---------------------
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C]
400
401
Traceback (innermost last):
File "", line 1, in ?
KeyboardInterrupt
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C]
400
401
Traceback (innermost last):
File "", line 1, in ?
KeyboardInterrupt
>>> [Ctrl-C]
KeyboardInterrupt
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C]
400
401
=2E..
999
>>>
---------------------
-> Note that it didn't hurt to break multiple times into a loop;
only SIGINTs on the command line do mess up the interpreter!
=20
=20
(4) In the Debian 2.2 Python package, you have to be careful not to kill the
interpreter; that's especially a problem when you try to break into a
loop--if you hold down Ctrl-C for too long, the interpreter quits!
=20
152+t+rl (Debian 2.2 package)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
---------------------
>>> [Ctrl-C]
freefly:5>
---------------------
---------------------
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C]
400
401
KeyboardInterrupt
>>>
---------------------
---------------------
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C pressed down for a longer time]
400
401
freefly;19>=20
---------------------
(5) The Debian 2.2 package behaves more reasonable when the readline module
has been moved out of the way:
152+t (Debian 2.2 package, readline module moved out of the way)
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
---------------------
>>> [Ctrl-C][Ctrl-C]
KeyboardInterrupt
>>> ... (vgl. 152, 152+t)
---------------------
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C]
400
401
40[Enter]
Traceback (innermost last):
File "", line 0, in ?
KeyboardInterrupt
>>> for i in xrange(1000): print i
=2E..
1
2
=2E..
[Ctrl-C]
400
401
KeyboardInterrupt
>>>
--FL5UXtIhxfXey3p5
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE4luLt3eVfDf25G40RAQw9AKDhLyI7RDYt3G85Rxet2ZlK1b1nKwCg3zl/
tasWxAOGLUK3K3ucMBbhBag=
=PTOI
-----END PGP SIGNATURE-----
--FL5UXtIhxfXey3p5--
====================================================================
Audit trail:
Mon Feb 07 12:38:12 2000 guido changed notes
Mon Feb 07 12:38:12 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:05
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] Signal processing bug (Linux threads, readline, whatever else) (PR#196)
Date: Wed, 2 Feb 2000 03:04:04 -0500
[flight@mathi.uni-heidelberg.de]
> this must be the strangest bug report ever sent to bugs-py ;-).
No, but I don't recall one that evidenced more hard & tedious work! Wow.
Thank you. Switch to Windows -- it's so much more reliable .
If you haven't already done so, may I suggest building Python from the
current CVS development source tree instead?
http://www.python.org/download/cvs.html
This may be a waste of effort, but I'd hate to see you pour more time
tracking down obscure bugs that may already have been fixed. Contrarily, if
the current CVS version still displays the problems, more work devoted to
tracking them down is certain not to be a waste.
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: Gregor Hoffleit
Subject: RE: [Python-bugs-list] Signal processing bug (Linux threads, readline, whatever else) (PR#196)
Date: Wed, 2 Feb 2000 14:25:07 +0100
Hi,
> If you haven't already done so, may I suggest building Python from the
> current CVS development source tree instead?
sorry, I forgot to mention that I tried that. Didnt't change the behavior
at all (I also saw that there were no big changes to the readline nor to
the threading code since 1.5.2).
Gregor
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: Gregor Hoffleit
Subject: Returned mail: User unknown
Date: Thu, 3 Feb 2000 11:46:44 +0100 (MET)
This is a MIME-encapsulated message
--LAA26536.949574804/relay.uni-heidelberg.de
The original message was received at Thu, 3 Feb 2000 11:46:41 +0100 (MET)
from mailserver.mathi.uni-heidelberg.de [129.206.26.32]
----- The following addresses had permanent fatal errors -----
----- Transcript of session follows -----
.. while talking to parrot.python.org.:
>>> RCPT To:
<<< 550 ... User unknown
550 ... User unknown
--LAA26536.949574804/relay.uni-heidelberg.de
Content-Type: message/delivery-status
Reporting-MTA: dns; relay.uni-heidelberg.de
Received-From-MTA: DNS; mailserver.mathi.uni-heidelberg.de
Arrival-Date: Thu, 3 Feb 2000 11:46:41 +0100 (MET)
Final-Recipient: RFC822; bugs-by@python.org
Action: failed
Status: 5.1.1
Remote-MTA: DNS; parrot.python.org
Diagnostic-Code: SMTP; 550 ... User unknown
Last-Attempt-Date: Thu, 3 Feb 2000 11:46:44 +0100 (MET)
--LAA26536.949574804/relay.uni-heidelberg.de
Content-Type: message/rfc822
Return-Path:
Received: from mailserver.mathi.uni-heidelberg.de (mailserver.mathi.uni-heidelberg.de [129.206.26.32])
by relay.uni-heidelberg.de (8.9.3+Sun/8.9.3) with ESMTP id LAA26531
for ; Thu, 3 Feb 2000 11:46:41 +0100 (MET)
Received: from testserv.mathi.uni-heidelberg.de (testserv.mathi.uni-heidelberg.de [129.206.26.30])
by mailserver.mathi.uni-heidelberg.de (Postfix) with SMTP id CFF5512917
for ; Thu, 3 Feb 2000 11:48:11 +0100 (CET)
Received: by testserv.mathi.uni-heidelberg.de (sSMTP sendmail emulation); Thu, 3 Feb 2000 11:48:12 +0100
Date: Thu, 3 Feb 2000 11:48:12 +0100
From: Gregor Hoffleit
To: bugs-by@python.org
Subject: RE: [Python-bugs-list] Signal processing bug (Linux threads, readline, whatever else) (PR#196)
Message-ID: <20000203114812.B18567@mathi.uni-heidelberg.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
User-Agent: Mutt/1.0pre3i
Fredric Lundh pointed me to Alex Zbyslaw's posting regarding this topic
(http://x44.deja.com/getdoc.xp?AN=545159177).
Indeed Alex' patch1 (http://www.xfb52.dial.pipex.com/patches/python.shtml)
for FreeBSD (disabling the interrupt handler chanege in the readline module)
works for Debian, too, i.e. if I stick with the default inthandler in the
readline module, SIGINT doesn't kill the interpreter anymore.
Still, the drawback of this change is that I have to press RETURN before
a SIGINT is spotted by Python (btw, this is the same behavior as with 1.5.1
on the system with the same configuration).
Still, IMHO this behavior is preferable.
Gregor
--LAA26536.949574804/relay.uni-heidelberg.de--
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: Gregor Hoffleit
Subject: Re: [Python-bugs-list] Signal processing bug (Linux threads, readline, whatever else) (PR#196)
Date: Fri, 11 Feb 2000 14:52:42 +0100
--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Ok, one more data point:
On Fri, Feb 11, 2000 at 08:29:43AM -0500, Randall Hopper wrote:
> You know, I think you may have it. On IRIX, I don't have Python built
> with threads. However, on FreeBSD at home I'd guess that it is (I built =
it
> from ports). My IRIX python has no problem with Ctrl-C while my FreeBSD
> version at home locks up with Ctrl-C. I rebuilt my IRIX Python
> --with-thread, and now it hangs when Ctrl-C is hit.
And now, we're three: When using threads and readline, Ctrl-C hangs IRIX and
FreeBSD and kills Linux Python.
This doesn't sound like a kernel problem, more like a problem with readline
not being thread-safe I guess.
Gregor
=20
--dDRMvlgZJXvWKvBx
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE4pBQq3eVfDf25G40RAUbSAJ41b+DgwHEmRUm0uQcJLjvZ3ROiSwCdH8Xq
jFH5J1TsLQBbQTPU5Xvv0Bo=
=0j16
-----END PGP SIGNATURE-----
--dDRMvlgZJXvWKvBx--
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110611&group_id=5470
From noreply@sourceforge.net Wed Aug 9 19:10:30 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 11:10:30 -0700
Subject: [Python-bugs-list] [Bug #110824] Tkinter canvas blow-up: bbox(ALL) == None (PR#133)
Message-ID: <200008091810.LAA03606@delerium.i.sourceforge.net>
Bug #110824, was updated on 2000-Aug-01 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Wont Fix
Bug Group: 3rd Party
Priority: 5
Summary: Tkinter canvas blow-up: bbox(ALL) == None (PR#133)
Details: Jitterbug-Id: 133
Submitted-By: aa8vb@yahoo.com
Date: Thu, 18 Nov 1999 13:34:44 -0500 (EST)
Version: 1.5.2
OS: IRIX 6.5
From: "Fredrik Lundh"
Date: Tue, 2 Nov 1999 09:53:17 +0100
Subject: Re: Tkinter canvas blow-up: bbox(ALL) == None
Randall Hopper wrote:
> Apparently if the bounds of the items in a Tk canvas widget exceed
> MAXINT, bbox(ALL) returns None. The attached Python script demonstrates
> this.
>
> Intuitively it seems like this is a bug since the contents of the
> canvas are maintained in floating point; integer bounds shouldn't be
> involved, should they?
>
> Is this a Tk bug or a Tkinter bug?
both.
Tkinter uses _getints instead of _getdoubles to
convert the bounding box to a tuple...
...but the reason you get None instead of an over-
flow error is that Tk returns an empty string in this
case (at least in 8.0.5).
-------------------------------------------------------------------------------
#!/usr/bin/env python
#
# canvas_test.py - Demonstrates a bug in Tkinter's Canvas widget
# where bbox = None when the bbox exceeds signed MAXINT
# (2^31 on most machines).
from Tkinter import *
#
# Create widgets
#
root = Tk()
canvas = Canvas( root, width = 300, height = 300 )
canvas.pack()
canvas.create_rectangle( (-100,-100,100,100),
outline = "#008000", fill="#800000", width = 3 )
canvas.create_line( (-100,-100,100,100),
fill="blue", width=3 )
canvas.create_line( (-100,100,100,-100),
fill="blue", width=3 )
canvas.config( scrollregion = canvas.bbox( ALL ) )
#
# Zoom the canvas until it's bounds get toasted because they exceed MAXINT
#
def TimerCB( canvas=canvas ):
old = canvas.bbox( ALL )
canvas.scale( ALL, 0.0, 0.0, 2.0, 2.0 )
new = canvas.bbox( ALL )
print "Old = %s, New = %s" % ( old, new )
if new == None:
raise SystemError, "canvas's bbox is toast (exceeds signed MAXINT)"
canvas.after( 300, TimerCB )
print "CANVAS ZOOM BLOW-UP TEST:\n"
canvas.after( 1500, TimerCB )
root.mainloop()
====================================================================
Audit trail:
Thu Nov 18 14:06:40 1999 guido changed notes
Thu Nov 18 14:06:41 1999 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:11
By: none
Comment:
bbox should use floats instead of ints, since Tcl/Tk can return them.
-------------------------------------------------------
Date: 2000-Aug-09 11:10
By: effbot
Comment:
this is a Tk feature. the "canvas bbox" command uses integers internally, so there's not much we can do about it :-(
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110824&group_id=5470
From noreply@sourceforge.net Wed Aug 9 19:24:23 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 11:24:23 -0700
Subject: [Python-bugs-list] [Bug #110605] Tkinter inconsistency (missing methods) (PR#161)
Message-ID: <200008091824.LAA04086@delerium.i.sourceforge.net>
Bug #110605, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Invalid
Bug Group: Feature Request
Priority: 5
Summary: Tkinter inconsistency (missing methods) (PR#161)
Details: Jitterbug-Id: 161
Submitted-By: Guido van Rossum
Date: Thu, 16 Dec 1999 15:49:26 -0500
Version: None
OS: None
------- Forwarded Message
Date: Thu, 16 Dec 1999 13:48:20 +1100
From: Jonathan Giddy
To: guido@python.org
Subject: Tkinter inconsistency (missing methods)
In Tkinter.py, most scrollable widgets support [xy]view_moveto and
[xy]view_scroll, in addition to a basic [xy]view method.
However, the Text widget is missing these additional methods.
Thanks,
Jon.
------- End of Forwarded Message
====================================================================
Audit trail:
Wed Jan 12 18:30:41 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110605&group_id=5470
From noreply@sourceforge.net Wed Aug 9 19:27:57 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 11:27:57 -0700
Subject: [Python-bugs-list] [Bug #111499] PyImport_AppendInittab undocument
Message-ID: <200008091827.LAA04228@delerium.i.sourceforge.net>
Bug #111499, was updated on 2000-Aug-09 11:27
Here is a current snapshot of the bug.
Project: Python
Category: Documentation
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: PyImport_AppendInittab undocument
Details: Both PyImport_AppendInittab and PyImport_ExtendInittab should be documented,
but aren't.
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111499&group_id=5470
From noreply@sourceforge.net Wed Aug 9 19:28:20 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 11:28:20 -0700
Subject: [Python-bugs-list] [Bug #110605] Tkinter inconsistency (missing methods) (PR#161)
Message-ID: <200008091828.LAA04247@delerium.i.sourceforge.net>
Bug #110605, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Fixed
Bug Group: Feature Request
Priority: 5
Summary: Tkinter inconsistency (missing methods) (PR#161)
Details: Jitterbug-Id: 161
Submitted-By: Guido van Rossum
Date: Thu, 16 Dec 1999 15:49:26 -0500
Version: None
OS: None
------- Forwarded Message
Date: Thu, 16 Dec 1999 13:48:20 +1100
From: Jonathan Giddy
To: guido@python.org
Subject: Tkinter inconsistency (missing methods)
In Tkinter.py, most scrollable widgets support [xy]view_moveto and
[xy]view_scroll, in addition to a basic [xy]view method.
However, the Text widget is missing these additional methods.
Thanks,
Jon.
------- End of Forwarded Message
====================================================================
Audit trail:
Wed Jan 12 18:30:41 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110605&group_id=5470
From noreply@sourceforge.net Wed Aug 9 20:17:16 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 12:17:16 -0700
Subject: [Python-bugs-list] [Bug #110677] PRIVATE: various minor Tkinter things (PR#388)
Message-ID: <200008091917.MAA23517@bush.i.sourceforge.net>
Bug #110677, was updated on 2000-Jul-31 14:13
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: PRIVATE: various minor Tkinter things (PR#388)
Details: Jitterbug-Id: 388
Submitted-By: markus.oberhumer@jk.uni-linz.ac.at
Date: Wed, 5 Jul 2000 09:38:11 -0400 (EDT)
Version: python CVS
OS: all
Tkinter.Wm.wm_state() lacks a missing "newstate=None" optional parameter.
Tkinter.Text lacks some important methods: [xy]view_moveto, [xy]view_scroll
Canvas.CanvasItem & Canvas.Group:
- bind lacks an optional "add" param
- unbind lacks an optional "funcid" param
- tkraise/lower should call self.canvas.tag_XXXX
- bbox() return value is inconsistent with Canvas.bbox()
====================================================================
Audit trail:
Tue Jul 11 08:24:23 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-09 12:17
By: effbot
Comment:
the first two items are fixed. I'll look at the Canvas.py stuff later.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110677&group_id=5470
From noreply@sourceforge.net Wed Aug 9 20:25:34 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 12:25:34 -0700
Subject: [Python-bugs-list] [Bug #110603] Tkinter winfo_visualsavailable method (PR#156)
Message-ID: <200008091925.MAA23812@bush.i.sourceforge.net>
Bug #110603, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: Tkinter winfo_visualsavailable method (PR#156)
Details: Jitterbug-Id: 156
Submitted-By: piers@cs.su.oz.au
Date: Thu, 9 Dec 1999 17:09:50 -0500 (EST)
Version: 1.5.2
OS: Solaris/Linux/win95
The Tkinter winfo_visualsavailable method fails if there is only one visual
available, as the code assumes a list is returned, when in fact
Tcl/Tk returns a string in the form '{truecolor 24}'
====================================================================
Audit trail:
Tue Dec 14 17:15:16 1999 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110603&group_id=5470
From noreply@sourceforge.net Wed Aug 9 22:22:11 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Wed, 9 Aug 2000 14:22:11 -0700
Subject: [Python-bugs-list] [Bug #111520] Some "Very High Level" functions aren't
Message-ID: <200008092122.OAA27985@bush.i.sourceforge.net>
Bug #111520, was updated on 2000-Aug-09 14:22
Here is a current snapshot of the bug.
Project: Python
Category: Documentation
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Some "Very High Level" functions aren't
Details: The so-called "Very High Level" functions in the Python C API that take FILE * arguments will not work in a multi-compiler environment; each compiler's notion of a struct FILE will be different. From an implementation standpoint these are very _low_ level functions.
The Python documentation for these functions, and the "Extending and embedding" documentation, should make note of this potential problem.
BTW, there are situations in which a compiler other than the compiler used to compile Python will be used. Please don't try to make this bug go away by requiring the same compiler be used as was used to compile Python.
Edward
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111520&group_id=5470
From noreply@sourceforge.net Thu Aug 10 15:10:57 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 07:10:57 -0700
Subject: [Python-bugs-list] [Bug #110944] smtplib doesn't use FQDN
Message-ID: <200008101410.HAA27417@bush.i.sourceforge.net>
Bug #110944, was updated on 2000-Aug-02 11:43
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Closed
Resolution: None
Bug Group: None
Priority: 5
Summary: smtplib doesn't use FQDN
Details: When talking to an SMTP server smtplib says HELO "name" where name is the result of:
name = socket.gethostbyaddr(name)[0]
Unfortunately that line isn't guarenteed to return the FQDN of the machine and so some MTAs with certain configurations (in my case postfix) reject the mail as they insist on a FQDN. Those MTAs that don't insist on a FQDN arent going to complain if they get one either so changing this behaviour seems desirable.
This code appears twice...once around line 295 and again around line 312. The fix would seem to be listed at http://www.python.org/doc/current/lib/module-socket.html.
"To find the fully qualified domain name, check hostname and the items of aliaslist for an entry containing at least one period."
I don't know enough python to provide a patch...sorry.
Thanks,
Andrew
BTW I have submitted this bug against the version in mailman as well
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110944&group_id=5470
From noreply@sourceforge.net Thu Aug 10 15:12:06 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 07:12:06 -0700
Subject: [Python-bugs-list] [Bug #110944] smtplib doesn't use FQDN
Message-ID: <200008101412.HAA27434@bush.i.sourceforge.net>
Bug #110944, was updated on 2000-Aug-02 11:43
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Closed
Resolution: None
Bug Group: None
Priority: 5
Summary: smtplib doesn't use FQDN
Details: When talking to an SMTP server smtplib says HELO "name" where name is the result of:
name = socket.gethostbyaddr(name)[0]
Unfortunately that line isn't guarenteed to return the FQDN of the machine and so some MTAs with certain configurations (in my case postfix) reject the mail as they insist on a FQDN. Those MTAs that don't insist on a FQDN arent going to complain if they get one either so changing this behaviour seems desirable.
This code appears twice...once around line 295 and again around line 312. The fix would seem to be listed at http://www.python.org/doc/current/lib/module-socket.html.
"To find the fully qualified domain name, check hostname and the items of aliaslist for an entry containing at least one period."
I don't know enough python to provide a patch...sorry.
Thanks,
Andrew
BTW I have submitted this bug against the version in mailman as well
Follow-Ups:
Date: 2000-Aug-10 07:12
By: nowonder
Comment:
closed by patch #101103
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110944&group_id=5470
From noreply@sourceforge.net Thu Aug 10 15:13:23 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 07:13:23 -0700
Subject: [Python-bugs-list] [Bug #111499] PyImport_AppendInittab undocument
Message-ID: <200008101413.HAA09255@delerium.i.sourceforge.net>
Bug #111499, was updated on 2000-Aug-09 11:27
Here is a current snapshot of the bug.
Project: Python
Category: Documentation
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: PyImport_AppendInittab undocument
Details: Both PyImport_AppendInittab and PyImport_ExtendInittab should be documented,
but aren't.
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111499&group_id=5470
From noreply@sourceforge.net Thu Aug 10 15:14:37 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 07:14:37 -0700
Subject: [Python-bugs-list] [Bug #111520] Some "Very High Level" functions aren't
Message-ID: <200008101414.HAA09369@delerium.i.sourceforge.net>
Bug #111520, was updated on 2000-Aug-09 14:22
Here is a current snapshot of the bug.
Project: Python
Category: Documentation
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Some "Very High Level" functions aren't
Details: The so-called "Very High Level" functions in the Python C API that take FILE * arguments will not work in a multi-compiler environment; each compiler's notion of a struct FILE will be different. From an implementation standpoint these are very _low_ level functions.
The Python documentation for these functions, and the "Extending and embedding" documentation, should make note of this potential problem.
BTW, there are situations in which a compiler other than the compiler used to compile Python will be used. Please don't try to make this bug go away by requiring the same compiler be used as was used to compile Python.
Edward
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111520&group_id=5470
From noreply@sourceforge.net Thu Aug 10 17:41:06 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 09:41:06 -0700
Subject: [Python-bugs-list] [Bug #111582] Missing "sysconf" in the POSIX module
Message-ID: <200008101641.JAA14412@delerium.i.sourceforge.net>
Bug #111582, was updated on 2000-Aug-10 09:41
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Missing "sysconf" in the POSIX module
Details: I had the problem to determine the page size of an sparc computer. Looking at
man page shows sysconf are the way to do an are part of POSIX.2. But the
POSIX module dosen't contains sysconf().
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111582&group_id=5470
From noreply@sourceforge.net Thu Aug 10 17:52:24 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 09:52:24 -0700
Subject: [Python-bugs-list] [Bug #111586] 1.6b1: PythonPath
Message-ID: <200008101652.JAA14778@delerium.i.sourceforge.net>
Bug #111586, was updated on 2000-Aug-10 09:52
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: 1.6b1: PythonPath
Details: version: Python 1.6b1
os: Win2k
i added an additional path to the PythonPath registry entry, but python ignores the additional path.
(i used the windows installer, after deinstalling 1.5.2)
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111586&group_id=5470
From noreply@sourceforge.net Thu Aug 10 17:56:34 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 09:56:34 -0700
Subject: [Python-bugs-list] [Bug #111582] Missing "sysconf" in the POSIX module
Message-ID: <200008101656.JAA14971@delerium.i.sourceforge.net>
Bug #111582, was updated on 2000-Aug-10 09:41
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Closed
Resolution: Fixed
Bug Group: Feature Request
Priority: 5
Summary: Missing "sysconf" in the POSIX module
Details: I had the problem to determine the page size of an sparc computer. Looking at
man page shows sysconf are the way to do an are part of POSIX.2. But the
POSIX module dosen't contains sysconf().
Follow-Ups:
Date: 2000-Aug-10 09:56
By: fdrake
Comment:
sysconf() has been added since 1.5.2; it will be present in 1.6 and 2.0.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111582&group_id=5470
From noreply@sourceforge.net Thu Aug 10 18:01:45 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 10:01:45 -0700
Subject: [Python-bugs-list] [Bug #110868] PythonWin crash on dead keys (PR#372)
Message-ID: <200008101701.KAA15132@delerium.i.sourceforge.net>
Bug #110868, was updated on 2000-Aug-01 14:42
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: 3rd Party
Priority: 5
Summary: PythonWin crash on dead keys (PR#372)
Details: Jitterbug-Id: 372
Submitted-By: gottfried.ganssauge@dynix.de
Date: Tue, 27 Jun 2000 05:23:09 -0400 (EDT)
Version: 1.5.2
OS: Windows 2000
I'm using PyWin32 build 132, but the problem occurs with build 129 as well.
Every time I hit one of the dead keys on my keyboard (`, ^) PythonWin crashes.
I traced the error back to the routine ui_translate_vk() in win32uimodule.cpp.
The call to ToAsciiEx() with a dead key's scan code returns -1 and in the
following call to PyString_FromStringAndSize() this eventually leads to the
crash.
In my opininion the reason for that lies before the call to this routine.
pywin hooks WM_KEYDOWN in several places and doesn't check for dead keys but
tries to translate the scan code to an ASCII character.
With dead keys this obviously must fail.
Windows itself already does the correct translation as described in the
Platform SDK article about Dead-Character Messages:
Some non-English keyboards contain character keys that are not expected to
produce characters by themselves. Instead, they are used to add a diacritic to
the character produced by the subsequent keystroke. These keys are called dead
keys. The circumflex key on a German keyboard is an example of a dead key. To
enter the character consisting of an "o" with a circumflex, a German user would
type the circumflex key followed by the "o" key. The window with the keyboard
focus would receive the following sequence of messages:
WM_KEYDOWN
WM_DEADCHAR
WM_KEYUP
WM_KEYDOWN
WM_CHAR
WM_KEYUP
Consequently pywin should ignore WM_KEYDOWN messages completely if they are
produced by a dead key.
I tried to implement that using the current win32api implementation, but
unfortunately the necessary API-Function to find out if a key is a dead key are
not provided in the current implementation; namely the MapVirtualKey(Ex)
function.
Cheers, and keep up the good work
Gottfried
====================================================================
Audit trail:
Tue Jul 11 08:24:21 2000 guido moved from incoming to 3rdpartybug
Follow-Ups:
Date: 2000-Aug-01 14:42
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] PythonWin crash on dead keys (PR#372)
Date: Wed, 28 Jun 2000 10:33:26 +1000
Thanks for reporting this. Ill look into it.
In general, this bug mechanism is for Python itself, and not the Python for
Win32 extensions. Its probably best to simply mail future bugs in the
Win32 stuff directly to me.
Mark.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> gottfried.ganssauge@dynix.de
> Sent: Tuesday, 27 June 2000 11:08 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] PythonWin crash on dead keys (PR#372)
>
>
> Full_Name: Gottfried Ganßauge
> Version: 1.5.2
> OS: Windows 2000
> Submission from: joshua2go.dynix.de (195.21.130.43)
>
>
> I'm using PyWin32 build 132, but the problem occurs with build
> 129 as well.
>
> Every time I hit one of the dead keys on my keyboard (`, ^)
> PythonWin crashes.
> I traced the error back to the routine ui_translate_vk() in
> win32uimodule.cpp.
> The call to ToAsciiEx() with a dead key's scan code returns -1 and in the
> following call to PyString_FromStringAndSize() this eventually
> leads to the
> crash.
> In my opininion the reason for that lies before the call to this routine.
> pywin hooks WM_KEYDOWN in several places and doesn't check for
> dead keys but
> tries to translate the scan code to an ASCII character.
> With dead keys this obviously must fail.
> Windows itself already does the correct translation as described in the
> Platform SDK article about Dead-Character Messages:
>
> Some non-English keyboards contain character keys that are not
> expected to
> produce characters by themselves. Instead, they are used to add
> a diacritic to
> the character produced by the subsequent keystroke. These keys
> are called dead
> keys. The circumflex key on a German keyboard is an example of a
> dead key. To
> enter the character consisting of an "o" with a circumflex, a
> German user would
> type the circumflex key followed by the "o" key. The window with
> the keyboard
> focus would receive the following sequence of messages:
>
> WM_KEYDOWN
> WM_DEADCHAR
> WM_KEYUP
> WM_KEYDOWN
> WM_CHAR
> WM_KEYUP
>
>
> Consequently pywin should ignore WM_KEYDOWN messages completely
> if they are
> produced by a dead key.
> I tried to implement that using the current win32api implementation, but
> unfortunately the necessary API-Function to find out if a key is
> a dead key are
> not provided in the current implementation; namely the MapVirtualKey(Ex)
> function.
>
> Cheers, and keep up the good work
>
> Gottfried
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
>
-------------------------------------------------------
Date: 2000-Aug-10 10:01
By: twouters
Comment:
Feel free to close this report if you think it shouldn't be here, Mark.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110868&group_id=5470
From noreply@sourceforge.net Thu Aug 10 19:43:50 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 11:43:50 -0700
Subject: [Python-bugs-list] [Bug #110823] Tkinter missing button state symbols (PR#132)
Message-ID: <200008101843.LAA18885@delerium.i.sourceforge.net>
Bug #110823, was updated on 2000-Aug-01 14:10
Here is a current snapshot of the bug.
Project: Python
Category: Tkinter
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: Tkinter missing button state symbols (PR#132)
Details: Jitterbug-Id: 132
Submitted-By: aa8vb@yahoo.com
Date: Thu, 18 Nov 1999 08:16:55 -0500 (EST)
Version: 1.5.2
OS: IRIX 6.5
I have:
picture.bind( "" , click_cb )
picture.bind( "", click_cb )
In click_cb(), event.state is 0 for ButtonPress and 256 for ButtonRelease.
Where are the Tkinter constants for these? Or how should one distinguish
between a press and release in a callback?
(I want to avoid having a separate callback for each type of event.)
====================================================================
Audit trail:
Thu Nov 18 10:42:46 1999 guido changed notes
Thu Nov 18 10:42:46 1999 guido moved from incoming to notabug
Thu Nov 18 14:07:59 1999 guido changed notes
Thu Nov 18 14:07:59 1999 guido moved from notabug to request
Follow-Ups:
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Tkinter missing button state symbols (PR#132)
Date: Thu, 18 Nov 1999 10:41:31 -0500
> Full_Name: Randall Hopper
> Version: 1.5.2
> OS: IRIX 6.5
> Submission from: ethyl-f.rtpfddi.epa.gov (134.67.65.11)
>
>
> I have:
>
> picture.bind( "" , click_cb )
> picture.bind( "", click_cb )
>
> In click_cb(), event.state is 0 for ButtonPress and 256 for ButtonRelease.
>
> Where are the Tkinter constants for these? Or how should one distinguish
> between a press and release in a callback?
>
> (I want to avoid having a separate callback for each type of event.)
This is not a question for the bugs list.
Write to help@python.org or use the newsgroup for help. I don't know
offhand what the answer is to your question; I suspect that the answer
is in the Tcl/Tk man page for the bind command though.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Randall Hopper
Subject: Re: [Python-bugs-list] Tkinter missing button state symbols (PR#132)
Date: Thu, 18 Nov 1999 14:04:13 -0500
Guido van Rossum:
|> Full_Name: Randall Hopper
|> Version: 1.5.2
|> OS: IRIX 6.5
|> Submission from: ethyl-f.rtpfddi.epa.gov (134.67.65.11)
|>
|>
|> I have:
|>
|> picture.bind( "" , click_cb )
|> picture.bind( "", click_cb )
|>
|> In click_cb(), event.state is 0 for ButtonPress and 256 for ButtonRelease.
|>
|> Where are the Tkinter constants for these? Or how should one distinguish
|> between a press and release in a callback?
|>
|> (I want to avoid having a separate callback for each type of event.)
|
|This is not a question for the bugs list.
|
|Write to help@python.org or use the newsgroup for help. I don't know
|offhand what the answer is to your question; I suspect that the answer
|is in the Tcl/Tk man page for the bind command though.
My fault. I should have rephrased the question into a statement. Tkinter
does not provide symbol defines for event.state values (%s keyword in Tcl).
Tcl doesn't either, but it would be useful if Tkinter did.
This is a small enhancement request rather than a hard bug, but I thought
the submission form was for probably applicable for both.
Thanks,
Randall
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] Tkinter missing button state symbols (PR#132)
Date: Thu, 18 Nov 1999 14:05:57 -0500
Yes, requests are okay. Sorry for the confusion.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:10
By: none
Comment:
Should add a symbol as he suggests.
-------------------------------------------------------
Date: 2000-Aug-09 02:21
By: effbot
Comment:
IIRC, these constants are platform (X library) dependent (they have to be exported from _tkinter.c, not Tkconstants.py).
I'll investigate. Feel free to assign the bug to me if you like.
-------------------------------------------------------
Date: 2000-Aug-10 11:43
By: gvanrossum
Comment:
/F, go for it!
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110823&group_id=5470
From noreply@sourceforge.net Thu Aug 10 19:45:14 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 11:45:14 -0700
Subject: [Python-bugs-list] [Bug #110599] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Message-ID: <200008101845.LAA19000@delerium.i.sourceforge.net>
Bug #110599, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Details: Jitterbug-Id: 102
Submitted-By: "=?iso-8859-2?B?VmxhZGlt7XIgQmVuZbk=?="
Date: Mon, 11 Oct 1999 13:00:07 +0200
Version: None
OS: None
Good afternoon,
I have found a bug on Python 1.5.2. This bug doesn't occur on Python
1.5.1.
Python versions and OS:
- Python 1.5.1. at Debian GNU/Linux 2.0.36
- Python 1.5.2. at Debian GNU/Linux 2.2.9
Bug: Incorrect signal processing (Python 1.5.2).
Process can assign procedure for signal processing. When process is
waiting at system call and this signal occur, then the signal assigned
procedure is otherwise correctly completed but then waiting at system call
is broken and process continues.
Here is a simple program for demonstrate this bug:
#!/usr/bin/python
import signal
import sys
def signal_handle(signum, frame) :
signal.signal(signal.SIGALRM, signal_handle)
signal.alarm(2)
print "signal"
signal_handle(0,0)
a=sys.stdin.readline()
print "Line examined..."
b=sys.stdin.readline()
print "Line examined..."
print a,b,"end"
# end of example
Correct behaviour: Message "Line examined..." occurs only after pressing
ENTER by user.
Bug: Message "Line examined..." occurs immediately after signal occured
and procedure signal_handle finished. Output then look thus (when no input
entered):
signal
signal
Line examined...
signal
Line examined...
end
This bug appears at any signal occur and whatever process waiting at
system call. Some system call even produces exception (e.g. waiting for data
or connection on socket).
Bug is perhaps caused by wrong seting "siginterrupt" on module signal. I
haven't found any way how call in Python program "siginterrupt" for correct
behavior of signal processing.
Good bye, V. Benes
****************************************************************************
Ing. Vladimir Benes, pvt.net
PVT, a.s., OZ Chomutov
e-mail: vladimir.benes@pvt.cz, vladimir.benes@sms.paegas.cz
****************************************************************************
====================================================================
Audit trail:
Mon Oct 11 18:12:13 1999 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:05
By: none
Comment:
From: Jeremy Hylton
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Tue, 12 Oct 1999 12:04:42 -0400 (EDT)
>>>>> "VB" == Vladimir Benes writes:
VB> Bug: Incorrect signal processing (Python 1.5.2). Process can
VB> assign procedure for signal processing. When process is waiting
VB> at system call and this signal occur, then the signal assigned
VB> procedure is otherwise correctly completed but then waiting at
VB> system call is broken and process continues.
[example program]
I see the behavior you report for 1.5.2 on Solaris 2.6.
VB> This bug appears at any signal occur and whatever process
VB> waiting at system call. Some system call even produces exception
VB> (e.g. waiting for data or connection on socket).
These issues always occur in twos don't they. There was a similar
question posted on comp.lang.python yesterday. I'm not sure that the
behavior you're seeing is a bug; it is the behavior I would expect.
Slow system calls are interrupted, returning EINTR, when a signal
occurs.
VB> Bug is perhaps caused by wrong seting "siginterrupt" on
VB> module signal. I haven't found any way how call in Python
VB> program "siginterrupt" for correct behavior of signal
VB> processing.
Perhaps the signal module for Python should be extended to support
siginterrupt, but it sounds like it will only reduce the number of
system calls that can be interrupted. The Solaris man page says:
NOTES
Use of these interfaces should be restricted to only appli-
cations written on BSD platforms. Use of these interfaces
with any of the system libraries or in multi-threaded appli-
cations is unsupported.
It doesn't sound particularly safe.
Jeremy
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: "=?iso-8859-2?B?VmxhZGlt7XIgQmVuZbk=?="
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Wed, 13 Oct 1999 09:19:44 +0200
From: Jeremy Hylton
To: Vladimir.Benes@pvt.cz
Cc: python-bugs-list@python.org ;
bugs-py@python.org
Date: 12. 10. 1999 18:04
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python
1.5.2 (PR#102)
JH>I see the behavior you report for 1.5.2 on Solaris 2.6.
You don't write whether this bug appeared there.
JH> ...... I'm not sure that the
JH> behavior you're seeing is a bug; it is the behavior I would expect.
JH> Slow system calls are interrupted, returning EINTR, when a signal
JH> occurs.
I'am sure that this behavior is bug becouse:
1. I wrote the same program in C language (see below).
2. I ran this program at the same machine where the Python *)
program works incorrectly.
3. Behavior of C program is correct (line scan is ended only when
user press ENTER and this end is independed on signal).
=> The C program works correct and the same Python *) program fails at the
same platform. Base run of program should by independed on signal processing
except program terminating signals. It's independed at C program but
incorrect processed by Python *) programs.
*) only Python 1.5.2; Python 1.5.1 here works correctly
Here is the mentioned program:
#include
#include
#include
void signal_handle(int signum) {
signal(SIGALRM, signal_handle);
alarm(2);
printf("signal\n\r");
}
void main(void) {
char a[100], b[100];
signal_handle(0);
scanf("%s",&a);
printf("Line examined...\n\r");
scanf("%s",&b);
printf("Line examined...\n\r");
printf("%s\t%s\tend\n\r", a, b);
}
VB> Bug is perhaps caused by wrong seting "siginterrupt" on
VB> module signal. I haven't found any way how call in Python
VB> program "siginterrupt" for correct behavior of signal
VB> processing.
JH> Perhaps the signal module for Python should be extended to support
JH> siginterrupt, but it sounds like it will only reduce the number of
JH> system calls that can be interrupted. .......
Sorry, I wrong formulated possible couse of bug. I will try to specify
my idea:
It looks that there is any wrong calling "siginterupt" on signal module.
Python libraries doesn't allow me to try correct this bug by calling
"siginiterrupt" in my program before signal setting. But the best way is to
reapir bug on signal module.
Good bye, V. Benes
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Wed, 13 Oct 1999 08:57:25 -0400
> JH> ...... I'm not sure that the
> JH> behavior you're seeing is a bug; it is the behavior I would expect.
> JH> Slow system calls are interrupted, returning EINTR, when a signal
> JH> occurs.
>
[Vladimir]
> I'am sure that this behavior is bug becouse:
When I first thought about this, I agreed with Vladimir. If you look
careful at his code, readline() is returning "" when the alarm goes
off; this can't be right, because it's not an end of file. It should
either raise an exception (EINTR) or return one line of valid data.
On the other hand, whatever solution is chosen should be careful that
other signals raise exceptions; in particular you want SIGINT (^C) to
be translated to a KeyboardError exception. Since the C code in
readline() can't tell which signal was trapped or whether the handler
raised an exception, it has two choices, both of which are bad:
- Raise an IOError exception, honoring the EINTR. Unfortunately, in
the SIGINT/^C case, the handler will run after this exception is
raised, and it will raise KeyboardError. The Python program will
*probably* see the KeyboardError exception, but it is not guaranteed
that the signal handler is run immediately. (The Python-level signal
handler is run only after the Python virtual machine finishes the
current instruction, i.e. after the readline() completes.)
- Continue to read a line, ignoring the EINTR. Unfortunately, this
would mean that the user has to type ^C followed by Return to
interrupt the program!
An alternative solution would be to arrange for the Python-level
interrupt handler to execute inside the readline() method, and to
restart the read only when it raises no exception; but this would
require a massive code rewrite (you'd want this behavior in any place
that does a blocking I/O operation).
Concluding, I think Vladimir is better off not to use signal handlers
in the way he is using them now. Python's emulation of signal
semantics is sufficiently different from C that you can't rely on the
same behavior. (And note that in C, signal handlers are usually
broken anyway; e.g. the code you write, which prints something inside
the signal handler, is broken on C too because you don't know the
state of stdout when the handler is invoked.)
I looked at what could be different between 1.5.1 and 1.5.2, and found
that the call to siginterrupt() to disable restarting system calls was
added after 1.5.1. Given the alternatives, I think I like the 1.5.2
behavior better than the 1.5.1 behavior.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:05
By: none
Comment:
From: "=?iso-8859-2?B?VmxhZGlt7XIgQmVuZbk=?="
Subject: Re: [Python-bugs-list] bug (Incorrect signal processing) - Python 1.5.2 (PR#102)
Date: Wed, 13 Oct 1999 16:34:39 +0200
>...
>Concluding, I think Vladimir is better off not to use signal handlers
>in the way he is using them now. Python's emulation of signal
>semantics is sufficiently different from C that you can't rely on the
>same behavior. (And note that in C, signal handlers are usually
>broken anyway; e.g. the code you write, which prints something inside
>the signal handler, is broken on C too because you don't know the
>state of stdout when the handler is invoked.)
Well, meantioned programs were only very simple demos for demonstrate
incorrect signal processing. But exists a large range of meaningful programs
where is necessary both synchronous and asynchronous signal processing - and
signal can be triggered whenever.
Example of C symbolic structure this programs:
....
int event_flag;
void trigger_signal(int signum) {
// asynchonous signal processing
event_flag = MY_EVENT; // only flag set
}
void initialize_signal(int sig) {
event_flag = NO_EVENT; // initialize
signal(sig, trigger_signal);
}
int main() {
initialize_signal(SIGTERM);
while (1) {
my_func();
// synchronous signal processing:
if (event_flag==MY_EVENT) my_sync_trigger();
}
}
Signal can be raised whenever when function my_func runs => flag
event_flag is then set but my_func "does't know" his and continues at own
processing. Signal should not influence my_func becouse my_func "doesn't
know" both this signal and flag event_flag. Function event_flag can wait for
system call (read, write, connect, etc). Incoming signal should not finish
this waiting after trigger_signal function processing. So my_func is
independed on signal processing and "does'nt know" signals.
Program tests the flag at any "safe" location(s). If this flag is set,
program run specific synchronous signal processing. It can be for example
safe program end or synchronous SIGALRM processing.
Python programs can by compose similar this example.
>I looked at what could be different between 1.5.1 and 1.5.2, and found
>that the call to siginterrupt() to disable restarting system calls was
>added after 1.5.1. Given the alternatives, I think I like the 1.5.2
>behavior better than the 1.5.1 behavior.
But then old Python programs writen for Python 1.5.1 are not compatible
with Python 1.5.2. in this feature. I thing that better way is to let this
behavior equal as in Python 1.5.1. but allow programs to call either new
function "siginterrupt" at signal module (more flexible solution) or any
else new function at signal module to set behavior signal processing by Your
idea.
Good bye, V. Benes
-------------------------------------------------------
Date: 2000-Aug-10 11:45
By: gvanrossum
Comment:
Sorry, I can't take this. It's an issue though! There are a bunch of signal related bugs in Linux...
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110599&group_id=5470
From noreply@sourceforge.net Thu Aug 10 19:48:49 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 11:48:49 -0700
Subject: [Python-bugs-list] [Bug #110624] float("1.0e-309") inconsistency on win32 (PR#245)
Message-ID: <200008101848.LAA19068@delerium.i.sourceforge.net>
Bug #110624, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: Remind
Bug Group: None
Priority: 4
Summary: float("1.0e-309") inconsistency on win32 (PR#245)
Details: Jitterbug-Id: 245
Submitted-By: sde@recombinant.demon.co.uk
Date: Wed, 22 Mar 2000 16:13:26 -0500 (EST)
Version: 1.5.2
OS: win32
#! /usr/bin/python
# Inconsistent behaviour.
# Python 1.5.2 win32 fails the second print (why not both?)
# other versions print both expressions
# Ok Python 1.5.2 on SuSE Linux 6.3
# Ok JPython 1.1 on java1.1.7B
# Partial failure Python 1.5.2 win32
print eval("float(1.0e-309)")
print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
====================================================================
Audit trail:
Fri Mar 24 16:42:36 2000 guido changed notes
Fri Mar 24 16:42:36 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Thu, 23 Mar 2000 01:43:30 -0500
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> sde@recombinant.demon.co.uk
> Sent: Wednesday, March 22, 2000 4:13 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] float("1.0e-309") inconsistency on win32
> (PR#245)
>
>
> Full_Name: Stephen D Evans
> Version: 1.5.2
> OS: win32
> Submission from: recombinant.demon.co.uk (212.229.73.7)
>
>
> #! /usr/bin/python
>
> # Inconsistent behaviour.
>
> # Python 1.5.2 win32 fails the second print (why not both?)
> # other versions print both expressions
>
> # Ok Python 1.5.2 on SuSE Linux 6.3
> # Ok JPython 1.1 on java1.1.7B
> # Partial failure Python 1.5.2 win32
>
> print eval("float(1.0e-309)")
> print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
First note that these don't do the same thing: the first passes a float to
"float", the second passes a string to "float". Change the first to
print eval("float('1.0e-309')")
and it gives the same bogus error as the second one.
Then it turns out the error is Microsoft's fault. This tiny C program shows
the bug:
#include
#include
#include
void
main()
{
double x;
char* dontcare;
errno = 0;
x = strtod("1.0e-309", &dontcare);
printf("errno after = %d\n", errno);
printf("x after = %g\n", x);
}
This prints
errno after = 34
x after = 0
when compiled & linked with MS's VC5; don't know about VC6. Same thing for
"1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
fixes their library.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 04:51:57 -0500
> > Full_Name: Stephen D Evans
> > Version: 1.5.2
> > OS: win32
> > Submission from: recombinant.demon.co.uk (212.229.73.7)
> >
> >
> > #! /usr/bin/python
> >
> > # Inconsistent behaviour.
> >
> > # Python 1.5.2 win32 fails the second print (why not both?)
> > # other versions print both expressions
> >
> > # Ok Python 1.5.2 on SuSE Linux 6.3
> > # Ok JPython 1.1 on java1.1.7B
> > # Partial failure Python 1.5.2 win32
> >
> > print eval("float(1.0e-309)")
> > print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
>
> First note that these don't do the same thing: the first passes a float to
> "float", the second passes a string to "float". Change the first to
>
> print eval("float('1.0e-309')")
>
> and it gives the same bogus error as the second one.
>
> Then it turns out the error is Microsoft's fault. This tiny C program shows
> the bug:
>
> #include
> #include
> #include
>
> void
> main()
> {
> double x;
> char* dontcare;
> errno = 0;
> x = strtod("1.0e-309", &dontcare);
> printf("errno after = %d\n", errno);
> printf("x after = %g\n", x);
> }
>
> This prints
>
> errno after = 34
> x after = 0
>
> when compiled & linked with MS's VC5; don't know about VC6. Same thing for
> "1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
> fixes their library.
The bizarre thing is that this is broken the same way on Solaris:
>>> 1.0e-309
1.0000000000000019e-309
>>> float("1.0e-309")
Traceback (innermost last):
File "", line 1, in ?
ValueError: float() literal too large: 1.0e-309
>>>
I looked and it turns out that Python uses atof() in the first case
(string literal encountered in a Python expression) and strtod() in
the second case (string passed to float()).
Apparently strtod() and atof() differ in implementation, even though
the Solaris man page says "The atof(str) function call is equivalent
to strtod(str, (char **)NULL)."
We could fix this by changing float() to do its own syntax checking
and then use atof()... Is it worth it?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 22:48:50 -0500
[atof and strtod act differently given denormals on both Windows &
Solaris]
[Guido]
> ...
> Apparently strtod() and atof() differ in implementation, even though
> the Solaris man page says "The atof(str) function call is equivalent
> to strtod(str, (char **)NULL)."
Ya, their man page is lying. atof() existed in the mists of prehistory and
typically did no error checking at all. IIRC, ANSI C introduced strtod(),
which generally got implemented as a layer of error-checking around atof.
I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
inputs with absolute value smaller than that.
> We could fix this by changing float() to do its own syntax checking
> and then use atof()... Is it worth it?
Depends on your goal : do you want more extreme cases, like 1e-500,
to blow up (strtod) or underflow to 0 (atof)? The example in the original
test case is subtler because atof made it *appear* to be "a regular old
number"; in fact, it's not, it's small enough that it falls into 754's
"denormalized" range. This means the conversion loses some extraordinary
amount of-- but not all --information (whereas 1e-500 is below even the
denorm range: conversion loses all information).
Without a coherent strategy for dealing with 754 issues, it's hard to decide
which is better. Since strtod() is more restrictive, if this is worth
bothering about at all now (for P3K I think 754 needs to be taken
seriously), I actually recommend changing current atof() calls to use
native strtod() instead.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:14:29 -0500
> [atof and strtod act differently given denormals on both Windows &
> Solaris]
>
> [Guido]
> > ...
> > Apparently strtod() and atof() differ in implementation, even though
> > the Solaris man page says "The atof(str) function call is equivalent
> > to strtod(str, (char **)NULL)."
[Tim]
> Ya, their man page is lying. atof() existed in the mists of prehistory and
> typically did no error checking at all. IIRC, ANSI C introduced strtod(),
> which generally got implemented as a layer of error-checking around atof.
>
> I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
> limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
> inputs with absolute value smaller than that.
>
> > We could fix this by changing float() to do its own syntax checking
> > and then use atof()... Is it worth it?
>
> Depends on your goal : do you want more extreme cases, like 1e-500,
> to blow up (strtod) or underflow to 0 (atof)? The example in the original
> test case is subtler because atof made it *appear* to be "a regular old
> number"; in fact, it's not, it's small enough that it falls into 754's
> "denormalized" range. This means the conversion loses some extraordinary
> amount of-- but not all --information (whereas 1e-500 is below even the
> denorm range: conversion loses all information).
>
> Without a coherent strategy for dealing with 754 issues, it's hard to decide
> which is better. Since strtod() is more restrictive, if this is worth
> bothering about at all now (for P3K I think 754 needs to be taken
> seriously), I actually recommend changing current atof() calls to use
> native strtod() instead.
Hm, I'm not so sure. Suppose I'm writing a program that reads a data
files generated by some Fortran program. The Fortran program is
giving me points to plot for example. If Fortran manages to output
1e-500, wouldn't it make more sense if I rounded that to zero instead
of rejecting it? After all, after converting to plot precision it's
going to be zero anyway.
This way I could almost defend using strtod() for literals in
Python source code (where it makes more sense to warn about underflow)
but atof() for input. Except that of course input could conceivably
be using eval()...
Another argument for turning underflow into zero is that that also
happens in regular arithmetic:
>>> 0.1**2**8
1.0000000000000275e-256
>>> 0.1**2**9
0.0
I like this uniform behavior: overflow -> exception, underflow ->
zero. My calculator does this too.
Am I hopelessly naive about this? What else can we do? What control
does C give? What does sscanf() do?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:53:10 -0500
"In the face of ambiguity, refuse the temptation to guess".
That's one of the Pythonic Theses you're tempted to ignore too often .
Part of taking 754 seriously is that 754 gives the user complete control
over what happens in case of exceptions (including underflow): ignore them,
raise a fatal error, or simply set a flag saying it occurred.
Unfortunately, we have to wait for C9x until there's a portable way to get
at that stuff. Before then, it requires wildly varying platform-specific
hair.
> Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> files generated by some Fortran program. The Fortran program is
> giving me points to plot for example. If Fortran manages to output
> 1e-500, wouldn't it make more sense if I rounded that to zero instead
> of rejecting it?
This *may* make good sense if Python had certain knowledge that the program
is merely going to plot the points, but probably not even then. That is,
"insignificantly small" is relative to the application, and e.g. for all we
know the Fortran program generated a million doubles *all* in the range
[1e-500, 10e-500]: the intended plot of the data could very well be a
pointillistic version of the Mona Lisa rather than a straight line.
> After all, after converting to plot precision it's
> going to be zero anyway.
As above, this conclusion relies on the dubious assumption that 1e-500 is
very much smaller than the other values.
> This way I could almost defend using strtod() for literals in
> Python source code (where it makes more sense to warn about underflow)
> but atof() for input. Except that of course input could conceivably
> be using eval()...
>
> Another argument for turning underflow into zero is that that also
> happens in regular arithmetic:
>
> >>> 0.1**2**8
> 1.0000000000000275e-256
> >>> 0.1**2**9
> 0.0
Which is often desired but sometimes a disaster -- the language simply can't
guess. On whatever machine you ran this on, it almost certainly set the
"underflow happened" flag but continued on because the underflow exception
was masked out by default.
> I like this uniform behavior: overflow -> exception, underflow ->
> zero. My calculator does this too.
Not mine . Really, whether underflow gripes is controlled by a
user-settable flag on high end HP calculators. Note too that neither does
float *overflow* raise an exception under most Pythons today:
D:\Python>python
Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 1e500
1.#INF
>>> 1e200**2
1.#INF
>>>
I personally favor raising exceptions (by default) on 754's overflow, divide
by 0, and invalid operation conditions, while (again by default) letting
underflow and inexact pass without comment. But it again requires fiddling
the HW's 754 control registers to make that happen. P3K, not now.
> Am I hopelessly naive about this?
Not *entirely* hopeless, but close . If we ever talk about it for an
hour, I'll convince you of the futility of fighting 754. They beat all
resistance out of me in a mere decade <0.5 wink>.
> What else can we do?
Not much! Switching uniformly to either atof() or strtod() would be OK by
me for now, although I don't think patching over the current inconsistency
buys enough bang for the buck to be worth the effort.
> What control does C give?
None, until C9X.
> What does sscanf() do?
I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
C's numerics fight the *right* thing to do now just about every step of the
way. C9x is supposed to fix all that.
In the meantime, I think what JPython does is much more interesting (but
don't know what that is): whatever we do here should be consistent with The
Other Python too, and Java has a much better 754 story than ANSI C. 754 is
here to stay, but the last iteration of ANSI C isn't. Best guess is that
Java acts more like atof than strtod in this case.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Sat, 25 Mar 2000 14:15:54 -0500
> "In the face of ambiguity, refuse the temptation to guess".
>
> That's one of the Pythonic Theses you're tempted to ignore too often .
>
> Part of taking 754 seriously is that 754 gives the user complete control
> over what happens in case of exceptions (including underflow): ignore them,
> raise a fatal error, or simply set a flag saying it occurred.
> Unfortunately, we have to wait for C9x until there's a portable way to get
> at that stuff. Before then, it requires wildly varying platform-specific
> hair.
OK, so let's stick with the defaults that 754 presecribes until we can
give the user control. That's the purpose of defaults, right?
> > Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> > files generated by some Fortran program. The Fortran program is
> > giving me points to plot for example. If Fortran manages to output
> > 1e-500, wouldn't it make more sense if I rounded that to zero instead
> > of rejecting it?
>
> This *may* make good sense if Python had certain knowledge that the program
> is merely going to plot the points, but probably not even then. That is,
> "insignificantly small" is relative to the application, and e.g. for all we
> know the Fortran program generated a million doubles *all* in the range
> [1e-500, 10e-500]: the intended plot of the data could very well be a
> pointillistic version of the Mona Lisa rather than a straight line.
OK, forget the example.
> > After all, after converting to plot precision it's
> > going to be zero anyway.
>
> As above, this conclusion relies on the dubious assumption that 1e-500 is
> very much smaller than the other values.
I think even 754 tells us that 1e-500 is smaller than what we normally
need to deal with.
> > This way I could almost defend using strtod() for literals in
> > Python source code (where it makes more sense to warn about underflow)
> > but atof() for input. Except that of course input could conceivably
> > be using eval()...
> >
> > Another argument for turning underflow into zero is that that also
> > happens in regular arithmetic:
> >
> > >>> 0.1**2**8
> > 1.0000000000000275e-256
> > >>> 0.1**2**9
> > 0.0
>
> Which is often desired but sometimes a disaster -- the language simply can't
> guess. On whatever machine you ran this on, it almost certainly set the
> "underflow happened" flag but continued on because the underflow exception
> was masked out by default.
Again: 754 gives a default. I want to conform to the default -- it's
better to provide control, but even when we provide control, there will
still be default behavior, and (if I understand 754 correctly) the
default is not to interrupt for underflow.
> > I like this uniform behavior: overflow -> exception, underflow ->
> > zero. My calculator does this too.
>
> Not mine . Really, whether underflow gripes is controlled by a
> user-settable flag on high end HP calculators. Note too that neither does
> float *overflow* raise an exception under most Pythons today:
>
> D:\Python>python
> Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> 1e500
> 1.#INF
> >>> 1e200**2
> 1.#INF
> >>>
Oops, you're right. Must be another 754 default behavior!
> I personally favor raising exceptions (by default) on 754's overflow, divide
> by 0, and invalid operation conditions, while (again by default) letting
> the HW's 754 control registers to make that happen. P3K, not now.
I would personally also prefer an exception for overflow. You don't
say what you want for underflow though. I still like silent underflow
to zero by default.
> > Am I hopelessly naive about this?
>
> Not *entirely* hopeless, but close . If we ever talk about it for an
> hour, I'll convince you of the futility of fighting 754. They beat all
> resistance out of me in a mere decade <0.5 wink>.
I'm not fighting it. Say the ideal Python has full user control over
fp exceptions. What should the defaults be? Python 1.6 should have
the same defaults, even if it doesn't have the controls.
> > What else can we do?
>
> Not much! Switching uniformly to either atof() or strtod() would be OK by
> me for now, although I don't think patching over the current inconsistency
> buys enough bang for the buck to be worth the effort.
>
> > What control does C give?
>
> None, until C9X.
>
> > What does sscanf() do?
>
> I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
> C's numerics fight the *right* thing to do now just about every step of the
> way. C9x is supposed to fix all that.
>
> In the meantime, I think what JPython does is much more interesting (but
> don't know what that is): whatever we do here should be consistent with The
> Other Python too, and Java has a much better 754 story than ANSI C. 754 is
> here to stay, but the last iteration of ANSI C isn't. Best guess is that
> Java acts more like atof than strtod in this case.
Bingo. Indeed it does. 1e500 prints as Infinity; 1e-500 is 0.0,
either as literal or when converted from a string.
I'll change float() to use atof().
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Tue, 4 Apr 2000 00:29:01 -0400
[Guido]
> OK, so let's stick with the defaults that 754 presecribes until we can
> give the user control. That's the purpose of defaults, right?
In every world other 754 (see below), but we really have no choice now
(because C doesn't give us any control now).
> I think even 754 tells us that 1e-500 is smaller than what we normally
> need to deal with.
Well, there is no 1e-500 under 754, which is why there's some reason to at
least warn about it (if the user wanted 0, why didn't they type 0?).
> Again: 754 gives a default. I want to conform to the default -- it's
> better to provide control, but even when we provide control, there will
> still be default behavior, and (if I understand 754 correctly) the
> default is not to interrupt for underflow.
The 754 default is never to raise an exception no matter what, whether
overflow, underflow, invalid operation (like sqrt(-4)), or divide by 0. So
Python's current behavior wrt these two is non-conforming:
math.sqrt(-4)
1. / 0.
However, 754 is primarily a HW std, and the defaults were prescribed by a
committee of HW geeks and math library authors. They were caught totally
off guard by how long it took for languages to provide the control features
the std also mandates -- for "regular users" it's plainly insane to avoid
griping about the two above, and it was never 754's intent to let them pass
silently for regular users.
Note that Java has been skewered mercilessly by Kahan (Mr. 754 Himself) for
accepting the defaults but not providing the also-mandated control
functions. The std is subtler than it appears, and all the fiddly bits are
really needed.
>> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>> >>> 1e500
>> 1.#INF
>> >>> 1e200**2
>> 1.#INF
>> >>>
> Oops, you're right. Must be another 754 default behavior!
Right.
> I would personally also prefer an exception for overflow. You don't
> say what you want for underflow though. I still like silent underflow
> to zero by default.
754 defines (almost) everything: underflow when the underflow exception is
masked out must deliver a zero with the same sign as the infinite-precision
result.
> I'm not fighting it.
You will ; e.g., returning 1 for "x == x" is incorrect when x is a
NaN.
> Say the ideal Python has full user control over fp exceptions. What
> should the defaults be?
IMO, exception on overflow, divide-by-0 and invalid operation. Let
underflow and inexact pass silently. That's what I implemented at KSR, and
customers were *very* much happier with that than with the 754 defaults. Of
course I also implemented all the 754 control and status inquiry functions,
so the one 754-savvy programmer per site was happy too (they need the
control to write robust numerical libraries for everyone else to use -- the
*true* purpose of the 754 HW defaults).
> Python 1.6 should have the same defaults, even if it doesn't have the
> controls.
This is a big project, as there's no portable way even to detect fp overflow
now. The math libraries should play along too.
> I'll change float() to use atof().
OK by me!
-------------------------------------------------------
Date: 2000-Aug-03 05:43
By: twouters
Comment:
I *think* this one is fixed and closed. It looks like Guido promises to fix this, in any case, and it looks done.
-------------------------------------------------------
Date: 2000-Aug-10 11:48
By: gvanrossum
Comment:
No, it's not fixed, but it is platform dependent how it behaves.
The conclusion was that we should use atof() everywhere, and write a separate syntax checker (since atof() stops at the first invalid character).
I made a start at a syntax checker but then got distracted. Here's my code:
static char *
floatsyntax(char *s)
{
/* Check for valid floating point syntax:
space*
[sign]
(digit+ [period digit*] | period digit+)
[(e|E) [sign] digit+]
space*
*/
int digits, period;
while (isspace(*s))
s++;
if (*s == '+' || *s == '-')
s++;
digits = period = 0;
for (;;) {
if (isdigit(*s))
digits++;
else if (*s == '.') {
if (period)
return NULL;
period++;
}
else
break;
}
if (!digits)
return NULL;
if (*s == 'e' || *s == 'E') {
s++;
if (*s == '+' || *s == '-')
s++;
digits = 0;
while (isdigit(*s))
digits++;
if (!digits)
return NULL;
}
return s;
}
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110624&group_id=5470
From noreply@sourceforge.net Thu Aug 10 19:51:15 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 11:51:15 -0700
Subject: [Python-bugs-list] [Bug #110624] float("1.0e-309") inconsistency on win32 (PR#245)
Message-ID: <200008101851.LAA19217@delerium.i.sourceforge.net>
Bug #110624, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: Remind
Bug Group: None
Priority: 4
Summary: float("1.0e-309") inconsistency on win32 (PR#245)
Details: Jitterbug-Id: 245
Submitted-By: sde@recombinant.demon.co.uk
Date: Wed, 22 Mar 2000 16:13:26 -0500 (EST)
Version: 1.5.2
OS: win32
#! /usr/bin/python
# Inconsistent behaviour.
# Python 1.5.2 win32 fails the second print (why not both?)
# other versions print both expressions
# Ok Python 1.5.2 on SuSE Linux 6.3
# Ok JPython 1.1 on java1.1.7B
# Partial failure Python 1.5.2 win32
print eval("float(1.0e-309)")
print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
====================================================================
Audit trail:
Fri Mar 24 16:42:36 2000 guido changed notes
Fri Mar 24 16:42:36 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Thu, 23 Mar 2000 01:43:30 -0500
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> sde@recombinant.demon.co.uk
> Sent: Wednesday, March 22, 2000 4:13 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] float("1.0e-309") inconsistency on win32
> (PR#245)
>
>
> Full_Name: Stephen D Evans
> Version: 1.5.2
> OS: win32
> Submission from: recombinant.demon.co.uk (212.229.73.7)
>
>
> #! /usr/bin/python
>
> # Inconsistent behaviour.
>
> # Python 1.5.2 win32 fails the second print (why not both?)
> # other versions print both expressions
>
> # Ok Python 1.5.2 on SuSE Linux 6.3
> # Ok JPython 1.1 on java1.1.7B
> # Partial failure Python 1.5.2 win32
>
> print eval("float(1.0e-309)")
> print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
First note that these don't do the same thing: the first passes a float to
"float", the second passes a string to "float". Change the first to
print eval("float('1.0e-309')")
and it gives the same bogus error as the second one.
Then it turns out the error is Microsoft's fault. This tiny C program shows
the bug:
#include
#include
#include
void
main()
{
double x;
char* dontcare;
errno = 0;
x = strtod("1.0e-309", &dontcare);
printf("errno after = %d\n", errno);
printf("x after = %g\n", x);
}
This prints
errno after = 34
x after = 0
when compiled & linked with MS's VC5; don't know about VC6. Same thing for
"1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
fixes their library.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 04:51:57 -0500
> > Full_Name: Stephen D Evans
> > Version: 1.5.2
> > OS: win32
> > Submission from: recombinant.demon.co.uk (212.229.73.7)
> >
> >
> > #! /usr/bin/python
> >
> > # Inconsistent behaviour.
> >
> > # Python 1.5.2 win32 fails the second print (why not both?)
> > # other versions print both expressions
> >
> > # Ok Python 1.5.2 on SuSE Linux 6.3
> > # Ok JPython 1.1 on java1.1.7B
> > # Partial failure Python 1.5.2 win32
> >
> > print eval("float(1.0e-309)")
> > print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
>
> First note that these don't do the same thing: the first passes a float to
> "float", the second passes a string to "float". Change the first to
>
> print eval("float('1.0e-309')")
>
> and it gives the same bogus error as the second one.
>
> Then it turns out the error is Microsoft's fault. This tiny C program shows
> the bug:
>
> #include
> #include
> #include
>
> void
> main()
> {
> double x;
> char* dontcare;
> errno = 0;
> x = strtod("1.0e-309", &dontcare);
> printf("errno after = %d\n", errno);
> printf("x after = %g\n", x);
> }
>
> This prints
>
> errno after = 34
> x after = 0
>
> when compiled & linked with MS's VC5; don't know about VC6. Same thing for
> "1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
> fixes their library.
The bizarre thing is that this is broken the same way on Solaris:
>>> 1.0e-309
1.0000000000000019e-309
>>> float("1.0e-309")
Traceback (innermost last):
File "", line 1, in ?
ValueError: float() literal too large: 1.0e-309
>>>
I looked and it turns out that Python uses atof() in the first case
(string literal encountered in a Python expression) and strtod() in
the second case (string passed to float()).
Apparently strtod() and atof() differ in implementation, even though
the Solaris man page says "The atof(str) function call is equivalent
to strtod(str, (char **)NULL)."
We could fix this by changing float() to do its own syntax checking
and then use atof()... Is it worth it?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 22:48:50 -0500
[atof and strtod act differently given denormals on both Windows &
Solaris]
[Guido]
> ...
> Apparently strtod() and atof() differ in implementation, even though
> the Solaris man page says "The atof(str) function call is equivalent
> to strtod(str, (char **)NULL)."
Ya, their man page is lying. atof() existed in the mists of prehistory and
typically did no error checking at all. IIRC, ANSI C introduced strtod(),
which generally got implemented as a layer of error-checking around atof.
I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
inputs with absolute value smaller than that.
> We could fix this by changing float() to do its own syntax checking
> and then use atof()... Is it worth it?
Depends on your goal : do you want more extreme cases, like 1e-500,
to blow up (strtod) or underflow to 0 (atof)? The example in the original
test case is subtler because atof made it *appear* to be "a regular old
number"; in fact, it's not, it's small enough that it falls into 754's
"denormalized" range. This means the conversion loses some extraordinary
amount of-- but not all --information (whereas 1e-500 is below even the
denorm range: conversion loses all information).
Without a coherent strategy for dealing with 754 issues, it's hard to decide
which is better. Since strtod() is more restrictive, if this is worth
bothering about at all now (for P3K I think 754 needs to be taken
seriously), I actually recommend changing current atof() calls to use
native strtod() instead.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:14:29 -0500
> [atof and strtod act differently given denormals on both Windows &
> Solaris]
>
> [Guido]
> > ...
> > Apparently strtod() and atof() differ in implementation, even though
> > the Solaris man page says "The atof(str) function call is equivalent
> > to strtod(str, (char **)NULL)."
[Tim]
> Ya, their man page is lying. atof() existed in the mists of prehistory and
> typically did no error checking at all. IIRC, ANSI C introduced strtod(),
> which generally got implemented as a layer of error-checking around atof.
>
> I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
> limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
> inputs with absolute value smaller than that.
>
> > We could fix this by changing float() to do its own syntax checking
> > and then use atof()... Is it worth it?
>
> Depends on your goal : do you want more extreme cases, like 1e-500,
> to blow up (strtod) or underflow to 0 (atof)? The example in the original
> test case is subtler because atof made it *appear* to be "a regular old
> number"; in fact, it's not, it's small enough that it falls into 754's
> "denormalized" range. This means the conversion loses some extraordinary
> amount of-- but not all --information (whereas 1e-500 is below even the
> denorm range: conversion loses all information).
>
> Without a coherent strategy for dealing with 754 issues, it's hard to decide
> which is better. Since strtod() is more restrictive, if this is worth
> bothering about at all now (for P3K I think 754 needs to be taken
> seriously), I actually recommend changing current atof() calls to use
> native strtod() instead.
Hm, I'm not so sure. Suppose I'm writing a program that reads a data
files generated by some Fortran program. The Fortran program is
giving me points to plot for example. If Fortran manages to output
1e-500, wouldn't it make more sense if I rounded that to zero instead
of rejecting it? After all, after converting to plot precision it's
going to be zero anyway.
This way I could almost defend using strtod() for literals in
Python source code (where it makes more sense to warn about underflow)
but atof() for input. Except that of course input could conceivably
be using eval()...
Another argument for turning underflow into zero is that that also
happens in regular arithmetic:
>>> 0.1**2**8
1.0000000000000275e-256
>>> 0.1**2**9
0.0
I like this uniform behavior: overflow -> exception, underflow ->
zero. My calculator does this too.
Am I hopelessly naive about this? What else can we do? What control
does C give? What does sscanf() do?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:53:10 -0500
"In the face of ambiguity, refuse the temptation to guess".
That's one of the Pythonic Theses you're tempted to ignore too often .
Part of taking 754 seriously is that 754 gives the user complete control
over what happens in case of exceptions (including underflow): ignore them,
raise a fatal error, or simply set a flag saying it occurred.
Unfortunately, we have to wait for C9x until there's a portable way to get
at that stuff. Before then, it requires wildly varying platform-specific
hair.
> Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> files generated by some Fortran program. The Fortran program is
> giving me points to plot for example. If Fortran manages to output
> 1e-500, wouldn't it make more sense if I rounded that to zero instead
> of rejecting it?
This *may* make good sense if Python had certain knowledge that the program
is merely going to plot the points, but probably not even then. That is,
"insignificantly small" is relative to the application, and e.g. for all we
know the Fortran program generated a million doubles *all* in the range
[1e-500, 10e-500]: the intended plot of the data could very well be a
pointillistic version of the Mona Lisa rather than a straight line.
> After all, after converting to plot precision it's
> going to be zero anyway.
As above, this conclusion relies on the dubious assumption that 1e-500 is
very much smaller than the other values.
> This way I could almost defend using strtod() for literals in
> Python source code (where it makes more sense to warn about underflow)
> but atof() for input. Except that of course input could conceivably
> be using eval()...
>
> Another argument for turning underflow into zero is that that also
> happens in regular arithmetic:
>
> >>> 0.1**2**8
> 1.0000000000000275e-256
> >>> 0.1**2**9
> 0.0
Which is often desired but sometimes a disaster -- the language simply can't
guess. On whatever machine you ran this on, it almost certainly set the
"underflow happened" flag but continued on because the underflow exception
was masked out by default.
> I like this uniform behavior: overflow -> exception, underflow ->
> zero. My calculator does this too.
Not mine . Really, whether underflow gripes is controlled by a
user-settable flag on high end HP calculators. Note too that neither does
float *overflow* raise an exception under most Pythons today:
D:\Python>python
Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 1e500
1.#INF
>>> 1e200**2
1.#INF
>>>
I personally favor raising exceptions (by default) on 754's overflow, divide
by 0, and invalid operation conditions, while (again by default) letting
underflow and inexact pass without comment. But it again requires fiddling
the HW's 754 control registers to make that happen. P3K, not now.
> Am I hopelessly naive about this?
Not *entirely* hopeless, but close . If we ever talk about it for an
hour, I'll convince you of the futility of fighting 754. They beat all
resistance out of me in a mere decade <0.5 wink>.
> What else can we do?
Not much! Switching uniformly to either atof() or strtod() would be OK by
me for now, although I don't think patching over the current inconsistency
buys enough bang for the buck to be worth the effort.
> What control does C give?
None, until C9X.
> What does sscanf() do?
I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
C's numerics fight the *right* thing to do now just about every step of the
way. C9x is supposed to fix all that.
In the meantime, I think what JPython does is much more interesting (but
don't know what that is): whatever we do here should be consistent with The
Other Python too, and Java has a much better 754 story than ANSI C. 754 is
here to stay, but the last iteration of ANSI C isn't. Best guess is that
Java acts more like atof than strtod in this case.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Sat, 25 Mar 2000 14:15:54 -0500
> "In the face of ambiguity, refuse the temptation to guess".
>
> That's one of the Pythonic Theses you're tempted to ignore too often .
>
> Part of taking 754 seriously is that 754 gives the user complete control
> over what happens in case of exceptions (including underflow): ignore them,
> raise a fatal error, or simply set a flag saying it occurred.
> Unfortunately, we have to wait for C9x until there's a portable way to get
> at that stuff. Before then, it requires wildly varying platform-specific
> hair.
OK, so let's stick with the defaults that 754 presecribes until we can
give the user control. That's the purpose of defaults, right?
> > Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> > files generated by some Fortran program. The Fortran program is
> > giving me points to plot for example. If Fortran manages to output
> > 1e-500, wouldn't it make more sense if I rounded that to zero instead
> > of rejecting it?
>
> This *may* make good sense if Python had certain knowledge that the program
> is merely going to plot the points, but probably not even then. That is,
> "insignificantly small" is relative to the application, and e.g. for all we
> know the Fortran program generated a million doubles *all* in the range
> [1e-500, 10e-500]: the intended plot of the data could very well be a
> pointillistic version of the Mona Lisa rather than a straight line.
OK, forget the example.
> > After all, after converting to plot precision it's
> > going to be zero anyway.
>
> As above, this conclusion relies on the dubious assumption that 1e-500 is
> very much smaller than the other values.
I think even 754 tells us that 1e-500 is smaller than what we normally
need to deal with.
> > This way I could almost defend using strtod() for literals in
> > Python source code (where it makes more sense to warn about underflow)
> > but atof() for input. Except that of course input could conceivably
> > be using eval()...
> >
> > Another argument for turning underflow into zero is that that also
> > happens in regular arithmetic:
> >
> > >>> 0.1**2**8
> > 1.0000000000000275e-256
> > >>> 0.1**2**9
> > 0.0
>
> Which is often desired but sometimes a disaster -- the language simply can't
> guess. On whatever machine you ran this on, it almost certainly set the
> "underflow happened" flag but continued on because the underflow exception
> was masked out by default.
Again: 754 gives a default. I want to conform to the default -- it's
better to provide control, but even when we provide control, there will
still be default behavior, and (if I understand 754 correctly) the
default is not to interrupt for underflow.
> > I like this uniform behavior: overflow -> exception, underflow ->
> > zero. My calculator does this too.
>
> Not mine . Really, whether underflow gripes is controlled by a
> user-settable flag on high end HP calculators. Note too that neither does
> float *overflow* raise an exception under most Pythons today:
>
> D:\Python>python
> Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> 1e500
> 1.#INF
> >>> 1e200**2
> 1.#INF
> >>>
Oops, you're right. Must be another 754 default behavior!
> I personally favor raising exceptions (by default) on 754's overflow, divide
> by 0, and invalid operation conditions, while (again by default) letting
> the HW's 754 control registers to make that happen. P3K, not now.
I would personally also prefer an exception for overflow. You don't
say what you want for underflow though. I still like silent underflow
to zero by default.
> > Am I hopelessly naive about this?
>
> Not *entirely* hopeless, but close . If we ever talk about it for an
> hour, I'll convince you of the futility of fighting 754. They beat all
> resistance out of me in a mere decade <0.5 wink>.
I'm not fighting it. Say the ideal Python has full user control over
fp exceptions. What should the defaults be? Python 1.6 should have
the same defaults, even if it doesn't have the controls.
> > What else can we do?
>
> Not much! Switching uniformly to either atof() or strtod() would be OK by
> me for now, although I don't think patching over the current inconsistency
> buys enough bang for the buck to be worth the effort.
>
> > What control does C give?
>
> None, until C9X.
>
> > What does sscanf() do?
>
> I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
> C's numerics fight the *right* thing to do now just about every step of the
> way. C9x is supposed to fix all that.
>
> In the meantime, I think what JPython does is much more interesting (but
> don't know what that is): whatever we do here should be consistent with The
> Other Python too, and Java has a much better 754 story than ANSI C. 754 is
> here to stay, but the last iteration of ANSI C isn't. Best guess is that
> Java acts more like atof than strtod in this case.
Bingo. Indeed it does. 1e500 prints as Infinity; 1e-500 is 0.0,
either as literal or when converted from a string.
I'll change float() to use atof().
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Tue, 4 Apr 2000 00:29:01 -0400
[Guido]
> OK, so let's stick with the defaults that 754 presecribes until we can
> give the user control. That's the purpose of defaults, right?
In every world other 754 (see below), but we really have no choice now
(because C doesn't give us any control now).
> I think even 754 tells us that 1e-500 is smaller than what we normally
> need to deal with.
Well, there is no 1e-500 under 754, which is why there's some reason to at
least warn about it (if the user wanted 0, why didn't they type 0?).
> Again: 754 gives a default. I want to conform to the default -- it's
> better to provide control, but even when we provide control, there will
> still be default behavior, and (if I understand 754 correctly) the
> default is not to interrupt for underflow.
The 754 default is never to raise an exception no matter what, whether
overflow, underflow, invalid operation (like sqrt(-4)), or divide by 0. So
Python's current behavior wrt these two is non-conforming:
math.sqrt(-4)
1. / 0.
However, 754 is primarily a HW std, and the defaults were prescribed by a
committee of HW geeks and math library authors. They were caught totally
off guard by how long it took for languages to provide the control features
the std also mandates -- for "regular users" it's plainly insane to avoid
griping about the two above, and it was never 754's intent to let them pass
silently for regular users.
Note that Java has been skewered mercilessly by Kahan (Mr. 754 Himself) for
accepting the defaults but not providing the also-mandated control
functions. The std is subtler than it appears, and all the fiddly bits are
really needed.
>> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>> >>> 1e500
>> 1.#INF
>> >>> 1e200**2
>> 1.#INF
>> >>>
> Oops, you're right. Must be another 754 default behavior!
Right.
> I would personally also prefer an exception for overflow. You don't
> say what you want for underflow though. I still like silent underflow
> to zero by default.
754 defines (almost) everything: underflow when the underflow exception is
masked out must deliver a zero with the same sign as the infinite-precision
result.
> I'm not fighting it.
You will ; e.g., returning 1 for "x == x" is incorrect when x is a
NaN.
> Say the ideal Python has full user control over fp exceptions. What
> should the defaults be?
IMO, exception on overflow, divide-by-0 and invalid operation. Let
underflow and inexact pass silently. That's what I implemented at KSR, and
customers were *very* much happier with that than with the 754 defaults. Of
course I also implemented all the 754 control and status inquiry functions,
so the one 754-savvy programmer per site was happy too (they need the
control to write robust numerical libraries for everyone else to use -- the
*true* purpose of the 754 HW defaults).
> Python 1.6 should have the same defaults, even if it doesn't have the
> controls.
This is a big project, as there's no portable way even to detect fp overflow
now. The math libraries should play along too.
> I'll change float() to use atof().
OK by me!
-------------------------------------------------------
Date: 2000-Aug-03 05:43
By: twouters
Comment:
I *think* this one is fixed and closed. It looks like Guido promises to fix this, in any case, and it looks done.
-------------------------------------------------------
Date: 2000-Aug-10 11:48
By: gvanrossum
Comment:
No, it's not fixed, but it is platform dependent how it behaves.
The conclusion was that we should use atof() everywhere, and write a separate syntax checker (since atof() stops at the first invalid character).
I made a start at a syntax checker but then got distracted. Here's my code:
static char *
floatsyntax(char *s)
{
/* Check for valid floating point syntax:
space*
[sign]
(digit+ [period digit*] | period digit+)
[(e|E) [sign] digit+]
space*
*/
int digits, period;
while (isspace(*s))
s++;
if (*s == '+' || *s == '-')
s++;
digits = period = 0;
for (;;) {
if (isdigit(*s))
digits++;
else if (*s == '.') {
if (period)
return NULL;
period++;
}
else
break;
}
if (!digits)
return NULL;
if (*s == 'e' || *s == 'E') {
s++;
if (*s == '+' || *s == '-')
s++;
digits = 0;
while (isdigit(*s))
digits++;
if (!digits)
return NULL;
}
return s;
}
-------------------------------------------------------
Date: 2000-Aug-10 11:51
By: gvanrossum
Comment:
Shit. SF removes leading whitespace. Oh well, mail me for a properly formatted version of that code.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110624&group_id=5470
From noreply@sourceforge.net Thu Aug 10 19:52:01 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 11:52:01 -0700
Subject: [Python-bugs-list] [Bug #110610] .pyc writing/reading race condition (PR#189)
Message-ID: <200008101852.LAA19222@delerium.i.sourceforge.net>
Bug #110610, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Parser/Compiler
Status: Open
Resolution: Later
Bug Group: None
Priority: 1
Summary: .pyc writing/reading race condition (PR#189)
Details: Jitterbug-Id: 189
Submitted-By: gudo@python.org
Date: Mon, 24 Jan 2000 14:27:24 -0500 (EST)
Version: 1.5.2
OS: any
Patrick Miller reminded me that there's still a race condition in the reading
and writing of .pyc files. If two processes decide to write the .pyc, and
a third reads the header after the first complete but before the second
starts, but reads the rest of the file after the second starts but before it
is done, the third can read corrupt data (and won't fall back to reading the
.py source).
Solution: when writing the .pyc file, (1) unlink the file before writing,
(2) use open() with the Unix flags that fail creation if the file exists
(and then just treat it like any open failure when writing the .pyc file).
====================================================================
Audit trail:
Mon Jan 24 14:28:42 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-10 11:52
By: gvanrossum
Comment:
No time to fix this now...
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110610&group_id=5470
From noreply@sourceforge.net Fri Aug 11 00:04:09 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 16:04:09 -0700
Subject: [Python-bugs-list] [Bug #110868] PythonWin crash on dead keys (PR#372)
Message-ID: <200008102304.QAA13915@bush.i.sourceforge.net>
Bug #110868, was updated on 2000-Aug-01 14:42
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Closed
Resolution: Fixed
Bug Group: 3rd Party
Priority: 5
Summary: PythonWin crash on dead keys (PR#372)
Details: Jitterbug-Id: 372
Submitted-By: gottfried.ganssauge@dynix.de
Date: Tue, 27 Jun 2000 05:23:09 -0400 (EDT)
Version: 1.5.2
OS: Windows 2000
I'm using PyWin32 build 132, but the problem occurs with build 129 as well.
Every time I hit one of the dead keys on my keyboard (`, ^) PythonWin crashes.
I traced the error back to the routine ui_translate_vk() in win32uimodule.cpp.
The call to ToAsciiEx() with a dead key's scan code returns -1 and in the
following call to PyString_FromStringAndSize() this eventually leads to the
crash.
In my opininion the reason for that lies before the call to this routine.
pywin hooks WM_KEYDOWN in several places and doesn't check for dead keys but
tries to translate the scan code to an ASCII character.
With dead keys this obviously must fail.
Windows itself already does the correct translation as described in the
Platform SDK article about Dead-Character Messages:
Some non-English keyboards contain character keys that are not expected to
produce characters by themselves. Instead, they are used to add a diacritic to
the character produced by the subsequent keystroke. These keys are called dead
keys. The circumflex key on a German keyboard is an example of a dead key. To
enter the character consisting of an "o" with a circumflex, a German user would
type the circumflex key followed by the "o" key. The window with the keyboard
focus would receive the following sequence of messages:
WM_KEYDOWN
WM_DEADCHAR
WM_KEYUP
WM_KEYDOWN
WM_CHAR
WM_KEYUP
Consequently pywin should ignore WM_KEYDOWN messages completely if they are
produced by a dead key.
I tried to implement that using the current win32api implementation, but
unfortunately the necessary API-Function to find out if a key is a dead key are
not provided in the current implementation; namely the MapVirtualKey(Ex)
function.
Cheers, and keep up the good work
Gottfried
====================================================================
Audit trail:
Tue Jul 11 08:24:21 2000 guido moved from incoming to 3rdpartybug
Follow-Ups:
Date: 2000-Aug-01 14:42
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] PythonWin crash on dead keys (PR#372)
Date: Wed, 28 Jun 2000 10:33:26 +1000
Thanks for reporting this. Ill look into it.
In general, this bug mechanism is for Python itself, and not the Python for
Win32 extensions. Its probably best to simply mail future bugs in the
Win32 stuff directly to me.
Mark.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> gottfried.ganssauge@dynix.de
> Sent: Tuesday, 27 June 2000 11:08 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] PythonWin crash on dead keys (PR#372)
>
>
> Full_Name: Gottfried Ganßauge
> Version: 1.5.2
> OS: Windows 2000
> Submission from: joshua2go.dynix.de (195.21.130.43)
>
>
> I'm using PyWin32 build 132, but the problem occurs with build
> 129 as well.
>
> Every time I hit one of the dead keys on my keyboard (`, ^)
> PythonWin crashes.
> I traced the error back to the routine ui_translate_vk() in
> win32uimodule.cpp.
> The call to ToAsciiEx() with a dead key's scan code returns -1 and in the
> following call to PyString_FromStringAndSize() this eventually
> leads to the
> crash.
> In my opininion the reason for that lies before the call to this routine.
> pywin hooks WM_KEYDOWN in several places and doesn't check for
> dead keys but
> tries to translate the scan code to an ASCII character.
> With dead keys this obviously must fail.
> Windows itself already does the correct translation as described in the
> Platform SDK article about Dead-Character Messages:
>
> Some non-English keyboards contain character keys that are not
> expected to
> produce characters by themselves. Instead, they are used to add
> a diacritic to
> the character produced by the subsequent keystroke. These keys
> are called dead
> keys. The circumflex key on a German keyboard is an example of a
> dead key. To
> enter the character consisting of an "o" with a circumflex, a
> German user would
> type the circumflex key followed by the "o" key. The window with
> the keyboard
> focus would receive the following sequence of messages:
>
> WM_KEYDOWN
> WM_DEADCHAR
> WM_KEYUP
> WM_KEYDOWN
> WM_CHAR
> WM_KEYUP
>
>
> Consequently pywin should ignore WM_KEYDOWN messages completely
> if they are
> produced by a dead key.
> I tried to implement that using the current win32api implementation, but
> unfortunately the necessary API-Function to find out if a key is
> a dead key are
> not provided in the current implementation; namely the MapVirtualKey(Ex)
> function.
>
> Cheers, and keep up the good work
>
> Gottfried
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
>
-------------------------------------------------------
Date: 2000-Aug-10 10:01
By: twouters
Comment:
Feel free to close this report if you think it shouldn't be here, Mark.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110868&group_id=5470
From noreply@sourceforge.net Fri Aug 11 00:39:48 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 16:39:48 -0700
Subject: [Python-bugs-list] [Bug #111620] lots of use of send() without verifying amount of data sent.
Message-ID: <200008102339.QAA29157@delerium.i.sourceforge.net>
Bug #111620, was updated on 2000-Aug-10 16:39
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: lots of use of send() without verifying amount of data sent.
Details: a quick grep of the standard python library (below) shows that there
is lots of unchecked use of the send() function. Every unix system I've every used states that send() returns the number of bytes sent, which can be < length(). Using socket.send(s) without verifying that the return value is equal to the length of s is careless and can result in loss of data.
I just submitted a patch for smtplib's use of send(), have patched a piece of Zope the same way, and get the feeling that it's becoming standard to call send() without checking
that the amount of data sent is the intended amount. While this is OK for a quick script, I don't feel it's OK for library code or anything that might be used in production.
scott
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111620&group_id=5470
From noreply@sourceforge.net Fri Aug 11 05:57:52 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Thu, 10 Aug 2000 21:57:52 -0700
Subject: [Python-bugs-list] [Bug #110624] float("1.0e-309") inconsistency on win32 (PR#245)
Message-ID: <200008110457.VAA06867@delerium.i.sourceforge.net>
Bug #110624, was updated on 2000-Jul-31 14:08
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: Remind
Bug Group: None
Priority: 4
Summary: float("1.0e-309") inconsistency on win32 (PR#245)
Details: Jitterbug-Id: 245
Submitted-By: sde@recombinant.demon.co.uk
Date: Wed, 22 Mar 2000 16:13:26 -0500 (EST)
Version: 1.5.2
OS: win32
#! /usr/bin/python
# Inconsistent behaviour.
# Python 1.5.2 win32 fails the second print (why not both?)
# other versions print both expressions
# Ok Python 1.5.2 on SuSE Linux 6.3
# Ok JPython 1.1 on java1.1.7B
# Partial failure Python 1.5.2 win32
print eval("float(1.0e-309)")
print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
====================================================================
Audit trail:
Fri Mar 24 16:42:36 2000 guido changed notes
Fri Mar 24 16:42:36 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Thu, 23 Mar 2000 01:43:30 -0500
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> sde@recombinant.demon.co.uk
> Sent: Wednesday, March 22, 2000 4:13 PM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] float("1.0e-309") inconsistency on win32
> (PR#245)
>
>
> Full_Name: Stephen D Evans
> Version: 1.5.2
> OS: win32
> Submission from: recombinant.demon.co.uk (212.229.73.7)
>
>
> #! /usr/bin/python
>
> # Inconsistent behaviour.
>
> # Python 1.5.2 win32 fails the second print (why not both?)
> # other versions print both expressions
>
> # Ok Python 1.5.2 on SuSE Linux 6.3
> # Ok JPython 1.1 on java1.1.7B
> # Partial failure Python 1.5.2 win32
>
> print eval("float(1.0e-309)")
> print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
First note that these don't do the same thing: the first passes a float to
"float", the second passes a string to "float". Change the first to
print eval("float('1.0e-309')")
and it gives the same bogus error as the second one.
Then it turns out the error is Microsoft's fault. This tiny C program shows
the bug:
#include
#include
#include
void
main()
{
double x;
char* dontcare;
errno = 0;
x = strtod("1.0e-309", &dontcare);
printf("errno after = %d\n", errno);
printf("x after = %g\n", x);
}
This prints
errno after = 34
x after = 0
when compiled & linked with MS's VC5; don't know about VC6. Same thing for
"1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
fixes their library.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 04:51:57 -0500
> > Full_Name: Stephen D Evans
> > Version: 1.5.2
> > OS: win32
> > Submission from: recombinant.demon.co.uk (212.229.73.7)
> >
> >
> > #! /usr/bin/python
> >
> > # Inconsistent behaviour.
> >
> > # Python 1.5.2 win32 fails the second print (why not both?)
> > # other versions print both expressions
> >
> > # Ok Python 1.5.2 on SuSE Linux 6.3
> > # Ok JPython 1.1 on java1.1.7B
> > # Partial failure Python 1.5.2 win32
> >
> > print eval("float(1.0e-309)")
> > print float("1.0e-309") # ValueError: float() literal too large: 1.0e-309
>
> First note that these don't do the same thing: the first passes a float to
> "float", the second passes a string to "float". Change the first to
>
> print eval("float('1.0e-309')")
>
> and it gives the same bogus error as the second one.
>
> Then it turns out the error is Microsoft's fault. This tiny C program shows
> the bug:
>
> #include
> #include
> #include
>
> void
> main()
> {
> double x;
> char* dontcare;
> errno = 0;
> x = strtod("1.0e-309", &dontcare);
> printf("errno after = %d\n", errno);
> printf("x after = %g\n", x);
> }
>
> This prints
>
> errno after = 34
> x after = 0
>
> when compiled & linked with MS's VC5; don't know about VC6. Same thing for
> "1.0e-308". Works fine for "1.0e-307". Doubt this will get fixed before MS
> fixes their library.
The bizarre thing is that this is broken the same way on Solaris:
>>> 1.0e-309
1.0000000000000019e-309
>>> float("1.0e-309")
Traceback (innermost last):
File "", line 1, in ?
ValueError: float() literal too large: 1.0e-309
>>>
I looked and it turns out that Python uses atof() in the first case
(string literal encountered in a Python expression) and strtod() in
the second case (string passed to float()).
Apparently strtod() and atof() differ in implementation, even though
the Solaris man page says "The atof(str) function call is equivalent
to strtod(str, (char **)NULL)."
We could fix this by changing float() to do its own syntax checking
and then use atof()... Is it worth it?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 22:48:50 -0500
[atof and strtod act differently given denormals on both Windows &
Solaris]
[Guido]
> ...
> Apparently strtod() and atof() differ in implementation, even though
> the Solaris man page says "The atof(str) function call is equivalent
> to strtod(str, (char **)NULL)."
Ya, their man page is lying. atof() existed in the mists of prehistory and
typically did no error checking at all. IIRC, ANSI C introduced strtod(),
which generally got implemented as a layer of error-checking around atof.
I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
inputs with absolute value smaller than that.
> We could fix this by changing float() to do its own syntax checking
> and then use atof()... Is it worth it?
Depends on your goal : do you want more extreme cases, like 1e-500,
to blow up (strtod) or underflow to 0 (atof)? The example in the original
test case is subtler because atof made it *appear* to be "a regular old
number"; in fact, it's not, it's small enough that it falls into 754's
"denormalized" range. This means the conversion loses some extraordinary
amount of-- but not all --information (whereas 1e-500 is below even the
denorm range: conversion loses all information).
Without a coherent strategy for dealing with 754 issues, it's hard to decide
which is better. Since strtod() is more restrictive, if this is worth
bothering about at all now (for P3K I think 754 needs to be taken
seriously), I actually recommend changing current atof() calls to use
native strtod() instead.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:14:29 -0500
> [atof and strtod act differently given denormals on both Windows &
> Solaris]
>
> [Guido]
> > ...
> > Apparently strtod() and atof() differ in implementation, even though
> > the Solaris man page says "The atof(str) function call is equivalent
> > to strtod(str, (char **)NULL)."
[Tim]
> Ya, their man page is lying. atof() existed in the mists of prehistory and
> typically did no error checking at all. IIRC, ANSI C introduced strtod(),
> which generally got implemented as a layer of error-checking around atof.
>
> I have to take it back that this is a bug in MS's strtod: DBL_MIN is MS's
> limits.h is 2.2250738585072014e-308, so strtod() *should* gripe on non-zero
> inputs with absolute value smaller than that.
>
> > We could fix this by changing float() to do its own syntax checking
> > and then use atof()... Is it worth it?
>
> Depends on your goal : do you want more extreme cases, like 1e-500,
> to blow up (strtod) or underflow to 0 (atof)? The example in the original
> test case is subtler because atof made it *appear* to be "a regular old
> number"; in fact, it's not, it's small enough that it falls into 754's
> "denormalized" range. This means the conversion loses some extraordinary
> amount of-- but not all --information (whereas 1e-500 is below even the
> denorm range: conversion loses all information).
>
> Without a coherent strategy for dealing with 754 issues, it's hard to decide
> which is better. Since strtod() is more restrictive, if this is worth
> bothering about at all now (for P3K I think 754 needs to be taken
> seriously), I actually recommend changing current atof() calls to use
> native strtod() instead.
Hm, I'm not so sure. Suppose I'm writing a program that reads a data
files generated by some Fortran program. The Fortran program is
giving me points to plot for example. If Fortran manages to output
1e-500, wouldn't it make more sense if I rounded that to zero instead
of rejecting it? After all, after converting to plot precision it's
going to be zero anyway.
This way I could almost defend using strtod() for literals in
Python source code (where it makes more sense to warn about underflow)
but atof() for input. Except that of course input could conceivably
be using eval()...
Another argument for turning underflow into zero is that that also
happens in regular arithmetic:
>>> 0.1**2**8
1.0000000000000275e-256
>>> 0.1**2**9
0.0
I like this uniform behavior: overflow -> exception, underflow ->
zero. My calculator does this too.
Am I hopelessly naive about this? What else can we do? What control
does C give? What does sscanf() do?
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Fri, 24 Mar 2000 23:53:10 -0500
"In the face of ambiguity, refuse the temptation to guess".
That's one of the Pythonic Theses you're tempted to ignore too often .
Part of taking 754 seriously is that 754 gives the user complete control
over what happens in case of exceptions (including underflow): ignore them,
raise a fatal error, or simply set a flag saying it occurred.
Unfortunately, we have to wait for C9x until there's a portable way to get
at that stuff. Before then, it requires wildly varying platform-specific
hair.
> Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> files generated by some Fortran program. The Fortran program is
> giving me points to plot for example. If Fortran manages to output
> 1e-500, wouldn't it make more sense if I rounded that to zero instead
> of rejecting it?
This *may* make good sense if Python had certain knowledge that the program
is merely going to plot the points, but probably not even then. That is,
"insignificantly small" is relative to the application, and e.g. for all we
know the Fortran program generated a million doubles *all* in the range
[1e-500, 10e-500]: the intended plot of the data could very well be a
pointillistic version of the Mona Lisa rather than a straight line.
> After all, after converting to plot precision it's
> going to be zero anyway.
As above, this conclusion relies on the dubious assumption that 1e-500 is
very much smaller than the other values.
> This way I could almost defend using strtod() for literals in
> Python source code (where it makes more sense to warn about underflow)
> but atof() for input. Except that of course input could conceivably
> be using eval()...
>
> Another argument for turning underflow into zero is that that also
> happens in regular arithmetic:
>
> >>> 0.1**2**8
> 1.0000000000000275e-256
> >>> 0.1**2**9
> 0.0
Which is often desired but sometimes a disaster -- the language simply can't
guess. On whatever machine you ran this on, it almost certainly set the
"underflow happened" flag but continued on because the underflow exception
was masked out by default.
> I like this uniform behavior: overflow -> exception, underflow ->
> zero. My calculator does this too.
Not mine . Really, whether underflow gripes is controlled by a
user-settable flag on high end HP calculators. Note too that neither does
float *overflow* raise an exception under most Pythons today:
D:\Python>python
Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 1e500
1.#INF
>>> 1e200**2
1.#INF
>>>
I personally favor raising exceptions (by default) on 754's overflow, divide
by 0, and invalid operation conditions, while (again by default) letting
underflow and inexact pass without comment. But it again requires fiddling
the HW's 754 control registers to make that happen. P3K, not now.
> Am I hopelessly naive about this?
Not *entirely* hopeless, but close . If we ever talk about it for an
hour, I'll convince you of the futility of fighting 754. They beat all
resistance out of me in a mere decade <0.5 wink>.
> What else can we do?
Not much! Switching uniformly to either atof() or strtod() would be OK by
me for now, although I don't think patching over the current inconsistency
buys enough bang for the buck to be worth the effort.
> What control does C give?
None, until C9X.
> What does sscanf() do?
I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
C's numerics fight the *right* thing to do now just about every step of the
way. C9x is supposed to fix all that.
In the meantime, I think what JPython does is much more interesting (but
don't know what that is): whatever we do here should be consistent with The
Other Python too, and Java has a much better 754 story than ANSI C. 754 is
here to stay, but the last iteration of ANSI C isn't. Best guess is that
Java acts more like atof than strtod in this case.
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Sat, 25 Mar 2000 14:15:54 -0500
> "In the face of ambiguity, refuse the temptation to guess".
>
> That's one of the Pythonic Theses you're tempted to ignore too often .
>
> Part of taking 754 seriously is that 754 gives the user complete control
> over what happens in case of exceptions (including underflow): ignore them,
> raise a fatal error, or simply set a flag saying it occurred.
> Unfortunately, we have to wait for C9x until there's a portable way to get
> at that stuff. Before then, it requires wildly varying platform-specific
> hair.
OK, so let's stick with the defaults that 754 presecribes until we can
give the user control. That's the purpose of defaults, right?
> > Hm, I'm not so sure. Suppose I'm writing a program that reads a data
> > files generated by some Fortran program. The Fortran program is
> > giving me points to plot for example. If Fortran manages to output
> > 1e-500, wouldn't it make more sense if I rounded that to zero instead
> > of rejecting it?
>
> This *may* make good sense if Python had certain knowledge that the program
> is merely going to plot the points, but probably not even then. That is,
> "insignificantly small" is relative to the application, and e.g. for all we
> know the Fortran program generated a million doubles *all* in the range
> [1e-500, 10e-500]: the intended plot of the data could very well be a
> pointillistic version of the Mona Lisa rather than a straight line.
OK, forget the example.
> > After all, after converting to plot precision it's
> > going to be zero anyway.
>
> As above, this conclusion relies on the dubious assumption that 1e-500 is
> very much smaller than the other values.
I think even 754 tells us that 1e-500 is smaller than what we normally
need to deal with.
> > This way I could almost defend using strtod() for literals in
> > Python source code (where it makes more sense to warn about underflow)
> > but atof() for input. Except that of course input could conceivably
> > be using eval()...
> >
> > Another argument for turning underflow into zero is that that also
> > happens in regular arithmetic:
> >
> > >>> 0.1**2**8
> > 1.0000000000000275e-256
> > >>> 0.1**2**9
> > 0.0
>
> Which is often desired but sometimes a disaster -- the language simply can't
> guess. On whatever machine you ran this on, it almost certainly set the
> "underflow happened" flag but continued on because the underflow exception
> was masked out by default.
Again: 754 gives a default. I want to conform to the default -- it's
better to provide control, but even when we provide control, there will
still be default behavior, and (if I understand 754 correctly) the
default is not to interrupt for underflow.
> > I like this uniform behavior: overflow -> exception, underflow ->
> > zero. My calculator does this too.
>
> Not mine . Really, whether underflow gripes is controlled by a
> user-settable flag on high end HP calculators. Note too that neither does
> float *overflow* raise an exception under most Pythons today:
>
> D:\Python>python
> Python 1.5.42 (#0, Jan 31 2000, 14:05:14) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> 1e500
> 1.#INF
> >>> 1e200**2
> 1.#INF
> >>>
Oops, you're right. Must be another 754 default behavior!
> I personally favor raising exceptions (by default) on 754's overflow, divide
> by 0, and invalid operation conditions, while (again by default) letting
> the HW's 754 control registers to make that happen. P3K, not now.
I would personally also prefer an exception for overflow. You don't
say what you want for underflow though. I still like silent underflow
to zero by default.
> > Am I hopelessly naive about this?
>
> Not *entirely* hopeless, but close . If we ever talk about it for an
> hour, I'll convince you of the futility of fighting 754. They beat all
> resistance out of me in a mere decade <0.5 wink>.
I'm not fighting it. Say the ideal Python has full user control over
fp exceptions. What should the defaults be? Python 1.6 should have
the same defaults, even if it doesn't have the controls.
> > What else can we do?
>
> Not much! Switching uniformly to either atof() or strtod() would be OK by
> me for now, although I don't think patching over the current inconsistency
> buys enough bang for the buck to be worth the effort.
>
> > What control does C give?
>
> None, until C9X.
>
> > What does sscanf() do?
>
> I don't care -- ANSI C predated 754's absolute universal triumph, and ANSI
> C's numerics fight the *right* thing to do now just about every step of the
> way. C9x is supposed to fix all that.
>
> In the meantime, I think what JPython does is much more interesting (but
> don't know what that is): whatever we do here should be consistent with The
> Other Python too, and Java has a much better 754 story than ANSI C. 754 is
> here to stay, but the last iteration of ANSI C isn't. Best guess is that
> Java acts more like atof than strtod in this case.
Bingo. Indeed it does. 1e500 prints as Infinity; 1e-500 is 0.0,
either as literal or when converted from a string.
I'll change float() to use atof().
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Jul-31 14:08
By: none
Comment:
From: "Tim Peters"
Subject: RE: [Python-bugs-list] float("1.0e-309") inconsistency on win32 (PR#245)
Date: Tue, 4 Apr 2000 00:29:01 -0400
[Guido]
> OK, so let's stick with the defaults that 754 presecribes until we can
> give the user control. That's the purpose of defaults, right?
In every world other 754 (see below), but we really have no choice now
(because C doesn't give us any control now).
> I think even 754 tells us that 1e-500 is smaller than what we normally
> need to deal with.
Well, there is no 1e-500 under 754, which is why there's some reason to at
least warn about it (if the user wanted 0, why didn't they type 0?).
> Again: 754 gives a default. I want to conform to the default -- it's
> better to provide control, but even when we provide control, there will
> still be default behavior, and (if I understand 754 correctly) the
> default is not to interrupt for underflow.
The 754 default is never to raise an exception no matter what, whether
overflow, underflow, invalid operation (like sqrt(-4)), or divide by 0. So
Python's current behavior wrt these two is non-conforming:
math.sqrt(-4)
1. / 0.
However, 754 is primarily a HW std, and the defaults were prescribed by a
committee of HW geeks and math library authors. They were caught totally
off guard by how long it took for languages to provide the control features
the std also mandates -- for "regular users" it's plainly insane to avoid
griping about the two above, and it was never 754's intent to let them pass
silently for regular users.
Note that Java has been skewered mercilessly by Kahan (Mr. 754 Himself) for
accepting the defaults but not providing the also-mandated control
functions. The std is subtler than it appears, and all the fiddly bits are
really needed.
>> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>> >>> 1e500
>> 1.#INF
>> >>> 1e200**2
>> 1.#INF
>> >>>
> Oops, you're right. Must be another 754 default behavior!
Right.
> I would personally also prefer an exception for overflow. You don't
> say what you want for underflow though. I still like silent underflow
> to zero by default.
754 defines (almost) everything: underflow when the underflow exception is
masked out must deliver a zero with the same sign as the infinite-precision
result.
> I'm not fighting it.
You will ; e.g., returning 1 for "x == x" is incorrect when x is a
NaN.
> Say the ideal Python has full user control over fp exceptions. What
> should the defaults be?
IMO, exception on overflow, divide-by-0 and invalid operation. Let
underflow and inexact pass silently. That's what I implemented at KSR, and
customers were *very* much happier with that than with the 754 defaults. Of
course I also implemented all the 754 control and status inquiry functions,
so the one 754-savvy programmer per site was happy too (they need the
control to write robust numerical libraries for everyone else to use -- the
*true* purpose of the 754 HW defaults).
> Python 1.6 should have the same defaults, even if it doesn't have the
> controls.
This is a big project, as there's no portable way even to detect fp overflow
now. The math libraries should play along too.
> I'll change float() to use atof().
OK by me!
-------------------------------------------------------
Date: 2000-Aug-03 05:43
By: twouters
Comment:
I *think* this one is fixed and closed. It looks like Guido promises to fix this, in any case, and it looks done.
-------------------------------------------------------
Date: 2000-Aug-10 11:48
By: gvanrossum
Comment:
No, it's not fixed, but it is platform dependent how it behaves.
The conclusion was that we should use atof() everywhere, and write a separate syntax checker (since atof() stops at the first invalid character).
I made a start at a syntax checker but then got distracted. Here's my code:
static char *
floatsyntax(char *s)
{
/* Check for valid floating point syntax:
space*
[sign]
(digit+ [period digit*] | period digit+)
[(e|E) [sign] digit+]
space*
*/
int digits, period;
while (isspace(*s))
s++;
if (*s == '+' || *s == '-')
s++;
digits = period = 0;
for (;;) {
if (isdigit(*s))
digits++;
else if (*s == '.') {
if (period)
return NULL;
period++;
}
else
break;
}
if (!digits)
return NULL;
if (*s == 'e' || *s == 'E') {
s++;
if (*s == '+' || *s == '-')
s++;
digits = 0;
while (isdigit(*s))
digits++;
if (!digits)
return NULL;
}
return s;
}
-------------------------------------------------------
Date: 2000-Aug-10 11:51
By: gvanrossum
Comment:
Shit. SF removes leading whitespace. Oh well, mail me for a properly formatted version of that code.
-------------------------------------------------------
Date: 2000-Aug-10 21:57
By: tim_one
Comment:
It's curious that in the change mail SF generated, leading indentation was *not* lost. This must be a browser display thing.
Anyway, by eyeball the syntax checker has two bugs:
1. Infinite loop when looking at an exponent.
x while (isdigit(*s)) digits++;
should be
x while (isdigit(*s)) {digits++; s++;)
2. Like atof, stops at an invalid character. Before the
x return s;
it should have, e.g.,
x while (ispace(*s)) ++s;
x if (*s) return NULL;
although I'm not sure what the assumptions are about the input to this function.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110624&group_id=5470
From noreply@sourceforge.net Fri Aug 11 12:38:27 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 04:38:27 -0700
Subject: [Python-bugs-list] [Bug #111667] unicode core dump
Message-ID: <200008111138.EAA19691@delerium.i.sourceforge.net>
Bug #111667, was updated on 2000-Aug-11 04:38
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: unicode core dump
Details: This two-liner faults inside PyUnicode_EncodeRawUnicodeEscape
>>> import cPickle
>>> cPickle.dumps(u'')
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111667&group_id=5470
From noreply@sourceforge.net Fri Aug 11 13:42:18 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 05:42:18 -0700
Subject: [Python-bugs-list] [Bug #111667] unicode core dump
Message-ID: <200008111242.FAA21852@delerium.i.sourceforge.net>
Bug #111667, was updated on 2000-Aug-11 04:38
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: unicode core dump
Details: This two-liner faults inside PyUnicode_EncodeRawUnicodeEscape
>>> import cPickle
>>> cPickle.dumps(u'')
Follow-Ups:
Date: 2000-Aug-11 05:42
By: lemburg
Comment:
On which platform do you get this seg fault ?
FYI, I can reproduce it on Linux, but the gdb stack
trace doesn't really show any hint as to what is
failing... could be a compiler optimization bug.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111667&group_id=5470
From noreply@sourceforge.net Fri Aug 11 14:39:18 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 06:39:18 -0700
Subject: [Python-bugs-list] [Bug #110833] linker options documentation (PR#195)
Message-ID: <200008111339.GAA23706@delerium.i.sourceforge.net>
Bug #110833, was updated on 2000-Aug-01 14:13
Here is a current snapshot of the bug.
Project: Python
Category: Documentation
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: linker options documentation (PR#195)
Details: Jitterbug-Id: 195
Submitted-By: John-Mark Gurney
Date: Sun, 30 Jan 2000 18:09:56 -0800
Version: None
OS: None
I have found out that I need to add -Xlinker -export-dynamic to the gcc
command to compile a program linked w/ the libpython.a library... if you
do not specify this option, all unreferenced symbols will be discarded...
please document this requirement in the documentation, and after that has
happened, close this bug report...
Thanks.
--
John-Mark Gurney Voice: +1 408 975 9651
Cu Networking
"The soul contains in itself the event that shall presently befall it.
The event is only the actualizing of its thought." -- Ralph Waldo Emerson
====================================================================
Audit trail:
Mon Feb 07 12:37:05 2000 guido changed notes
Mon Feb 07 12:37:05 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:13
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] please resolve 191.. (PR#195)
Date: Mon, 31 Jan 2000 12:25:49 -0500
> I have found out that I need to add -Xlinker -export-dynamic to the gcc
> command to compile a program linked w/ the libpython.a library... if you
> do not specify this option, all unreferenced symbols will be discarded...
>
> please document this requirement in the documentation, and after that has
> happened, close this bug report...
I read your bug report 191 and I think it may be platform specific, or
a bug in how you link with Python, since I cannot reproduce this here
on Solaris.
Until we are clear on this we can't fix the documentation, sorry.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:13
By: none
Comment:
From: John-Mark Gurney
Subject: Re: [Python-bugs-list] please resolve 191.. (PR#195)
Date: Mon, 31 Jan 2000 11:40:12 -0800
Guido van Rossum scribbled this message on Jan 31:
> > I have found out that I need to add -Xlinker -export-dynamic to the gcc
> > command to compile a program linked w/ the libpython.a library... if you
> > do not specify this option, all unreferenced symbols will be discarded...
> >
> > please document this requirement in the documentation, and after that has
> > happened, close this bug report...
>
> I read your bug report 191 and I think it may be platform specific, or
> a bug in how you link with Python, since I cannot reproduce this here
> on Solaris.
I would try it under Solaris, but I don't have the time right now to
compile up the latest GNU ld on solaris, to make sure that it is compiler
specific...
> Until we are clear on this we can't fix the documentation, sorry.
I would think that you would want to document such a behavior considering
just how many people happen to use gcc... I am using gcc 2.7.2.3 and GNU
ld 2.9.1, and considering the number of people that are using GNU ld 2.9.1,
I would assume you'd want to document it so that people like myself, don't
run into this problem...
the -Xlinker -export-dynamic happens to be a GNU ld specific solution,
but the bug that python doesn't force include all the symbols should be
documented so that people don't encounter the problem...
--
John-Mark Gurney Voice: +1 408 975 9651
Cu Networking
"The soul contains in itself the event that shall presently befall it.
The event is only the actualizing of its thought." -- Ralph Waldo Emerson
-------------------------------------------------------
Date: 2000-Aug-01 14:13
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] please resolve 191.. (PR#195)
Date: Mon, 31 Jan 2000 15:35:35 -0500
> Guido van Rossum scribbled this message on Jan 31:
> > > I have found out that I need to add -Xlinker -export-dynamic to the gcc
> > > command to compile a program linked w/ the libpython.a library... if you
> > > do not specify this option, all unreferenced symbols will be discarded...
> > >
> > > please document this requirement in the documentation, and after that has
> > > happened, close this bug report...
> >
> > I read your bug report 191 and I think it may be platform specific, or
> > a bug in how you link with Python, since I cannot reproduce this here
> > on Solaris.
>
> I would try it under Solaris, but I don't have the time right now to
> compile up the latest GNU ld on solaris, to make sure that it is compiler
> specific...
>
> > Until we are clear on this we can't fix the documentation, sorry.
>
> I would think that you would want to document such a behavior considering
> just how many people happen to use gcc... I am using gcc 2.7.2.3 and GNU
> ld 2.9.1, and considering the number of people that are using GNU ld 2.9.1,
> I would assume you'd want to document it so that people like myself, don't
> run into this problem...
>
> the -Xlinker -export-dynamic happens to be a GNU ld specific solution,
> but the bug that python doesn't force include all the symbols should be
> documented so that people don't encounter the problem...
This (that it's GNU ld specific) is information that you didn't
explain first. I am probably not using GNU ld, which may explain why
I couldn't reproduce your problem.
If you want to save me the most time, please suggest the exact patch
for the documentation, using the latest version of the docs from the
CVS tree. (python.org/download/cvs.html)
To save me at least some time, write a paragraph of text and give me
at least a hint on which section of which document it should be
inserted into, and we'll figure it out from there.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:13
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] please resolve 191.. (PR#195)
Date: Mon, 07 Feb 2000 12:55:20 -0500
> the -Xlinker -export-dynamic happens to be a GNU ld specific solution,
> but the bug that python doesn't force include all the symbols should be
> documented so that people don't encounter the problem...
There's a Solaris-specific patch (just checked in a few days ago) to
configure.in that takes care of this; maybe it can be made general?
No time to explain, see latest configure.in cvs log.
python.org/download/cvs.html
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:13
By: none
Comment:
Still waiting for a patch...
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110833&group_id=5470
From noreply@sourceforge.net Fri Aug 11 14:49:32 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 06:49:32 -0700
Subject: [Python-bugs-list] [Bug #110639] test_fork1 hangs with 1.6a2 on Linux (PR#296)
Message-ID: <200008111349.GAA24092@delerium.i.sourceforge.net>
Bug #110639, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 7
Summary: test_fork1 hangs with 1.6a2 on Linux (PR#296)
Details: Jitterbug-Id: 296
Submitted-By: oli@andrich.net
Date: Thu, 13 Apr 2000 15:18:07 -0400 (EDT)
Version: 1.6a2
OS: Linux Mandrake 2.2.14-mdksmp
Hi,
I am currently evaluating Python 1.6 on my machine in order to be
uptodate with the Linux distribution as soon as 1.6 final is released.
The testsuite runs fine, just one test fails completely. test_fork1
When I run the test, it sometimes runs really fine (very seldom). Most of
the time it hangs and uses nearly 100% of CPU time. The loop in the child
prozess is completed successfully. n is 0 as it ought to be. But the
os.waitpid call hangs for an indefinete time. This is strange,
cause I can't reproduce this in an equivalent c code snippet. And without
creation of the threads it works really fine and doesn't hang at all.
Any idea? I am running a 2.2.14 Linux on a SMP machine (non SMP machine show
the same behaviour). glibc 2.1.3.
Bye, Oliver
====================================================================
Audit trail:
Thu Apr 13 15:55:33 2000 fdrake sent reply 1
Thu Apr 13 15:55:45 2000 fdrake moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:09
By: none
Comment:
From: Fred L. Drake, Jr.
Subject: Re: test_fork1 hangs with 1.6a2 on Linux (PR#296)
Date: Thu Apr 13 15:55:33 2000
Oliver,
We're aware of it, but haven't figured out the exact problem yet. If you can
provide additional information on the observed behavior, that would be good. I
get three different behaviors on a Mandrake 7.1 SMP machine: works, segfaults,
and blocks. I'm suspecting a pthread implementation problem, but haven't had
enough time to really dig into it sufficiently to be sure.
-Fred
-------------------------------------------------------
Date: 2000-Jul-31 14:09
By: none
Comment:
From: Oliver Andrich
Subject: Re: test_fork1 hangs with 1.6a2 on Linux (PR#296)
Date: Thu, 13 Apr 2000 22:26:08 +0200
Hi,
well what I have discovered so far is.
- Normal optimizations for Mandrake packages results in a sure segfault.
- Normal python optimizations (jst calling make) causes hangs sometimes
works.
A look at ps ax shows, that there exist 6 active python "processes" (the
parent process and 5 threads) and one defunct python process (the child). So
thet child terminates correctly as I already mentioned. But the os.waitpid
doesn't discover that the child has already exited.
Things I will to tonight:
- write a complete cversion of the testcode
- compile python against another thread library
- compile python against the most recent glibc snapshot
- compile python on a RedHat 6.1 system
Hopefully I get some more insights. Sadly, I am not good at c debugging, as I
am a Python code by choice and a C coder who has written his last C code five
years ago (a really program not just a Python extension ;-).
Best regards,
Oliver
On Thu, Apr 13, 2000 at 03:55:34PM -0400, Fred@python.org wrote:
> Oliver,
> We're aware of it, but haven't figured out the exact problem yet. If you can
> provide additional information on the observed behavior, that would be good. I
> get three different behaviors on a Mandrake 7.1 SMP machine: works, segfaults,
> and blocks. I'm suspecting a pthread implementation problem, but haven't had
> enough time to really dig into it sufficiently to be sure.
>
>
> -Fred
-------------------------------------------------------
Date: 2000-Jul-31 14:09
By: none
Comment:
From: Oliver Andrich
Subject: Re: test_fork1 hangs with 1.6a2 on Linux (PR#296)
Date: Thu, 13 Apr 2000 23:38:08 +0200
Hi,
I just checked the following to things. I patched the threading to work with
GNU pth and get the same results. When I run the test script with Python 1.5.2
on the same machine, that means same glibc and so on, it works fine. I
compared the threading code of Python 1.5.2 and 1.6.a2 and it doesn't seem to
differ at all. Same for the posixcode as far it is relevant for the test.
I am a little bit irritated by this.
Best regards,
Oliver
On Thu, Apr 13, 2000 at 03:55:34PM -0400, Fred@python.org wrote:
> Oliver,
> We're aware of it, but haven't figured out the exact problem yet. If you can
> provide additional information on the observed behavior, that would be good. I
> get three different behaviors on a Mandrake 7.1 SMP machine: works, segfaults,
> and blocks. I'm suspecting a pthread implementation problem, but haven't had
> enough time to really dig into it sufficiently to be sure.
>
>
> -Fred
-------------------------------------------------------
Date: 2000-Aug-11 06:49
By: fdrake
Comment:
I do not currently have ready access to an SMP machine, so I can't tell if this is fixed or not. I cannot reproduce this using a uniprocessor running Mandrake 7.1 (kernel 2.2.15-4mdk).
This bug may also be related to the use of the GNU Pth pthreads implementation; we should find out which threading library was being used.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110639&group_id=5470
From noreply@sourceforge.net Fri Aug 11 14:59:45 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 06:59:45 -0700
Subject: [Python-bugs-list] [Bug #110613] makesetup support for RPATH (PR#202)
Message-ID: <200008111359.GAA24446@delerium.i.sourceforge.net>
Bug #110613, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Build
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: makesetup support for RPATH (PR#202)
Details: Jitterbug-Id: 202
Submitted-By: aa8vb@yahoo.com
Date: Fri, 11 Feb 2000 07:12:28 -0500 (EST)
Version: 1.5.2
OS: IRIX 6.5
Recently tried to rebuild Python, adding in gdbm. This Setup line is
new for this build:
gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib32 -rpath
/usr/local/lib32 -lgdbm
The problem is, 1.5.2's makesetup doesn't take RPATH directives, reporting
-rpath as a "bad word". Note that RPATH directives take different forms
on different OSs: -rpath on SGI IRIX is -R on Solaris, --rpath on FreeBSD,
etc.
A provision should be made for RPATH options as they are used to avoid the
need for LD_LIBRARY_PATH hacks.
--- Makefiles ---
bad word -rpath in gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib32
-rpath /usr/local/lib32 -lgdbm
*** Error code 1
Thanks,
Randall
====================================================================
Audit trail:
Wed Feb 23 21:30:21 2000 guido changed notes
Wed Feb 23 21:30:21 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-02 23:10
By: fdrake
Comment:
The current CVS version of makesetup appears to handle -rpath and -R, but not --rpath. Is neither of the alternatives sufficient for FreeBSD?
-------------------------------------------------------
Date: 2000-Aug-11 06:59
By: fdrake
Comment:
-R and -rpath are supported; --rpath support is added in Modules/makesetup revision 1.27.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110613&group_id=5470
From noreply@sourceforge.net Fri Aug 11 15:23:36 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 07:23:36 -0700
Subject: [Python-bugs-list] [Bug #111620] lots of use of send() without verifying amount of data sent.
Message-ID: <200008111423.HAA25334@delerium.i.sourceforge.net>
Bug #111620, was updated on 2000-Aug-10 16:39
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: lots of use of send() without verifying amount of data sent.
Details: a quick grep of the standard python library (below) shows that there
is lots of unchecked use of the send() function. Every unix system I've every used states that send() returns the number of bytes sent, which can be < length(). Using socket.send(s) without verifying that the return value is equal to the length of s is careless and can result in loss of data.
I just submitted a patch for smtplib's use of send(), have patched a piece of Zope the same way, and get the feeling that it's becoming standard to call send() without checking
that the amount of data sent is the intended amount. While this is OK for a quick script, I don't feel it's OK for library code or anything that might be used in production.
scott
Follow-Ups:
Date: 2000-Aug-11 07:23
By: twouters
Comment:
As Guido and Fred pointed out on python-dev, you are confusing 'send()' with 'write()'. 'send()' either returns an error code (when the message is too large) or succeeds. It doesn't do half-writes.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111620&group_id=5470
From noreply@sourceforge.net Fri Aug 11 15:48:54 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 07:48:54 -0700
Subject: [Python-bugs-list] [Bug #111620] lots of use of send() without verifying amount of data sent.
Message-ID: <200008111448.HAA11029@bush.i.sourceforge.net>
Bug #111620, was updated on 2000-Aug-10 16:39
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Closed
Resolution: Wont Fix
Bug Group: None
Priority: 5
Summary: lots of use of send() without verifying amount of data sent.
Details: a quick grep of the standard python library (below) shows that there
is lots of unchecked use of the send() function. Every unix system I've every used states that send() returns the number of bytes sent, which can be < length(). Using socket.send(s) without verifying that the return value is equal to the length of s is careless and can result in loss of data.
I just submitted a patch for smtplib's use of send(), have patched a piece of Zope the same way, and get the feeling that it's becoming standard to call send() without checking
that the amount of data sent is the intended amount. While this is OK for a quick script, I don't feel it's OK for library code or anything that might be used in production.
scott
Follow-Ups:
Date: 2000-Aug-11 07:23
By: twouters
Comment:
As Guido and Fred pointed out on python-dev, you are confusing 'send()' with 'write()'. 'send()' either returns an error code (when the message is too large) or succeeds. It doesn't do half-writes.
-------------------------------------------------------
Date: 2000-Aug-11 07:48
By: gvanrossum
Comment:
(And I'm not so sure that write() can do partial writes either!)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111620&group_id=5470
From noreply@sourceforge.net Fri Aug 11 17:37:29 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 09:37:29 -0700
Subject: [Python-bugs-list] [Bug #111690] Bug: dictionary with >= 8192 keys not initialized correctly
Message-ID: <200008111637.JAA14728@bush.i.sourceforge.net>
Bug #111690, was updated on 2000-Aug-11 09:37
Here is a current snapshot of the bug.
Project: Python
Category: Parser/Compiler
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Bug: dictionary with >= 8192 keys not initialized correctly
Details: Original posting to comp.lang.python:
Save this to a file dictbug.py:
print 'd1 = {'
for i in xrange(8191):
print str(i) + ': None,'
print '}'
print 'd2 = {'
for i in xrange(8192):
print str(i) + ': None,'
print '}'
print 'print len(d1)'
print 'print len(d2)'
Then run:
python dictbug.py > tmp.py
python tmp.py
The output is:
8191
0
I tested this with:
Python 1.5.2 (#1, Apr 28 2000, 11:50:55) [C] on osf1V5
Python 1.6b1 (#1, Aug 4 2000, 22:34:57) [C] on osf1V5
Python 1.5.2 (#1, Sep 17 1999, 20:15:36) [GCC egcs-2.91.66
19990314/Linux (egcs- on linux-i386
If a dictionary is generated dynamically, e.g. by adding keys
in a loop, there is no problem if there are >= 8192 keys.
If there is an inherent problem with large dictionaries, it would be good if Python could at least raise an exception, e.g. SystemError.
Ralf
A reply to that posting:
That's strange. I get a SyntaxError because the limit of
subnodes for an expression was set to 8192:
Python 2.0b1 (#2, Aug 7 2000, 10:06:00) [GCC 2.95.2 19991024
(release)] on linux2
File "dumm3.py", line 16386
8191: None,
^
SyntaxError: expression too long
But then this probably was fixed after the 1.6b1 fork ...
You should submit this to the bug tracker at sourceforge:
http://sourceforge.net/bugs/?group_id=5470
Peter
--
Peter Schneider-Kamp ++47-7388-7331
Herman Krags veg 51-11 mailto:peter@schneider-kamp.de
N-7050 Trondheim http://schneider-kamp.de
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111690&group_id=5470
From special@buoinet.net Fri Aug 11 17:39:48 2000
From: special@buoinet.net (special@buoinet.net)
Date: Fri, 11 Aug 2000 12:39:48 -0400 (EDT)
Subject: [Python-bugs-list] $9.95/ mo web hosting (PR#428)
Message-ID: <20000811163948.A71601D213@dinsdale.python.org>
Sir:
I noticed your website and am simply offering you what could be a much better
deal on your web hosting... If you think you might be interested, go to our
site:
http://www.buoinet.net
see what we have to offer... Our hosting plans start at $9.95... Thanks again
for your time - you wont be getting any more email from us unless
you email us requesting more information. If you represent a web design firm,
we offer bulk discounting as well.
Very Truly Yours
-Mike Carlson
www.buoinet.net
This message is sent in compliance of the new e-mail bill: SECTION 301. Per Section
301, Paragraph (a)(2)(C) of S. 1618, http://www.senate.gov/~murkowski/commercialemail/S771index.html
Further transmissions to you by the sender of this email may be stopped at no
cost to you by sending a reply to this email address with the word "remove" in
the subject line.
From noreply@sourceforge.net Fri Aug 11 20:19:02 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 12:19:02 -0700
Subject: [Python-bugs-list] [Bug #111705] problems with re.py and regex.py
Message-ID: <200008111919.MAA03524@delerium.i.sourceforge.net>
Bug #111705, was updated on 2000-Aug-11 12:19
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: problems with re.py and regex.py
Details: Hi, here is something I have been working on for quite some time. I always thought it was my regex syntax, but I was incorrect. I tried it in perl, and php, and both worked fine.
re.py has a problem with ([_a-zA-Z0-9-]\.*) where it hangs during compilation.
regex.py has a problem with ([a-zA-Z]){2,3} (or any other similar statement) where it does not limit the number of characters properly.
Here is the code
...
import string
import sys
import regex
def testemailaddr(emailaddr):
pattern = regex.compile('^([_a-zA-Z0-9-]\.*){3,255}@([_a-zA-Z0-9-]\.*){3,255}\.([a-zA-Z]){2,3}$')
if pattern.match(emailaddr) != None:
valid = [1, emailaddr]
else:
valid = [0, emailaddr]
return valid
validemail = testemailaddr(sys.argv[1])
if validemail[0] == 1: print validemail[1], "is valid."
else: print validemail[1], "is not valid."
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111705&group_id=5470
From noreply@sourceforge.net Fri Aug 11 21:25:46 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 13:25:46 -0700
Subject: [Python-bugs-list] [Bug #111710] socket.send() can do partial writes on some systems.
Message-ID: <200008112025.NAA22581@bush.i.sourceforge.net>
Bug #111710, was updated on 2000-Aug-11 13:25
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: socket.send() can do partial writes on some systems.
Details: 0811 15:57 chronis:~% uname -a
FreeBSD chronis.pobox.com 4.0-STABLE FreeBSD 4.0-STABLE #0: Tue Mar 21 01:05:14 EST 2000 root@chronis.pobox.com:/usr/src/sys/compile/MYBSD i386
0811 15:57 chronis:~%
0811 15:57 chronis:~% cat scratch/sendtstsrv.py
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind("chronis.pobox.com", 8010)
while 1:
s.listen(1)
conn, addr = s.accept()
print "connected from", addr
while 1:
data = conn.recv(1024)
if not data: break
print "done"
conn.close()
0811 15:58 chronis:~% python scratch/sendtstsrv.py &
[2] 76562
0811 15:58 chronis:~% cat scratch/sendtst.py
#!/usr/bin/env python
s = "0" * 10000000
import socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect("chronis.pobox.com", 8010)
sent = sock.send(s)
if sent != len(s):
print "sent %d/%d chars" % (sent, len(s))
else:
print "sent all chars"
0811 15:58 chronis:~% python !$
python scratch/sendtst.py
connected from ('208.210.124.49', 1258)
sent 17520/10000000 chars
done
0811 15:58 chronis:~%
NOTE: there is nothing in any man page for send() under linux (RH 6.1), Solaris (SunOS 5.5.1), OSF1 V4.0, or FreeBSD{3,4} that states that send() must not perform a
partial write, though of those systems, it only seems
to reproducibly do partial writes under FreeBSD4.0 Stable.
Additionally, W.Richard Stevens' Unix Network Programming Vol 1, second edition states that """
A read or write on a stream socket might input or output fewer bytes than requested, but this is not an error condition.""" (page 77). Later, Stevens says of send() and recv() "These two functions are similar to the standard read and write functions, but one additional argument is required". (page 354).
scott
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111710&group_id=5470
From noreply@sourceforge.net Fri Aug 11 23:30:02 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Fri, 11 Aug 2000 15:30:02 -0700
Subject: [Python-bugs-list] [Bug #111725] Response to bug 110619
Message-ID: <200008112230.PAA10193@delerium.i.sourceforge.net>
Bug #111725, was updated on 2000-Aug-11 15:30
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: Response to bug 110619
Details: It probably should be documented somewhere that for urllib, proxies will not work in the environment variable http_proxy
The code looks at http://usr:pwd@com:8080 and parses the pwd@com:8080 as a port number and fails. It also ignores the proxy details here. If the proxy details are put into the url, as argument to urlopen, they still don't work, although they are parsed correctly. I'm behind a firewall and this bugged me for some time, as I always received a http error code of 407. Afyter some research of the protocol, etc. I finally resolved it by modifying urllib in the open_http method and changed the line:
if auth: h.putheader('Authorization',...
to
if auth: h.putheader('Proxy-Authorization',...
and it worked! Needless to say, whatever aspect of the http protocol requires this to be 'Authorization' will of course now fail for my version of urllib, but at least the proxy part functions correctly. Sorry I can't give any better details as I am not an http guru, just fumbling along!
Hope this helps.
Cheers,
Perry Faulkner
(Perry.Faulkner@macquarie.com.au)
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111725&group_id=5470
From noreply@sourceforge.net Sun Aug 13 09:36:40 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 01:36:40 -0700
Subject: [Python-bugs-list] [Bug #110832] urljoin() bug with odd no of '..' (PR#194)
Message-ID: <200008130836.BAA03467@delerium.i.sourceforge.net>
Bug #110832, was updated on 2000-Aug-01 14:13
Here is a current snapshot of the bug.
Project: Python
Category: None
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 6
Summary: urljoin() bug with odd no of '..' (PR#194)
Details: Jitterbug-Id: 194
Submitted-By: DrMalte@ddd.de
Date: Sun, 30 Jan 2000 19:40:45 -0500 (EST)
Version: 1.5.2 and 1.4
OS: Linux
While playing with linbot I noticed some failed requests to
'http://xxx.xxx.xx/../img/xxx.gif'
for a document in the root directory containing
.
The Reason is in urlparse.urljoin()
urljoin() fails to remove an odd number of '../' from the path.
Demonstration:
from urlparse import urljoin
print urljoin( 'http://127.0.0.1/', '../imgs/logo.gif' )
# gives 'http://127.0.0.1/../imgs/logo.gif'
# should give 'http://127.0.0.1/imgs/logo.gif'
print urljoin( 'http://127.0.0.1/', '../../imgs/logo.gif' )
# gives 'http://127.0.0.1/imgs/logo.gif'
# works
# '../../imgs/logo.gif' gives 'http://127.0.0.1/../imgs/logo.gif' and so on
The patch for 1.5.2
( I'm not sure if it works generally, but tests with linbot looked good)
*** /usr/local/lib/python1.5/urlparse.py Sat Jun 26 19:11:59 1999
--- urlparse.py Mon Jan 31 01:31:45 2000
***************
*** 170,175 ****
--- 170,180 ----
segments[-1] = ''
elif len(segments) >= 2 and segments[-1] == '..':
segments[-2:] = ['']
+
+ if segments[0] == '':
+ while segments[1] == '..': # remove all leading '..'
+ del segments[1]
+
return urlunparse((scheme, netloc, joinfields(segments, '/'),
params, query, fragment))
====================================================================
Audit trail:
Mon Feb 07 12:35:35 2000 guido changed notes
Mon Feb 07 12:35:35 2000 guido moved from incoming to request
Follow-Ups:
Date: 2000-Aug-01 14:13
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] urljoin() bug with odd no of '..' (PR#194)
Date: Mon, 31 Jan 2000 12:28:55 -0500
Thanks for your bug report and fix. I agree with your diagnosis.
Would you please be so kind as to resend your patch with the
legal disclaimer from
http://www.python.org/1.5/bugrelease.html
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:13
By: none
Comment:
Patch being considered.
-------------------------------------------------------
Date: 2000-Aug-13 01:36
By: moshez
Comment:
OK, Jeremy -- this one is yours. Either notabug it, or check in the relevant patch (101064 -- assigned to you)
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110832&group_id=5470
From noreply@sourceforge.net Sun Aug 13 18:05:49 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 10:05:49 -0700
Subject: [Python-bugs-list] [Bug #111802] anydbm cannot verify shelve database type
Message-ID: <200008131705.KAA20495@delerium.i.sourceforge.net>
Bug #111802, was updated on 2000-Aug-13 10:05
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Trash
Priority: 5
Summary: anydbm cannot verify shelve database type
Details: When opening an existing "shelve" database file. An exception is raised from anydbm saying "the database type could not be determined".
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111802&group_id=5470
From Dan@Grassi.org Sun Aug 13 22:20:40 2000
From: Dan@Grassi.org (Dan@Grassi.org)
Date: Sun, 13 Aug 2000 17:20:40 -0400 (EDT)
Subject: [Python-bugs-list] IDLE (PR#429)
Message-ID: <20000813212040.1BE0B1CD71@dinsdale.python.org>
Full_Name: Daniel Grassi
Version: 1.5.2
OS: Linux
Submission from: adsl-78-192-232.mia.bellsouth.net (216.78.192.232)
IDLE would be _much_ more usefull is some/any installation instructions were
provided! Yeah, they are no fun to write but what's the point of writing the
code if it can't be installed and if it can't be installed it can't be USED!
Hey, saying: "Here's a tarball" just doesn't cut it.
Dan
From noreply@sourceforge.net Mon Aug 14 01:25:35 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 17:25:35 -0700
Subject: [Python-bugs-list] [Bug #111818] .../test/test_fork1 hangs
Message-ID: <200008140025.RAA18964@bush.i.sourceforge.net>
Bug #111818, was updated on 2000-Aug-13 17:25
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: .../test/test_fork1 hangs
Details: .../test/test_fork1 never terminates on
Python1.6b1 which runs on RedHat Linux:
uname -a gives
Linux pclab55.research.bell-labs.com 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 unknown
gcc 2.91.66 OPT set to -O -g (also with -O2 -g)
configuration is --with-thread --prefix=/u/gpkdata/Linux
An identically compuled system (except gcc 2.95.1 )
on Solaris 2.6 operates properly.
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111818&group_id=5470
From success@tfnisp.com Mon Aug 14 01:28:29 2000
From: success@tfnisp.com (success@tfnisp.com)
Date: Sun, 13 Aug 2000 20:28:29 -0400 (EDT)
Subject: [Python-bugs-list] Your Boat has arrived! (PR#430)
Message-ID: <20000814002829.221AB1CD18@dinsdale.python.org>
Thousands of people around the country have found Financial
Relief by building their very own Home Based Business right out of their
living rooms without spending a dime.
The Company is called The Free Network and they are giving people across the
country their very own businesses for FREE!! That's right for FREE!! There is
no catch. No commitments.
The Free Network understands that life today is not easy. They also know
that many people want their own businesses but lack the resources to do so.
They have solved the problem for you. All you need to do is take advantage
of it. You can own your own Internet Company, Paging Company, Long Distance
Company, Wireless Company or your own Virtuall Mall, ALL FOR FREE!!
You are invited to review an opportunity that is
changing the pace of online business...and it's FREE!
How would you like to get paid every time someone
visits your online mall and makes a purchase...and
we'll give you your own online mall for FREE!
View an online presentation now!
http://dev.www.earnware.com/createweb/buzz/
To find out more information or to speak to a live person email your name
and number and we will get back to you. At the Free Network, We want you to
succeed! Our reputation is on the line.
Visit our Website and take a look for yourself.
http://www.thefreenetwork.com/summit
Remember, this offer is FREE!
Please accept our deepest apologies, if you received
this email unsolicited, and you can be removed
automatically below.
***********
All REMOVE requests AUTOMATICALLY honored upon
receipt.
mailto:sszewczuk@tfnmail.com/?subject=REMOVE
From noreply@sourceforge.net Mon Aug 14 03:50:58 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 19:50:58 -0700
Subject: [Python-bugs-list] [Bug #111520] Some "Very High Level" functions aren't
Message-ID: <200008140250.TAA23531@bush.i.sourceforge.net>
Bug #111520, was updated on 2000-Aug-09 14:22
Here is a current snapshot of the bug.
Project: Python
Category: Documentation
Status: Closed
Resolution: Fixed
Bug Group: None
Priority: 5
Summary: Some "Very High Level" functions aren't
Details: The so-called "Very High Level" functions in the Python C API that take FILE * arguments will not work in a multi-compiler environment; each compiler's notion of a struct FILE will be different. From an implementation standpoint these are very _low_ level functions.
The Python documentation for these functions, and the "Extending and embedding" documentation, should make note of this potential problem.
BTW, there are situations in which a compiler other than the compiler used to compile Python will be used. Please don't try to make this bug go away by requiring the same compiler be used as was used to compile Python.
Edward
Follow-Ups:
Date: 2000-Aug-13 19:50
By: fdrake
Comment:
Added advisory material in Doc/api/api.tex revision 1.77.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=111520&group_id=5470
From noreply@sourceforge.net Mon Aug 14 05:13:43 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 21:13:43 -0700
Subject: [Python-bugs-list] [Bug #110638] Invalid use of PyMem_DEL (PR#295)
Message-ID: <200008140413.VAA26228@bush.i.sourceforge.net>
Bug #110638, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 6
Summary: Invalid use of PyMem_DEL (PR#295)
Details: Jitterbug-Id: 295
Submitted-By: niels@endea.demon.nl
Date: Thu, 13 Apr 2000 14:16:25 -0400 (EDT)
Version: 1.5.2 and 1.6.a2
OS: Win95 and Linux
Hi,
I ran into a bug while running a regrtest on 1.6a2 with debugging on.
This produced a reference checking problem, which I now see is the same as
reported in #113. I have tracked this down to the use of PyMem_DEL on an
object created by PyObject_NEW in PyPcre_compile. When the compile fails,
the new object is deallocated, but not removed from the reference chain.
This also happens in 1.5.2.
With a little grepping, I tracked down a few instances of this
problem:
pcremodule.c:PyPcre_compile
unicodeobject.c:_PyUnicode_New
socketmodule.c:newSSLObject
threadmodule.c:newlockobject
In each case a partially constructed, but already registered object is
simply deleted without calling _Py_ForgetReference.
====================================================================
Audit trail:
Tue Jul 11 08:29:17 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110638&group_id=5470
From noreply@sourceforge.net Mon Aug 14 05:22:40 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 21:22:40 -0700
Subject: [Python-bugs-list] [Bug #110855] test_array.py fails (PR#143)
Message-ID: <200008140422.VAA26528@bush.i.sourceforge.net>
Bug #110855, was updated on 2000-Aug-01 14:37
Here is a current snapshot of the bug.
Project: Python
Category: Modules
Status: Open
Resolution: None
Bug Group: Irreproducible
Priority: 5
Summary: test_array.py fails (PR#143)
Details: Jitterbug-Id: 143
Submitted-By: ellement@sdd.hp.com
Date: Thu, 2 Dec 1999 14:04:38 -0500 (EST)
Version: 1.5.2
OS: HP-UX 10.20
After building python, 'make test' fails when test_array is run:
> python Lib/test/test_array.py
Traceback (innermost last):
File "Lib/test/test_array.py", line 85, in ?
main()
File "Lib/test/test_array.py", line 10, in main
testtype('c', 'c')
File "Lib/test/test_array.py", line 21, in testtype
a.append(example)
AttributeError: '' object has no attribute 'append'
Memory fault(coredump)
How do I go about debugging this?
====================================================================
Audit trail:
Fri Dec 03 10:38:53 1999 guido changed notes
Fri Dec 03 10:38:53 1999 guido moved from incoming to irreproducible
Follow-Ups:
Date: 2000-Aug-01 14:37
By: none
Comment:
From: Guido van Rossum
Subject: Re: [Python-bugs-list] test_array.py fails (PR#143)
Date: Thu, 02 Dec 1999 14:07:32 -0500
> Full_Name: David Ellement
> Version: 1.5.2
> OS: HP-UX 10.20
> Submission from: sanrel1.sdd.hp.com (192.6.114.30)
>
>
> After building python, 'make test' fails when test_array is run:
>
> > python Lib/test/test_array.py
> Traceback (innermost last):
> File "Lib/test/test_array.py", line 85, in ?
> main()
> File "Lib/test/test_array.py", line 10, in main
> testtype('c', 'c')
> File "Lib/test/test_array.py", line 21, in testtype
> a.append(example)
> AttributeError: '' object has no attribute 'append'
> Memory fault(coredump)
>
>
> How do I go about debugging this?
Seems like a pretty serious problem in your build. Use a debugger
(e.g. gdb). The bugs list is not the forum to discuss this, since the
bug is likely in your installation and not in Python. Try
comp.lang.python for help.
--Guido van Rossum (home page: http://www.python.org/~guido/)
-------------------------------------------------------
Date: 2000-Aug-01 14:37
By: none
Comment:
Build problems?
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110855&group_id=5470
From noreply@sourceforge.net Mon Aug 14 07:22:52 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 23:22:52 -0700
Subject: [Python-bugs-list] [Bug #110673] os.abspatth() error due to win32api.GetFullPathName (PR#380)
Message-ID: <200008140622.XAA30506@bush.i.sourceforge.net>
Bug #110673, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Closed
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Summary: os.abspatth() error due to win32api.GetFullPathName (PR#380)
Details: Jitterbug-Id: 380
Submitted-By: 2jerry@writeme.com
Date: Mon, 3 Jul 2000 17:14:02 -0400 (EDT)
Version: 1.5.2 (win32api build 129)
OS: pc win98
next to code:
full_path_lst = map(os.path.abspath, sys.path)
according to that sys.path include the source directory at the first place of
sys.path.
I noticed that if I call the module in its own directory (python -i module.py)
the first item of sys.path is ''.
That all ok: abspath function in os module call getcwd() function if path is
Null.
...
good day for UNIX like men (as me :))
...
but in NT or WIN 98 workstation:
os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
and
win32api.GetFullPathName('') return '' and not current directory.
Maybe is it a functionality .. but is os-depend functionality available for a
longtime ?
Jerome.vacher alias Jerry the foolish dracomorpheus.
====================================================================
Audit trail:
Tue Jul 11 08:24:22 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 16:19:30 +1000
Can anyone else here confirm that:
a) os.abspath('') on Linux does indeed return the CWD.
b) It is supposed to :-)
If confirmed, this would be a bug in ntpath.py. It catches win32api
exceptions, and returns the input name in that case. This would be
triggered by:
>>> win32api.GetFullPathName('')
Traceback (most recent call last):
File "", line 1, in ?
pywintypes.api_error: (127, 'GetFullPathName', 'The specified procedure
could not be found.')
Is this indeed something we should fix?
Mark.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> 2jerry@writeme.com
> Sent: Tuesday, 4 July 2000 7:14 AM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] win32api.GetFullPathName (build 129)
> (PR#380)
>
>
> Full_Name: Jerome VACHER
> Version: 1.5.2 (win32api build 129)
> OS: pc win98
> Submission from: ppp-55.dialup-166.worldonline.fr (212.83.166.55)
>
>
> next to code:
> full_path_lst = map(os.path.abspath, sys.path)
>
> according to that sys.path include the source directory at the
> first place of
> sys.path.
>
> I noticed that if I call the module in its own directory (python
> -i module.py)
> the first item of sys.path is ''.
> That all ok: abspath function in os module call getcwd()
> function if path is
> Null.
> ...
> good day for UNIX like men (as me :))
> ...
> but in NT or WIN 98 workstation:
> os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
> and
> win32api.GetFullPathName('') return '' and not current directory.
>
> Maybe is it a functionality .. but is os-depend functionality
> available for a
> longtime ?
>
> Jerome.vacher alias Jerry the foolish dracomorpheus.
>
>
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Fred L. Drake, Jr."
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 13:34:24 -0400 (EDT)
Mark Hammond writes:
> Can anyone else here confirm that:
>
> a) os.abspath('') on Linux does indeed return the CWD.
Yes, that's right.
> b) It is supposed to :-)
I think that's the right thing to do.
-Fred
--
Fred L. Drake, Jr.
BeOpen PythonLabs Team Member
-------------------------------------------------------
Date: 2000-Aug-06 13:56
By: twouters
Comment:
Possibly already fixed, or at least Mark has looked at it :)
-------------------------------------------------------
Date: 2000-Aug-06 15:55
By: mhammond
Comment:
This is not a bug in win32api.GetFullPathName(), but rather the use of GetFullPathName() to implement os.abspath(). Bug summary changed accordingly. Confirmed as a bug, and I will fix it!
-------------------------------------------------------
Date: 2000-Aug-13 23:22
By: mhammond
Comment:
ntpath.py and test_ntpath.py checked in with the fix!
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110673&group_id=5470
From noreply@sourceforge.net Mon Aug 14 07:22:10 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 23:22:10 -0700
Subject: [Python-bugs-list] [Bug #110673] os.abspatth() error due to win32api.GetFullPathName (PR#380)
Message-ID: <200008140622.XAA30491@bush.i.sourceforge.net>
Bug #110673, was updated on 2000-Jul-31 14:12
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Summary: os.abspatth() error due to win32api.GetFullPathName (PR#380)
Details: Jitterbug-Id: 380
Submitted-By: 2jerry@writeme.com
Date: Mon, 3 Jul 2000 17:14:02 -0400 (EDT)
Version: 1.5.2 (win32api build 129)
OS: pc win98
next to code:
full_path_lst = map(os.path.abspath, sys.path)
according to that sys.path include the source directory at the first place of
sys.path.
I noticed that if I call the module in its own directory (python -i module.py)
the first item of sys.path is ''.
That all ok: abspath function in os module call getcwd() function if path is
Null.
...
good day for UNIX like men (as me :))
...
but in NT or WIN 98 workstation:
os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
and
win32api.GetFullPathName('') return '' and not current directory.
Maybe is it a functionality .. but is os-depend functionality available for a
longtime ?
Jerome.vacher alias Jerry the foolish dracomorpheus.
====================================================================
Audit trail:
Tue Jul 11 08:24:22 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Mark Hammond"
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 16:19:30 +1000
Can anyone else here confirm that:
a) os.abspath('') on Linux does indeed return the CWD.
b) It is supposed to :-)
If confirmed, this would be a bug in ntpath.py. It catches win32api
exceptions, and returns the input name in that case. This would be
triggered by:
>>> win32api.GetFullPathName('')
Traceback (most recent call last):
File "", line 1, in ?
pywintypes.api_error: (127, 'GetFullPathName', 'The specified procedure
could not be found.')
Is this indeed something we should fix?
Mark.
> -----Original Message-----
> From: python-bugs-list-admin@python.org
> [mailto:python-bugs-list-admin@python.org]On Behalf Of
> 2jerry@writeme.com
> Sent: Tuesday, 4 July 2000 7:14 AM
> To: python-bugs-list@python.org
> Cc: bugs-py@python.org
> Subject: [Python-bugs-list] win32api.GetFullPathName (build 129)
> (PR#380)
>
>
> Full_Name: Jerome VACHER
> Version: 1.5.2 (win32api build 129)
> OS: pc win98
> Submission from: ppp-55.dialup-166.worldonline.fr (212.83.166.55)
>
>
> next to code:
> full_path_lst = map(os.path.abspath, sys.path)
>
> according to that sys.path include the source directory at the
> first place of
> sys.path.
>
> I noticed that if I call the module in its own directory (python
> -i module.py)
> the first item of sys.path is ''.
> That all ok: abspath function in os module call getcwd()
> function if path is
> Null.
> ...
> good day for UNIX like men (as me :))
> ...
> but in NT or WIN 98 workstation:
> os.path.abspath call :win32api.GetFullPathName(path) in ntpath module
> and
> win32api.GetFullPathName('') return '' and not current directory.
>
> Maybe is it a functionality .. but is os-depend functionality
> available for a
> longtime ?
>
> Jerome.vacher alias Jerry the foolish dracomorpheus.
>
>
>
>
>
> _______________________________________________
> Python-bugs-list maillist - Python-bugs-list@python.org
> http://www.python.org/mailman/listinfo/python-bugs-list
-------------------------------------------------------
Date: 2000-Aug-01 14:01
By: none
Comment:
From: "Fred L. Drake, Jr."
Subject: RE: [Python-bugs-list] win32api.GetFullPathName (build 129) (PR#380)
Date: Tue, 4 Jul 2000 13:34:24 -0400 (EDT)
Mark Hammond writes:
> Can anyone else here confirm that:
>
> a) os.abspath('') on Linux does indeed return the CWD.
Yes, that's right.
> b) It is supposed to :-)
I think that's the right thing to do.
-Fred
--
Fred L. Drake, Jr.
BeOpen PythonLabs Team Member
-------------------------------------------------------
Date: 2000-Aug-06 13:56
By: twouters
Comment:
Possibly already fixed, or at least Mark has looked at it :)
-------------------------------------------------------
Date: 2000-Aug-06 15:55
By: mhammond
Comment:
This is not a bug in win32api.GetFullPathName(), but rather the use of GetFullPathName() to implement os.abspath(). Bug summary changed accordingly. Confirmed as a bug, and I will fix it!
-------------------------------------------------------
Date: 2000-Aug-13 23:22
By: mhammond
Comment:
ntpath.py and test_ntpath.py checked in with the fix!
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110673&group_id=5470
From noreply@sourceforge.net Mon Aug 14 07:31:34 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 23:31:34 -0700
Subject: [Python-bugs-list] [Bug #110601] expert on extension modules and multiple interpreters? (PR#125)
Message-ID: <200008140631.XAA30801@bush.i.sourceforge.net>
Bug #110601, was updated on 2000-Jul-31 14:05
Here is a current snapshot of the bug.
Project: Python
Category: Core
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Summary: expert on extension modules and multiple interpreters? (PR#125)
Details: Jitterbug-Id: 125
Submitted-By: Nikolas Kauer
Date: Tue, 9 Nov 1999 18:43:09 -0600 (CST)
Version: None
OS: None
Dear Guido,
(please read first paragraph)
I discovered a Python problem that so far nobody could really explain,
since a precise explanation requires in-depth knowledge about the internals
of the Python interpreter. I HAVE DONE MY HOMEWORK and have posted this
message to various mailing lists including comp.lang.python, python-help@python.org
and pyapache-devel@msg.com.mx and communicated with several people individually,
getting some guesses (appended after the problem description), but no competent answer,
yet. I'm sure you know somebody who could provide that answer, and would appreciate
it if you could FORWARD THIS MESSAGE to such a person.
Best regards,
Nikolas
PS I'm sure you heard this a thousand times, nevertheless I like Python
and enjoy programming in Python. I think it's a beautifully designed
programming language.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I run the following test script on Apache-1.3.6/PyApache-4.19
on Linux 2.2.5 (RedHat 6.0) with only one httpd child and the
module mxDateTime compiled into Python/PyApache, so there is
no dynamic loading of a shared library.
------------------------------------------------------------
print "Content-type: text/plain"
print
print
import sys, traceback
# just checking ...
if not sys.modules.has_key('mxDateTime'):
print 'No module mxDateTime in sys.modules'
print
import mxDateTime
print "sys.modules['mxDateTime'] = ", sys.modules['mxDateTime']
print "mxDateTime.__dict__['now'] = ", mxDateTime.__dict__['now']
print
print "calling mxDateTime.now() gives:",
try:
print mxDateTime.now()
except:
print
traceback.print_exc(file=sys.stdout)
--------------------------------------------------------------
First time http://localhost/mytest.py gives
*******************************
No module mxDateTime in sys.modules
sys.modules['mxDateTime'] =
mxDateTime.__dict__['now'] =
calling mxDateTime.now() gives: 1999-10-28 18:28:49.75
*******************************
And again http://localhost/mytest.py now gives
*******************************
No module mxDateTime in sys.modules
sys.modules['mxDateTime'] =
mxDateTime.__dict__['now'] =
calling mxDateTime.now() gives:
Traceback (innermost last):
File "/local/web/alpha/docroot/mytest.py", line 16, in ?
print mxDateTime.now()
TypeError: call of non-function (type None)
*******************************
After that experience, I eliminated all dependencies on module
DateTime/mxDateTime in my Python code, but now I get
the same error whenever something in module MySQLdb is
accessed for the second time ...
The mxDateTime author Marc Lemburg writes:
"[...] indicates that PyApache (or perhaps the Python finalizer)
has cleared the module's namespace... which is bad, since
extension modules can typically only initialize themselves *once*."
Marc writes further:
"[T]his is really odd: the 'now' symbol still refers to the
existing function while the module seems to return None as
attribute."
The PyApache coordinator Lele Gaifax writes:
"I can confirm that the problem lives in the cleanup mechanism.
Python clears up its dictionaries, and doesn't allow a
reinit, as Marc pointed out. This is not a PyApache fault: you
can get the very same result running the pysrv demo [...].
In fact, every use of such modules mixed to multiple interpreters
should cause the problem."
Apparently, the fact that a module works with regular Python
does not guarantee that it also works with PyApache (or pysrv).
Lele Gaifax writes:
"[...]I cannot see a way out, if not digging in Python's internals.
[D]oes someone know if the problem has been raised before in the
Python community?"
Please, could someone with Python internals expertise explain this
issue? How can I tell in advance if an extension module will work
with PyApache? Is it possible to trick Python into cleanly
re-initializing a module? Is there any hope that I can run my
existing Web site with the Python interpreter embedded into
Apache's httpd?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
More insights from this past week:
Lele Gaifax writes:
"Well, I seems to have tracked it down to the cache you use on Python's
time module. I changed the function mxDateTime_now, where's the only
reference to that module, to use `PyImport_AddModule ("time")'
instead and extracting the dictionary from its result instead from
Python_time_module, that I left alone.
That function returns a borrowed reference to the module object,
*provided* it is already loaded. Since this is done at mxDateTime's
initialization, this is probably safe, but it needs to be checked...
Anyway, so patched the module does not break PyApache, [...]"
Marc Lemburg replies:
"That's interesting: the time module's namespace is probably cleared
during the Fini code stage. This would change the interpretation
of the error. What you see is the error produced by the internals
of the now() function and not related to the mxDateTime module
namespace itself.
Since time.time is the only function I really use from the
Python time module perhaps caching only the function would do
the trick.
BTW, when finalization occurrs, is mxDateTime_Cleanup() being
called ? It should reset the global reference to the time
module (at least that's what my current code does):
[code]
Something else I could do is move time module lookup from
the initmxDateTime() function into now() itself in case that
helps.
[...]
I would guess that the setup mxODBC + mxDateTime has the
same problems related to mxODBC holding a reference to mxDateTime."
Any help in form of diagnostics, explanations and suggestions would be
greatly appreciated.
Nikolas
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Some ideas from python-help@python.org:
Mark Hammond writes:
"If I understand the problem correct, it is simply that Python can not
handle multiple Py_Init()/Py_Finalize() calls. Doing a Py_Finalize()
cleans things up, but another Py_Init() can not restore everything
back to a working state.
I agree this is a problem, and it has ben brought up before. I suffer
the same problem with the COM extensions. Ideally this needs to be
fixed properly, but it is not trivial to do so - the entire module
init process would need to be re-thought. The only solution I can
think of is to get Apache to never finalize Python.
Of course, I may be completely off-track here..."
Martin von Loewis writes:
"I think the problem is different. PyApache does *not* invoke
Py_Finalize(*), but Py_EndInterpreter. This does PyImport_Cleanup,
then PyInterpreterState_Delete.
This is where I got stuck: The PyImport_Cleanup iterates over the
interpreter-state's module list, which is then cleared, and completely
discarded. I did not actually find the place where state is preserved
across interpreters, so the problem can't possibly happen :->
(*) Of course, Apache eventually does Py_Finalize, when the whole
server is shut down. Each individual CGI only goes through
Py_NewInterpreter/Py_EndInterpreter."
====================================================================
Audit trail:
Fri Dec 03 10:21:06 1999 guido changed notes
Fri Dec 03 10:21:07 1999 guido moved from incoming to open
Fri Dec 03 10:21:47 1999 guido changed notes
Follow-Ups:
Date: 2000-Aug-13 23:31
By: mhammond
Comment:
Assigning to MAL - it involves mxODBC and Apache on a Linux box, so surely he is more qualified :-) I'm inclined to mark this is irreproducible, but maybe Marc has had further insights.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110601&group_id=5470
From noreply@sourceforge.net Mon Aug 14 07:37:33 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 23:37:33 -0700
Subject: [Python-bugs-list] [Bug #110622] pdb bug (PR#236)
Message-ID: <200008140637.XAA30971@bush.i.sourceforge.net>
Bug #110622, was updated on 2000-Jul-31 14:06
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: Works For Me
Bug Group: Irreproducible
Priority: 5
Summary: pdb bug (PR#236)
Details: Jitterbug-Id: 236
Submitted-By: jsolbrig@webcom.com
Date: Tue, 14 Mar 2000 19:55:22 -0500 (EST)
Version: 1.5.2
OS: Win32/win95
pdb (python debugger) tends to drop (ignore) breaks in multi-file debugging.
I wish I had time to isolate the offending code but I don't.
====================================================================
Audit trail:
Mon May 22 17:37:26 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-13 23:37
By: mhammond
Comment:
I've done extensive work with bdb and pdb, and never seen this. I believe we can close this as irreproducible, and I will in a few days unless someone screams or describes a reproduction scenario.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110622&group_id=5470
From noreply@sourceforge.net Mon Aug 14 07:39:52 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 23:39:52 -0700
Subject: [Python-bugs-list] [Bug #110631] Debugger (win and idle) (PR#283)
Message-ID: <200008140639.XAA31008@bush.i.sourceforge.net>
Bug #110631, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 3
Summary: Debugger (win and idle) (PR#283)
Details: Jitterbug-Id: 283
Submitted-By: musingattheruins@yahoo.com
Date: Mon, 10 Apr 2000 12:30:44 -0400 (EDT)
Version: 1.5.2
OS: Win32
The python debugger (both Idle and PythonWin) does not undertand packages. Can
run scripts from the command line that cannot be run in the debugger...
Create package 'Test' in the directory "My Modules", add an __init__.py (empty)
to the directory "My modules\Test", create file testfile.py with the
contents...
class TheTest:
def __init__(self):
self.i = 1
def go(self):
return self.i
Add the path to the Python path with the following file (test.reg)...
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\1.5\PythonPath\TheTest]
@="C:\\My modules"
then try the following at the python prompt:
import Test.testfile
j = Test.testfile.TheTest()
k = j.go
runs fine right? Yes it does, now step through it in the debugger and you
get...
import Test.testfile
j = Test.testfile.TheTest() #exception: attribute 'TheTest'
k = j.go
Does not appear to be realted to the class (you can change it to a 'function in
a module' instead of a 'method in a class in a module' and you get the a similar
result.)
Debugger does not understand packages.
====================================================================
Audit trail:
Tue Jul 11 08:29:15 2000 guido moved from incoming to open
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110631&group_id=5470
From noreply@sourceforge.net Mon Aug 14 07:42:31 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 23:42:31 -0700
Subject: [Python-bugs-list] [Bug #110637] ihooks on windows and pythoncom (PR#294)
Message-ID: <200008140642.XAA31135@bush.i.sourceforge.net>
Bug #110637, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: Windows
Status: Open
Resolution: None
Bug Group: Platform-specific
Priority: 5
Summary: ihooks on windows and pythoncom (PR#294)
Details: Jitterbug-Id: 294
Submitted-By: mak@mikroplan.com.pl
Date: Thu, 13 Apr 2000 04:09:35 -0400 (EDT)
Version: cvs
OS: windows
Hi,
Python module ihooks is not so compatible with builtin imp while importing
modules whose name is stored in registry eg. pythoncom/pywintypes.
import ihooks
ihooks.install()
import pythoncom
This code will fail inside pythonwin ide too !
====================================================================
Audit trail:
Tue Jul 11 08:29:17 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Aug-13 23:42
By: mhammond
Comment:
This needs a resolution. The "registered module" code in the code also needs to support HKEY_CURRENT_USER along with the HKEY_LOCAL_MACHINE it does now.
-------------------------------------------------------
For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=110637&group_id=5470
From noreply@sourceforge.net Mon Aug 14 07:44:02 2000
From: noreply@sourceforge.net (noreply@sourceforge.net)
Date: Sun, 13 Aug 2000 23:44:02 -0700
Subject: [Python-bugs-list] [Bug #110642] freeze with "-s service" and "-m" (PR#315)
Message-ID: <200008140644.XAA31157@bush.i.sourceforge.net>
Bug #110642, was updated on 2000-Jul-31 14:09
Here is a current snapshot of the bug.
Project: Python
Category: demos and tools
Status: Open
Resolution: None
Bug Group: Feature Request
Priority: 5
Summary: freeze with "-s service" and "-m" (PR#315)
Details: Jitterbug-Id: 315
Submitted-By: tdickenson@geminidataloggers.com
Date: Fri, 5 May 2000 05:50:37 -0400 (EDT)
Version: 1.5.2
OS: Windows
There is a problem with combining two different options to freeze. Those options
are:
1. "-s service" indicating that the frozen program is a windows service. one
effect of this is that the myscript.py file on the freeze command line should be
available for import, not as __main__
2. "-m" indicating that extra modules are to be included in the freeze.
The relevant block of code is at line 335...
# Add the main script as either __main__, or the actual module name.
if python_entry_is_main:
mf.run_script(scriptfile)
else:
if modargs:
mf.import_hook(scriptfile)
else:
mf.load_file(scriptfile)
For a service, the outer 'else' block is entered.
If -m is not specified then the inner 'else' block is entered. mf.load_file
assumes its parameter is a filename (to be imported from), an everything is
happy.
If -m is specified then the inner 'if' block is entered. mf.import_hook assumes
its parameter is a module to imported. This fails because "myscript.py" is not a
module name, and can not be imported.
I think this block of code was naively copy/pasted from the block above it
(where it correctly implements the -m option), and never tested with the -m
option.
This block (starting line 335) should be replaced with
# Add the main script as either __main__, or the actual module name.
if python_entry_is_main:
mf.run_script(scriptfile)
else:
mf.load_file(scriptfile)
I have tested this patch on windows, freezing service and non-service scripts,
both with and without -m
====================================================================
Audit trail:
Mon May 22 17:28:43 2000 guido changed notes
Mon May 22 17:28:43 2000 guido moved from incoming to open
Follow-Ups:
Date: 2000-Jul-31 14:10
By: none
Comment:
From: "Mark Hammond"