[ python-Bugs-1745178 ] pdtri gives wrong results

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

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nikke Knatterton (funke_)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdtri gives wrong results

Initial Comment:
pdtri function, aka inverse of Poisson cumulative distribution gives wrong 
results when I use it.
For example when expected count is 20:

>>> pdtri(20,0.001)
38.041881353850023

when in Matlab:

>> poissinv(0.999, 20)
ans = 35

I checked the value from http://stattrek.com/Tables/Poisson.aspx
where cumulative probability for 35 is 0.999196 and for 
38 it is 0.999891...clearly the latter is wrong.

Or don't I use the function correctly?

(For some reason the probability 0.999 is given as 0.001 in python)

--

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



[ python-Bugs-1745178 ] pdtri gives wrong results

2007-06-29 Thread SourceForge.net
Bugs item #1745178, was opened at 2007-06-29 07:14
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1745178&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Nikke Knatterton (funke_)
Assigned to: Nobody/Anonymous (nobody)
Summary: pdtri gives wrong results

Initial Comment:
pdtri function, aka inverse of Poisson cumulative distribution gives wrong 
results when I use it.
For example when expected count is 20:

>>> pdtri(20,0.001)
38.041881353850023

when in Matlab:

>> poissinv(0.999, 20)
ans = 35

I checked the value from http://stattrek.com/Tables/Poisson.aspx
where cumulative probability for 35 is 0.999196 and for 
38 it is 0.999891...clearly the latter is wrong.

Or don't I use the function correctly?

(For some reason the probability 0.999 is given as 0.001 in python)

--

>Comment By: Georg Brandl (gbrandl)
Date: 2007-06-29 07:33

Message:
Logged In: YES 
user_id=849994
Originator: NO

There is no "pdtri" function in the Python core and standard library.

If this function is coming from SciPy, you should report or discuss that
issue with them.

--

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



[ python-Bugs-1745035 ] DoS smtpd vulnerability

2007-06-29 Thread SourceForge.net
Bugs item #1745035, was opened at 2007-06-28 21:44
Message generated for change (Comment added) made by billiejoex
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1745035&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 9
Private: No
Submitted By: billiejoex (billiejoex)
Assigned to: Nobody/Anonymous (nobody)
Summary: DoS smtpd vulnerability

Initial Comment:
Method "collect_incoming_data" of "SMTPChannel" class should stop buffering if 
received lines are too long (possible Denial-of-Service attacks).
Without truncating such buffer a simple malicious script sending extremely long 
lines without "\r\n" terminator could easily saturate system resources.

--

>Comment By: billiejoex (billiejoex)
Date: 2007-06-29 20:00

Message:
Logged In: YES 
user_id=1357589
Originator: YES

Sorry, I realized I've forgotten to reset to zero the bytes counter.
Here's the patch of the patch:

124a125
> self.__in_buffer_len = 0
135a137,140
> self.__in_buffer_len += len(data)
> if self.__in_buffer_len > 4096:
> self.__line = []
> self.__in_buffer_len = 0
141a147
> self.__in_buffer_len = 0


--

Comment By: billiejoex (billiejoex)
Date: 2007-06-28 21:45

Message:
Logged In: YES 
user_id=1357589
Originator: YES

--- malicious script

import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", 8025))
while 1:
s.sendall('x' * 1024)


--- proposed smtpd.py patch

124a125
> self.__in_buffer_len = 0
135a137,139
> self.__in_buffer_len += len(data)
> if self.__in_buffer_len > 4096:
> self.__line = []



--

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



[ python-Bugs-1581906 ] test_sqlite fails on OSX G5 arch if test_ctypes is run

2007-06-29 Thread SourceForge.net
Bugs item #1581906, was opened at 2006-10-21 18:02
Message generated for change (Comment added) made by marketdickinson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
Assigned to: Skip Montanaro (montanaro)
Summary: test_sqlite fails on OSX G5 arch if test_ctypes is run

Initial Comment:
I noticed a test_sqlite test failure on my Mac G5 the other day while trying 
to set up a buildbot for sqlalchemy.  Everything runs fine on my G4 
powerbook.  Both machines run Mac OSX 10.4.8 with Apple's gcc 4.0.0, 
build 5026.

I whittled the problem down to just having test_ctypes and test_sqlite 
enabled, then further whittled it down to just having Lib/ctypes/test/
test_find.py available (all other ctypes tests eliminated).  More detailed 
problem descriptions are in these two postings to python-dev:

http://article.gmane.org/gmane.comp.python.devel/84478
http://article.gmane.org/gmane.comp.python.devel/84481

Skip


--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 19:11

Message:
Logged In: YES 
user_id=703403
Originator: NO

I've just noticed the same failure on an iBook G4, with OS X 10.4.10,
sqlite version 3.4.0, 
and Python built with gcc 4.2.0 (from macports).

(Python 2.6a0 (trunk:56123M, Jun 29 2007, 13:22:18) 
[GCC 4.2.0] on darwin)




--

Comment By: ted pollari (incongruity)
Date: 2007-06-13 20:19

Message:
Logged In: YES 
user_id=1375728
Originator: NO

FWIW, I'm getting an identical error on a MacBook Pro with a Core Duo
processor

--

Comment By: Thomas Heller (theller)
Date: 2007-05-04 14:04

Message:
Logged In: YES 
user_id=11105
Originator: NO

FYI, this PyOpenGL bug may be related:

https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1712741&group_id=5988

--

Comment By: Thomas Heller (theller)
Date: 2007-03-22 20:18

Message:
Logged In: YES 
user_id=11105
Originator: NO

Skip,

I do not have a G5 machine available, only a G4 and the problem doesn't
appear there.
For someone with a G5 it should not be too difficult to reproduce (or
investigate),
I think that running './python Lib/test/regrtest.py test_ctypes
test_sqlite' should suffice.

However, if loading the GLUT library changes the cwd, and sqlite fails
with a changed working dir,
I'm not sure where the problem really is and how it should be fixed.  It
could be said that test_ctypes
should restore the cwd after the tests (but maybe this should be done by
the test framework?),
or it could be said that test_sqlite should set the cwd in case the test
relies on it.

I'll assign back to you because I have no way to test it on a machine
where the problem appears.

--

Comment By: Skip Montanaro (montanaro)
Date: 2007-03-18 17:20

Message:
Logged In: YES 
user_id=44345
Originator: YES

Thomas, I assigned this to you simply so you can cast your eye on the
problem and see if you think there might be anything ctypes-related in the
problem I've reported.  I've ignored it up 'til now, but I bumped up
against it again trying to get the Pybots SQLAlchemy test suite running on
my Mac.  During my previous encounter with this problem Ronald Oussouren
reported on a possible connection with GLUT:

http://mail.python.org/pipermail/python-dev/2006-October/069523.html

Assuming there is no obvious ctypes connection you can determine  (it's
not clear to me that there is any current directory funny business going
on) just assign it back to me and I'll try to find a pysqlite expert to
take a look.

Thx,

Skip


--

Comment By: Skip Montanaro (montanaro)
Date: 2006-10-21 18:04

Message:
Logged In: YES 
user_id=44345

Another article here:

http://article.gmane.org/gmane.comp.python.devel/84487


--

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



[ python-Bugs-1745533 ] Filename providing cross platform capability

2007-06-29 Thread SourceForge.net
Bugs item #1745533, was opened at 2007-06-29 14:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1745533&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Damian (atagar)
Assigned to: Nobody/Anonymous (nobody)
Summary: Filename providing cross platform capability

Initial Comment:
The help section for the open method should note that a Unix style filename 
work in a cross platform fashion (like Java). After scouring several resources 
including two O'Reilly texts on Python, a dozen web pages, all reliant help 
pages, I finally got my answer from a mailing list. -Damian

--

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



[ python-Bugs-1581906 ] test_sqlite fails on OSX G5 arch if test_ctypes is run

2007-06-29 Thread SourceForge.net
Bugs item #1581906, was opened at 2006-10-21 18:02
Message generated for change (Comment added) made by marketdickinson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
Assigned to: Skip Montanaro (montanaro)
Summary: test_sqlite fails on OSX G5 arch if test_ctypes is run

Initial Comment:
I noticed a test_sqlite test failure on my Mac G5 the other day while trying 
to set up a buildbot for sqlalchemy.  Everything runs fine on my G4 
powerbook.  Both machines run Mac OSX 10.4.8 with Apple's gcc 4.0.0, 
build 5026.

I whittled the problem down to just having test_ctypes and test_sqlite 
enabled, then further whittled it down to just having Lib/ctypes/test/
test_find.py available (all other ctypes tests eliminated).  More detailed 
problem descriptions are in these two postings to python-dev:

http://article.gmane.org/gmane.comp.python.devel/84478
http://article.gmane.org/gmane.comp.python.devel/84481

Skip


--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 23:37

Message:
Logged In: YES 
user_id=703403
Originator: NO

And also on Python 2.5, compiled under Apple's GCC. (Still OS X
10.4.10/G4)
The following four lines of Python code are enough to cause the problem
for me.

Interestingly, if the second and third lines are exchanged (so that the
two import commands come first), then no exception is raised.

Python 2.5.1 (r251:54863, May 10 2007, 20:59:25) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import CDLL
>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron
<_FuncPtr object at 0x514500>
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.ProgrammingError: library routine called out of sequence



--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 19:11

Message:
Logged In: YES 
user_id=703403
Originator: NO

I've just noticed the same failure on an iBook G4, with OS X 10.4.10,
sqlite version 3.4.0, 
and Python built with gcc 4.2.0 (from macports).

(Python 2.6a0 (trunk:56123M, Jun 29 2007, 13:22:18) 
[GCC 4.2.0] on darwin)




--

Comment By: ted pollari (incongruity)
Date: 2007-06-13 20:19

Message:
Logged In: YES 
user_id=1375728
Originator: NO

FWIW, I'm getting an identical error on a MacBook Pro with a Core Duo
processor

--

Comment By: Thomas Heller (theller)
Date: 2007-05-04 14:04

Message:
Logged In: YES 
user_id=11105
Originator: NO

FYI, this PyOpenGL bug may be related:

https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1712741&group_id=5988

--

Comment By: Thomas Heller (theller)
Date: 2007-03-22 20:18

Message:
Logged In: YES 
user_id=11105
Originator: NO

Skip,

I do not have a G5 machine available, only a G4 and the problem doesn't
appear there.
For someone with a G5 it should not be too difficult to reproduce (or
investigate),
I think that running './python Lib/test/regrtest.py test_ctypes
test_sqlite' should suffice.

However, if loading the GLUT library changes the cwd, and sqlite fails
with a changed working dir,
I'm not sure where the problem really is and how it should be fixed.  It
could be said that test_ctypes
should restore the cwd after the tests (but maybe this should be done by
the test framework?),
or it could be said that test_sqlite should set the cwd in case the test
relies on it.

I'll assign back to you because I have no way to test it on a machine
where the problem appears.

--

Comment By: Skip Montanaro (montanaro)
Date: 2007-03-18 17:20

Message:
Logged In: YES 
user_id=44345
Originator: YES

Thomas, I assigned this to you simply so you can cast your eye on the
problem and see if you think there might be anything ctypes-related in the
problem I've reported.  I've ignored it up 'til now, but I bumped up
against it again trying to get the Pybots SQLAlchemy test suite running on
my Mac.  During my previous encounter with this problem Ronald Oussouren
reported on a possible connection with GLUT:

http://mail.python.org/pipermail/python-dev/2006-October/069523.html

Assuming there is no obvious ctypes connection you can determine  (it's
not clear to me that there is any

[ python-Bugs-1581906 ] test_sqlite fails on OSX G5 arch if test_ctypes is run

2007-06-29 Thread SourceForge.net
Bugs item #1581906, was opened at 2006-10-21 13:02
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
>Assigned to: Thomas Heller (theller)
Summary: test_sqlite fails on OSX G5 arch if test_ctypes is run

Initial Comment:
I noticed a test_sqlite test failure on my Mac G5 the other day while trying 
to set up a buildbot for sqlalchemy.  Everything runs fine on my G4 
powerbook.  Both machines run Mac OSX 10.4.8 with Apple's gcc 4.0.0, 
build 5026.

I whittled the problem down to just having test_ctypes and test_sqlite 
enabled, then further whittled it down to just having Lib/ctypes/test/
test_find.py available (all other ctypes tests eliminated).  More detailed 
problem descriptions are in these two postings to python-dev:

http://article.gmane.org/gmane.comp.python.devel/84478
http://article.gmane.org/gmane.comp.python.devel/84481

Skip


--

>Comment By: Skip Montanaro (montanaro)
Date: 2007-06-29 21:39

Message:
Logged In: YES 
user_id=44345
Originator: YES

Fails for me as well (Python 2.6a0, PowerBook G4, 10.4.10, Apple's GCC
4.0.1).  Thomas, can you reproduce with the lines marketdickinson used?

I don't see any directory changing going on:

% python
Python 2.6a0 (trunk:54264M, Mar 10 2007, 15:19:48) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/Users/skip'
>>> from ctypes import CDLL>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron<_FuncPtr
object at 0x106c6c0>
>>> os.getcwd()
'/Users/skip'
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "", line 1, in 
ProgrammingError: library routine called out of sequence
>>> os.getcwd()
'/Users/skip'

Pass it back if you still can't reproduce the problem.  Meanwhile I've
subscribed to the pysqlite mailing list and will ask there.

Skip


--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 18:37

Message:
Logged In: YES 
user_id=703403
Originator: NO

And also on Python 2.5, compiled under Apple's GCC. (Still OS X
10.4.10/G4)
The following four lines of Python code are enough to cause the problem
for me.

Interestingly, if the second and third lines are exchanged (so that the
two import commands come first), then no exception is raised.

Python 2.5.1 (r251:54863, May 10 2007, 20:59:25) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import CDLL
>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron
<_FuncPtr object at 0x514500>
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.ProgrammingError: library routine called out of sequence



--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 14:11

Message:
Logged In: YES 
user_id=703403
Originator: NO

I've just noticed the same failure on an iBook G4, with OS X 10.4.10,
sqlite version 3.4.0, 
and Python built with gcc 4.2.0 (from macports).

(Python 2.6a0 (trunk:56123M, Jun 29 2007, 13:22:18) 
[GCC 4.2.0] on darwin)




--

Comment By: ted pollari (incongruity)
Date: 2007-06-13 15:19

Message:
Logged In: YES 
user_id=1375728
Originator: NO

FWIW, I'm getting an identical error on a MacBook Pro with a Core Duo
processor

--

Comment By: Thomas Heller (theller)
Date: 2007-05-04 09:04

Message:
Logged In: YES 
user_id=11105
Originator: NO

FYI, this PyOpenGL bug may be related:

https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1712741&group_id=5988

--

Comment By: Thomas Heller (theller)
Date: 2007-03-22 15:18

Message:
Logged In: YES 
user_id=11105
Originator: NO

Skip,

I do not have a G5 machine available, only a G4 and the problem doesn't
appear there.
For someone with a G5 it should not be too difficult to reproduce (or
investigate),
I think that running './python Lib/test/regrtest.py test_ctypes
test_sqlite' should suffice.

However, if loading the GLUT library changes the cwd, and sqlite fails
with a changed working dir,
I'm not sure where the problem really is and how it sho

[ python-Bugs-1581906 ] test_sqlite fails on OSX G5 arch if test_ctypes is run

2007-06-29 Thread SourceForge.net
Bugs item #1581906, was opened at 2006-10-21 13:02
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
Assigned to: Thomas Heller (theller)
Summary: test_sqlite fails on OSX G5 arch if test_ctypes is run

Initial Comment:
I noticed a test_sqlite test failure on my Mac G5 the other day while trying 
to set up a buildbot for sqlalchemy.  Everything runs fine on my G4 
powerbook.  Both machines run Mac OSX 10.4.8 with Apple's gcc 4.0.0, 
build 5026.

I whittled the problem down to just having test_ctypes and test_sqlite 
enabled, then further whittled it down to just having Lib/ctypes/test/
test_find.py available (all other ctypes tests eliminated).  More detailed 
problem descriptions are in these two postings to python-dev:

http://article.gmane.org/gmane.comp.python.devel/84478
http://article.gmane.org/gmane.comp.python.devel/84481

Skip


--

>Comment By: Skip Montanaro (montanaro)
Date: 2007-06-29 21:45

Message:
Logged In: YES 
user_id=44345
Originator: YES

One other minor(?) data point.  I am using a version of sqlite3 which I
compiled and installed, not Apple's older version:

>>> sqlite3.version, sqlite3.sqlite_version
('2.3.3', '3.3.8')
...
% pwd
/Users/skip/local/lib/python2.6/lib-dynload
% otool -L _sqlite3.so 
_sqlite3.so:
/Users/skip/local/lib/libsqlite3.0.dylib (compatibility version
9.0.0, current version 9.6.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
version 93.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.1.7)

It appears those of us who can reproduce the problem all have slightly
different installs (2.5 v. 2.6, Apple's GCC v. DarwinPorts, Apple's sqlite3
v. DarwinPorts v. homebuilt, G4 v. G5 v. Intel architecture).


--

Comment By: Skip Montanaro (montanaro)
Date: 2007-06-29 21:39

Message:
Logged In: YES 
user_id=44345
Originator: YES

Fails for me as well (Python 2.6a0, PowerBook G4, 10.4.10, Apple's GCC
4.0.1).  Thomas, can you reproduce with the lines marketdickinson used?

I don't see any directory changing going on:

% python
Python 2.6a0 (trunk:54264M, Mar 10 2007, 15:19:48) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/Users/skip'
>>> from ctypes import CDLL>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron<_FuncPtr
object at 0x106c6c0>
>>> os.getcwd()
'/Users/skip'
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "", line 1, in 
ProgrammingError: library routine called out of sequence
>>> os.getcwd()
'/Users/skip'

Pass it back if you still can't reproduce the problem.  Meanwhile I've
subscribed to the pysqlite mailing list and will ask there.

Skip


--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 18:37

Message:
Logged In: YES 
user_id=703403
Originator: NO

And also on Python 2.5, compiled under Apple's GCC. (Still OS X
10.4.10/G4)
The following four lines of Python code are enough to cause the problem
for me.

Interestingly, if the second and third lines are exchanged (so that the
two import commands come first), then no exception is raised.

Python 2.5.1 (r251:54863, May 10 2007, 20:59:25) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import CDLL
>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron
<_FuncPtr object at 0x514500>
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "", line 1, in 
sqlite3.ProgrammingError: library routine called out of sequence



--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 14:11

Message:
Logged In: YES 
user_id=703403
Originator: NO

I've just noticed the same failure on an iBook G4, with OS X 10.4.10,
sqlite version 3.4.0, 
and Python built with gcc 4.2.0 (from macports).

(Python 2.6a0 (trunk:56123M, Jun 29 2007, 13:22:18) 
[GCC 4.2.0] on darwin)




--

Comment By: ted pollari (incongruity)
Date: 2007-06-13 15:19

Message:
Logged In: YES 
user_id=1375728
Originator: NO

FWIW, I'm getting an identical error on a MacBoo

[ python-Bugs-1581906 ] test_sqlite fails on OSX G5 arch if test_ctypes is run

2007-06-29 Thread SourceForge.net
Bugs item #1581906, was opened at 2006-10-21 18:02
Message generated for change (Comment added) made by marketdickinson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
Assigned to: Thomas Heller (theller)
Summary: test_sqlite fails on OSX G5 arch if test_ctypes is run

Initial Comment:
I noticed a test_sqlite test failure on my Mac G5 the other day while trying 
to set up a buildbot for sqlalchemy.  Everything runs fine on my G4 
powerbook.  Both machines run Mac OSX 10.4.8 with Apple's gcc 4.0.0, 
build 5026.

I whittled the problem down to just having test_ctypes and test_sqlite 
enabled, then further whittled it down to just having Lib/ctypes/test/
test_find.py available (all other ctypes tests eliminated).  More detailed 
problem descriptions are in these two postings to python-dev:

http://article.gmane.org/gmane.comp.python.devel/84478
http://article.gmane.org/gmane.comp.python.devel/84481

Skip


--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-30 03:32

Message:
Logged In: YES 
user_id=703403
Originator: NO

I think your minor(?) data point is a major data point.  I'm using the
Macports version of sqlite3.  Furthermore, after hiding the /usr/lib
version with

fibonacci:/usr/lib dickinsm$ sudo mv libsqlite3.0.dylib
libsqlite3.0.dylib.temp

I can't reproduce the problem any more.  I tried sprinkling a few printf
statements through the sqlite3 source to see what was going on.  Bizarrely,
it looks as though the Apple-supplied sqlite3SafetyCheck() routine is being
called from the Macports createCollation(); or at least that's the only way
that I can understand the results I'm getting.  Is this possible?

Mark

--

Comment By: Skip Montanaro (montanaro)
Date: 2007-06-30 02:45

Message:
Logged In: YES 
user_id=44345
Originator: YES

One other minor(?) data point.  I am using a version of sqlite3 which I
compiled and installed, not Apple's older version:

>>> sqlite3.version, sqlite3.sqlite_version
('2.3.3', '3.3.8')
...
% pwd
/Users/skip/local/lib/python2.6/lib-dynload
% otool -L _sqlite3.so 
_sqlite3.so:
/Users/skip/local/lib/libsqlite3.0.dylib (compatibility version
9.0.0, current version 9.6.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
version 93.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.1.7)

It appears those of us who can reproduce the problem all have slightly
different installs (2.5 v. 2.6, Apple's GCC v. DarwinPorts, Apple's sqlite3
v. DarwinPorts v. homebuilt, G4 v. G5 v. Intel architecture).


--

Comment By: Skip Montanaro (montanaro)
Date: 2007-06-30 02:39

Message:
Logged In: YES 
user_id=44345
Originator: YES

Fails for me as well (Python 2.6a0, PowerBook G4, 10.4.10, Apple's GCC
4.0.1).  Thomas, can you reproduce with the lines marketdickinson used?

I don't see any directory changing going on:

% python
Python 2.6a0 (trunk:54264M, Mar 10 2007, 15:19:48) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/Users/skip'
>>> from ctypes import CDLL>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron<_FuncPtr
object at 0x106c6c0>
>>> os.getcwd()
'/Users/skip'
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "", line 1, in 
ProgrammingError: library routine called out of sequence
>>> os.getcwd()
'/Users/skip'

Pass it back if you still can't reproduce the problem.  Meanwhile I've
subscribed to the pysqlite mailing list and will ask there.

Skip


--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 23:37

Message:
Logged In: YES 
user_id=703403
Originator: NO

And also on Python 2.5, compiled under Apple's GCC. (Still OS X
10.4.10/G4)
The following four lines of Python code are enough to cause the problem
for me.

Interestingly, if the second and third lines are exchanged (so that the
two import commands come first), then no exception is raised.

Python 2.5.1 (r251:54863, May 10 2007, 20:59:25) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import CDLL
>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron
<_FuncPtr object at 0x514500>
>>> import sqlite3
>>> sq

[ python-Bugs-1581906 ] test_sqlite fails on OSX G5 arch if test_ctypes is run

2007-06-29 Thread SourceForge.net
Bugs item #1581906, was opened at 2006-10-21 18:02
Message generated for change (Comment added) made by marketdickinson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
Assigned to: Thomas Heller (theller)
Summary: test_sqlite fails on OSX G5 arch if test_ctypes is run

Initial Comment:
I noticed a test_sqlite test failure on my Mac G5 the other day while trying 
to set up a buildbot for sqlalchemy.  Everything runs fine on my G4 
powerbook.  Both machines run Mac OSX 10.4.8 with Apple's gcc 4.0.0, 
build 5026.

I whittled the problem down to just having test_ctypes and test_sqlite 
enabled, then further whittled it down to just having Lib/ctypes/test/
test_find.py available (all other ctypes tests eliminated).  More detailed 
problem descriptions are in these two postings to python-dev:

http://article.gmane.org/gmane.comp.python.devel/84478
http://article.gmane.org/gmane.comp.python.devel/84481

Skip


--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-30 03:56

Message:
Logged In: YES 
user_id=703403
Originator: NO

It looks as though GLUT is a red herring.  I can reproduce the problem
with a variety of frameworks in place of GLUT, for example Quartz, Cocoa,
AppKit, CoreData, as in the following lines.

import ctypes
ctypes.CDLL('/System/Library/Frameworks/CoreData.framework/CoreData')
import sqlite3
sqlite3.connect(":memory:")

Furthermore, I notice that the GLUT framework has a library dependency on
the AppKit framework,  AppKit on CoreData, and CoreData depends on the
Apple-supplied libsqlite3, and that Quartz and Cocoa similarly ultimately
depend on libsqlite3.  Coincidence?

I can reproduce the problem with a variety of frameworks in place of GLUT,
for example Quartz, Cocoa, AppKit, CoreData.  (The .glutWireTetrahedron is
unnecessary.)

--

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-30 03:32

Message:
Logged In: YES 
user_id=703403
Originator: NO

I think your minor(?) data point is a major data point.  I'm using the
Macports version of sqlite3.  Furthermore, after hiding the /usr/lib
version with

fibonacci:/usr/lib dickinsm$ sudo mv libsqlite3.0.dylib
libsqlite3.0.dylib.temp

I can't reproduce the problem any more.  I tried sprinkling a few printf
statements through the sqlite3 source to see what was going on.  Bizarrely,
it looks as though the Apple-supplied sqlite3SafetyCheck() routine is being
called from the Macports createCollation(); or at least that's the only way
that I can understand the results I'm getting.  Is this possible?

Mark

--

Comment By: Skip Montanaro (montanaro)
Date: 2007-06-30 02:45

Message:
Logged In: YES 
user_id=44345
Originator: YES

One other minor(?) data point.  I am using a version of sqlite3 which I
compiled and installed, not Apple's older version:

>>> sqlite3.version, sqlite3.sqlite_version
('2.3.3', '3.3.8')
...
% pwd
/Users/skip/local/lib/python2.6/lib-dynload
% otool -L _sqlite3.so 
_sqlite3.so:
/Users/skip/local/lib/libsqlite3.0.dylib (compatibility version
9.0.0, current version 9.6.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current
version 93.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
version 88.1.7)

It appears those of us who can reproduce the problem all have slightly
different installs (2.5 v. 2.6, Apple's GCC v. DarwinPorts, Apple's sqlite3
v. DarwinPorts v. homebuilt, G4 v. G5 v. Intel architecture).


--

Comment By: Skip Montanaro (montanaro)
Date: 2007-06-30 02:39

Message:
Logged In: YES 
user_id=44345
Originator: YES

Fails for me as well (Python 2.6a0, PowerBook G4, 10.4.10, Apple's GCC
4.0.1).  Thomas, can you reproduce with the lines marketdickinson used?

I don't see any directory changing going on:

% python
Python 2.6a0 (trunk:54264M, Mar 10 2007, 15:19:48) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.getcwd()
'/Users/skip'
>>> from ctypes import CDLL>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron<_FuncPtr
object at 0x106c6c0>
>>> os.getcwd()
'/Users/skip'
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "", line 1, in 
ProgrammingError: library routine called out of sequence
>>> os.getcwd()
'/Users/skip'

Pass it back if you still can'