[ python-Bugs-1607759 ] segfault in python24.dll

2006-12-03 Thread SourceForge.net
Bugs item #1607759, was opened at 2006-12-03 10:18
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=1607759&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.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: joe (etaoinbe2)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in python24.dll

Initial Comment:
In my app that uses wxpython2.7 extensively I get regularly following segfault 
(null pointer exception): 

AppName: python.exe  AppVer: 0.0.0.0 ModName: python24.dll
ModVer: 2.4.150.1012 Offset: 00030f33

I have been unable to pinpoint it to a certain location of the program. :( 



--

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



[ python-Bugs-1607759 ] segfault in python24.dll

2006-12-03 Thread SourceForge.net
Bugs item #1607759, was opened at 2006-12-03 10:18
Message generated for change (Comment added) made by etaoinbe2
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1607759&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.5
Status: Open
Resolution: None
>Priority: 9
Private: No
Submitted By: joe (etaoinbe2)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in python24.dll

Initial Comment:
In my app that uses wxpython2.7 extensively I get regularly following segfault 
(null pointer exception): 

AppName: python.exe  AppVer: 0.0.0.0 ModName: python24.dll
ModVer: 2.4.150.1012 Offset: 00030f33

I have been unable to pinpoint it to a certain location of the program. :( 



--

>Comment By: joe (etaoinbe2)
Date: 2006-12-03 10:25

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

this is on windows, the faulting address is always the same

--

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



[ python-Bugs-1606092 ] csv module broken for unicode

2006-12-03 Thread SourceForge.net
Bugs item #1606092, was opened at 2006-11-30 15:46
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1606092&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: Unicode
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: JettLogic (jettlogic)
Assigned to: M.-A. Lemburg (lemburg)
Summary: csv module broken for unicode

Initial Comment:
The csv module does not accept data to write/read as anything other than 
ascii-or-utf-8 str, and the do-it-yourself example in the Python 2.5 Manual to 
write in another encoding is extremely clunky: 

1) convert unicode to utf-8
2) use csv on utf-8 with cStringIO output
3) convert utf-8 to unicode
4) convert unicode to target encoding (may be utf-8...)

So clunky as to be a bug - csv clearly can't handle unicode at all.  The module 
functions are in dire need of either accepting unicode objects (letting the 
output stream worry about the encoding, like codecs.StreamWriter), or at the 
very least accepting data directly in a target encoding instead of roundabout 
utf-8.

To read another encoding is a bit less onerous than writing:

1) wrap file to return utf-8
2) use csv, getting utf-8 output
3) convert utf-8 to unicode object

Anyone willing to fix the csv module?

--

>Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 11:34

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

Are you willing to fix it?

--

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



[ python-Bugs-1607759 ] segfault in python24.dll

2006-12-03 Thread SourceForge.net
Bugs item #1607759, was opened at 2006-12-03 11:18
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1607759&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: joe (etaoinbe2)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in python24.dll

Initial Comment:
In my app that uses wxpython2.7 extensively I get regularly following segfault 
(null pointer exception): 

AppName: python.exe  AppVer: 0.0.0.0 ModName: python24.dll
ModVer: 2.4.150.1012 Offset: 00030f33

I have been unable to pinpoint it to a certain location of the program. :( 



--

>Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 11:36

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

AFAICT, this might be a bug in wxpython also, or in some other extension
module you are using.

Can you give any example code that allows to reproduce the crash? Without
that, there is little chance that the problem can be fixed.

--

Comment By: joe (etaoinbe2)
Date: 2006-12-03 11:25

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

this is on windows, the faulting address is always the same

--

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



[ python-Bugs-1372650 ] Cookie and multiple names

2006-12-03 Thread SourceForge.net
Bugs item #1372650, was opened at 2005-12-04 04:47
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1372650&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: Viraj Alankar (valankar)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cookie and multiple names

Initial Comment:
The cookie specification described here:

http://wp.netscape.com/newsref/std/cookie_spec.html

states that multiple names of cookies can be sent. This does not seem 
to parse correctly with the Cookie module due to its dictionary storage.  
When parsing cookies via modpython, only the last cookie is used. I 
think it would be better to only use the first value, since that is what 
the specification says. Or provide for a way to store multiple names 
with different paths.


--

>Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 13:44

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

I fail to see the bug. Where in the spec does it say that the first value
should be used? On the contrary, the spec seems to say that the last value
should be used:

# Instances of the same path and name will overwrite each other, 
# with the latest instance taking precedence.

So if that's what the current module does, there is no bug.

--

Comment By: Viraj Alankar (valankar)
Date: 2005-12-04 23:46

Message:
Logged In: YES 
user_id=107970

Heh I guess that means I should try to write a patch. Might be a good
learning 
experience for me.

--

Comment By: John J Lee (jjlee)
Date: 2005-12-04 19:16

Message:
Logged In: YES 
user_id=261020

OK, I see.

I agree that it's a bug, but I'm undecided whether the
existing behaviour should be fixed.  It's true that clients
are supposed to (and do) send the most specific cookie last,
so this bug could cause servers to see the cookie from, eg
path '/cgi-bin' instead of from path '/mystuff/cgi-bin'. 
However, module Cookie is old and stable, and a patch might
break servers expecting the current behaviour.  I *suppose*
such breakage is fairly unlikely, so I wouldn't object to a
patch.

I certainly don't see anybody objecting to a patch to add a
new method to allow access to multiple cookies of the same
name  without altering the existing dict interface (repr()
could change, but not eg. .get()).

Either way, I suspect a patch is only likely to appear from
somebody who is actually using such cookies, though :-)


--

Comment By: Viraj Alankar (valankar)
Date: 2005-12-04 17:07

Message:
Logged In: YES 
user_id=107970

Basically, sometimes a web client will send 2 instances of the same name:

Cookie: mycookie=foo; mycookie=bar

The specs say that the first one is the one that should be used. The other

cookies listed are the inherited ones from paths that a prefix of the
current 
URL. When this is parsed by the Cookie module, mycookie gets set to bar 
when it should be foo.

Another example might be:

Cookie: mycookie=foo; path=bar
Cookie: mycookie=foo; path=baz

In this case there should be 2 cookies with the name 'mycookie'. The 
uniqueness is determined by the different paths.

Thanks.


--

Comment By: John J Lee (jjlee)
Date: 2005-12-04 16:52

Message:
Logged In: YES 
user_id=261020

I don't get it:

>>> import Cookie
>>> c = Cookie.SimpleCookie()
>>> c.load("foo=bar; bar=baz")
>>> c



Where's the problem?

In general, don't pay too much attention to that standard, BTW:

http://wwwsearch.sourceforge.net/ClientCookie/doc.html#standards


--

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



[ python-Bugs-1606092 ] csv module broken for unicode

2006-12-03 Thread SourceForge.net
Bugs item #1606092, was opened at 2006-11-30 15:46
Message generated for change (Comment added) made by lemburg
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1606092&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: Unicode
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: JettLogic (jettlogic)
>Assigned to: Nobody/Anonymous (nobody)
Summary: csv module broken for unicode

Initial Comment:
The csv module does not accept data to write/read as anything other than 
ascii-or-utf-8 str, and the do-it-yourself example in the Python 2.5 Manual to 
write in another encoding is extremely clunky: 

1) convert unicode to utf-8
2) use csv on utf-8 with cStringIO output
3) convert utf-8 to unicode
4) convert unicode to target encoding (may be utf-8...)

So clunky as to be a bug - csv clearly can't handle unicode at all.  The module 
functions are in dire need of either accepting unicode objects (letting the 
output stream worry about the encoding, like codecs.StreamWriter), or at the 
very least accepting data directly in a target encoding instead of roundabout 
utf-8.

To read another encoding is a bit less onerous than writing:

1) wrap file to return utf-8
2) use csv, getting utf-8 output
3) convert utf-8 to unicode object

Anyone willing to fix the csv module?

--

>Comment By: M.-A. Lemburg (lemburg)
Date: 2006-12-03 13:54

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

It should be easy to provide a wrapper class which implements the above in
plain Python.

However, if noone volunteers to write such code, it's not going to happen.


I've found that the builtin csv module is not flexible enough to deal with
the often broken CSV data you typically find in practice, so perhaps adding
a pure Python implementation which works with Unicode might prove to be a
better approach.

Unassigning the report, since I don't have time for this.


--

Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 11:34

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

Are you willing to fix it?

--

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



[ python-Bugs-1607759 ] segfault in python24.dll

2006-12-03 Thread SourceForge.net
Bugs item #1607759, was opened at 2006-12-03 10:18
Message generated for change (Comment added) made by etaoinbe2
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1607759&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: joe (etaoinbe2)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in python24.dll

Initial Comment:
In my app that uses wxpython2.7 extensively I get regularly following segfault 
(null pointer exception): 

AppName: python.exe  AppVer: 0.0.0.0 ModName: python24.dll
ModVer: 2.4.150.1012 Offset: 00030f33

I have been unable to pinpoint it to a certain location of the program. :( 



--

>Comment By: joe (etaoinbe2)
Date: 2006-12-03 13:10

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

I have tried to insulate the problem to a particular part of the code but
that did not work out. I have currently no small program that shows this
only the complete integrated app shows this. 

If you have a build with assembler listings enabled then you might be able
to find where that address is ? 

Or can I get a debugbuild so that a meaningfull stacktrace can be
produced?

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 10:36

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

AFAICT, this might be a bug in wxpython also, or in some other extension
module you are using.

Can you give any example code that allows to reproduce the crash? Without
that, there is little chance that the problem can be fixed.

--

Comment By: joe (etaoinbe2)
Date: 2006-12-03 10:25

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

this is on windows, the faulting address is always the same

--

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



[ python-Bugs-1607759 ] segfault in python24.dll

2006-12-03 Thread SourceForge.net
Bugs item #1607759, was opened at 2006-12-03 11:18
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1607759&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: joe (etaoinbe2)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in python24.dll

Initial Comment:
In my app that uses wxpython2.7 extensively I get regularly following segfault 
(null pointer exception): 

AppName: python.exe  AppVer: 0.0.0.0 ModName: python24.dll
ModVer: 2.4.150.1012 Offset: 00030f33

I have been unable to pinpoint it to a certain location of the program. :( 



--

>Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 14:56

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

For a debug build, you need debug versions of everything, including
wxPython.

If you have VS.NET 2003 or 2005, you should be able to produce such
binaries yourself. For Python, you need to follow the instructions in
PCBuild/readme.txt. I don't know how wxPython is built.

You might also be successful with creating a release build that has debug
information enabled; in that case, it is sufficient to rebuild Python.

--

Comment By: joe (etaoinbe2)
Date: 2006-12-03 14:10

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

I have tried to insulate the problem to a particular part of the code but
that did not work out. I have currently no small program that shows this
only the complete integrated app shows this. 

If you have a build with assembler listings enabled then you might be able
to find where that address is ? 

Or can I get a debugbuild so that a meaningfull stacktrace can be
produced?

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 11:36

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

AFAICT, this might be a bug in wxpython also, or in some other extension
module you are using.

Can you give any example code that allows to reproduce the crash? Without
that, there is little chance that the problem can be fixed.

--

Comment By: joe (etaoinbe2)
Date: 2006-12-03 11:25

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

this is on windows, the faulting address is always the same

--

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



[ python-Bugs-1372650 ] Cookie and multiple names

2006-12-03 Thread SourceForge.net
Bugs item #1372650, was opened at 2005-12-04 03:47
Message generated for change (Comment added) made by jjlee
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1372650&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: Viraj Alankar (valankar)
Assigned to: Nobody/Anonymous (nobody)
Summary: Cookie and multiple names

Initial Comment:
The cookie specification described here:

http://wp.netscape.com/newsref/std/cookie_spec.html

states that multiple names of cookies can be sent. This does not seem 
to parse correctly with the Cookie module due to its dictionary storage.  
When parsing cookies via modpython, only the last cookie is used. I 
think it would be better to only use the first value, since that is what 
the specification says. Or provide for a way to store multiple names 
with different paths.


--

Comment By: John J Lee (jjlee)
Date: 2006-12-03 16:49

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

loewis: In the Netscape cookie protocol (which is specified approximately,
though ambiguously, and incorrectly in places, by cookie_spec.html),
cookies sent from client to server in the Cookie: header do not include
the path (neither as "path=/foo/bar", nor even as "$path=/foo/bar").  In
valankar's first example of 2005-12-04 16:07, the two cookies must be
interpreted as having different paths (if they do not have different
paths, the client is not behaving correctly).  See the section titled
"Second Example transaction sequence:" in cookie_spec.html for an example
of this.  So, the part of cookie_spec.html you quote is not relevant (in
fact, it refers to client behaviour, not server behaviour -- though it
doesn't say so explicitly!).

BTW, I said earlier: "clients are supposed to (and do) send the most
specific cookie last".  That's backwards: in fact, clients send the most
specific (longest-path) cookie first.  Cookie.py always ignores all but
the last cookie (it overwrites the first), so it will only store the
least-specific cookie, so my point stands.

Also note that valankar's second example of 2005-12-04 16:07 is incorrect
(unless he meant Set-Cookie: instead of Cookie:): the Cookie header should
never contain path cookie-attributes (see penultimate paragraph of this
comment, and perhaps more clearly, method
cookielib.CookieJar._cookie_attrs()).  By "cookie-attribute" I mean a
string of the form "=", i.e. the same thing as represented by
instances of Cookie.Morsel .

AFAIK (not 100% sure here) when several cookies are returned, none of the
cookie standards defines which cookie servers should or should not look
at, so Cookie.py should probably make all of the cookies available through
some interface.  If it chooses to only provide one cookie (as it does), it
would seem that a good choice would be the first cookie in the string
passed to .load(), since that should be the one with the longest path. 
Cookie.py instead takes the last cookie (probably by accident).  That's
not good, but I'm unsure whether it should be changed, since it may break
old code.

I'm puzzled by Cookie.py's design: First, poor naming: BaseCookie (and
therefore a SimpleCookie instance) seems to represent multiple HTTP
cookies.  Second, BaseCookie.load(string) treats attributes like "path"
specially, and I do not understand why.  The documentation says you're
intended to pass the value of HTTP_COOKIE to that string, but AFAICS, if
the client obeys any of the cookie protocols (either the de facto Netscape
protocol or any of the RFCs) then HTTP_COOKIE should never contain a string
like "; path=x", where x is replaced by any arbitrary string (assuming here
that HTTP_COOKIE is always simply the value of the HTTP header named
"Cookie", and for simplicity that there are no quoted strings in the
Cookie header).  Third, BaseCookie does not allow storing several cookies
of the same name.  As I understand it, this last problem is the one
valankar was complaining about.

I've always found cookies highly confusing, I must say, so it's always
possible I've got something mixed up by now... but I don't think so.


--

Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 12:44

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

I fail to see the bug. Where in the spec does it say that the first value
should be used? On the contrary, the spec seems to say that the last value
should be used:

# Instances of the same path and name will overwrite each other, 
# with the latest instance taking precedence.

So if that's what the current module does, there is no bug.


[ python-Bugs-1607951 ] mailbox.Maildir re-reads directory too often

2006-12-03 Thread SourceForge.net
Bugs item #1607951, was opened at 2006-12-03 18:28
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=1607951&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.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Matthias Klose (doko)
Assigned to: Nobody/Anonymous (nobody)
Summary: mailbox.Maildir re-reads directory too often

Initial Comment:
[forwarded from http://bugs.debian.org/401395]

Various functions in mailbox.Maildir call self._refresh, which always re-reads 
the cur and new directories with os.listdir.  _refresh should stat each of the 
two directories first to see if they changed.  This cuts processing time of a 
series of lookups down by a factor of the number of messages in the folder, a 
potentially large number.


--

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



[ python-Bugs-1606092 ] csv module broken for unicode

2006-12-03 Thread SourceForge.net
Bugs item #1606092, was opened at 2006-11-30 08:46
Message generated for change (Comment added) made by montanaro
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1606092&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: Unicode
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: JettLogic (jettlogic)
Assigned to: Nobody/Anonymous (nobody)
Summary: csv module broken for unicode

Initial Comment:
The csv module does not accept data to write/read as anything other than 
ascii-or-utf-8 str, and the do-it-yourself example in the Python 2.5 Manual to 
write in another encoding is extremely clunky: 

1) convert unicode to utf-8
2) use csv on utf-8 with cStringIO output
3) convert utf-8 to unicode
4) convert unicode to target encoding (may be utf-8...)

So clunky as to be a bug - csv clearly can't handle unicode at all.  The module 
functions are in dire need of either accepting unicode objects (letting the 
output stream worry about the encoding, like codecs.StreamWriter), or at the 
very least accepting data directly in a target encoding instead of roundabout 
utf-8.

To read another encoding is a bit less onerous than writing:

1) wrap file to return utf-8
2) use csv, getting utf-8 output
3) convert utf-8 to unicode object

Anyone willing to fix the csv module?

--

>Comment By: Skip Montanaro (montanaro)
Date: 2006-12-03 12:22

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

I must admit I don't understand the criticism of the UnicodeReader and
UnicodeWriter example classes in the module documentation.  Sure, their
implementations jump through some hoops, but that's so you don't have to. 
If you use them as written I believe their API's should be about the same
as the csv.reader and csv.writer classes with the added improvement that
the reader returns Unicode and the writer accepts Unicode.  If your desire
is to read and write Unicode why do you care that those objects are encoded
using utf-8 in the file?

Like Martin asked, are you willing to come up with better examples? 
Better yet, are you willing to provide a patch for the underlying
extension module so it handles Unicode?  Hint: I'm fairly certain that if
it was trivial it would have been done by now.


--

Comment By: M.-A. Lemburg (lemburg)
Date: 2006-12-03 06:54

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

It should be easy to provide a wrapper class which implements the above in
plain Python.

However, if noone volunteers to write such code, it's not going to happen.


I've found that the builtin csv module is not flexible enough to deal with
the often broken CSV data you typically find in practice, so perhaps adding
a pure Python implementation which works with Unicode might prove to be a
better approach.

Unassigning the report, since I don't have time for this.


--

Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 04:34

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

Are you willing to fix it?

--

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



[ python-Bugs-1607759 ] segfault in python24.dll

2006-12-03 Thread SourceForge.net
Bugs item #1607759, was opened at 2006-12-03 10:18
Message generated for change (Comment added) made by etaoinbe2
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1607759&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: joe (etaoinbe2)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in python24.dll

Initial Comment:
In my app that uses wxpython2.7 extensively I get regularly following segfault 
(null pointer exception): 

AppName: python.exe  AppVer: 0.0.0.0 ModName: python24.dll
ModVer: 2.4.150.1012 Offset: 00030f33

I have been unable to pinpoint it to a certain location of the program. :( 



--

>Comment By: joe (etaoinbe2)
Date: 2006-12-03 18:42

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

I have vs7.0 & 6.0
7.0 does not accept 7.1 project files
so try with 6.0 : 
Configuration: pythoncore - Win32
Debug
Build : warning : failed to (or don't know how to) build
'C:\Python-2.5\Modules\structmodule.c'
Compiling...
exceptions.c
fatal error C1083: Cannot open source file:
'C:\Python-2.5\Python\exceptions.c': No such file or directory
md5c.c
fatal error C1083: Cannot open source file:
'C:\Python-2.5\Modules\md5c.c': No such file or directory
structmodule.c
fatal error C1083: Cannot open source file:
'C:\Python-2.5\Modules\structmodule.c': No such file or directory
Error executing cl.exe.

python25_d.dll - 3 error(s), 1 warning(s)

Those files are really not there ? So how shall I proceed ?


--

Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 13:56

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

For a debug build, you need debug versions of everything, including
wxPython.

If you have VS.NET 2003 or 2005, you should be able to produce such
binaries yourself. For Python, you need to follow the instructions in
PCBuild/readme.txt. I don't know how wxPython is built.

You might also be successful with creating a release build that has debug
information enabled; in that case, it is sufficient to rebuild Python.

--

Comment By: joe (etaoinbe2)
Date: 2006-12-03 13:10

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

I have tried to insulate the problem to a particular part of the code but
that did not work out. I have currently no small program that shows this
only the complete integrated app shows this. 

If you have a build with assembler listings enabled then you might be able
to find where that address is ? 

Or can I get a debugbuild so that a meaningfull stacktrace can be
produced?

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-12-03 10:36

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

AFAICT, this might be a bug in wxpython also, or in some other extension
module you are using.

Can you give any example code that allows to reproduce the crash? Without
that, there is little chance that the problem can be fixed.

--

Comment By: joe (etaoinbe2)
Date: 2006-12-03 10:25

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

this is on windows, the faulting address is always the same

--

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



[ python-Bugs-1607759 ] segfault in python24.dll

2006-12-03 Thread SourceForge.net
Bugs item #1607759, was opened at 2006-12-03 10:18
Message generated for change (Comment added) made by etaoinbe2
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1607759&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: joe (etaoinbe2)
Assigned to: Nobody/Anonymous (nobody)
Summary: segfault in python24.dll

Initial Comment:
In my app that uses wxpython2.7 extensively I get regularly following segfault 
(null pointer exception): 

AppName: python.exe  AppVer: 0.0.0.0 ModName: python24.dll
ModVer: 2.4.150.1012 Offset: 00030f33

I have been unable to pinpoint it to a certain location of the program. :( 



--

>Comment By: joe (etaoinbe2)
Date: 2006-12-03 18:59

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

It is a real pity open source software requires closed source compilers !

trying to build with 7.0 gives:

-- Build started: Project: pythoncore, Configuration: Debug Win32
--

Compiling...
zipimport.c
yuvconvert.c
xxsubtype.c
weakrefobject.c
unicodeobject.c
unicodectype.c
typeobject.c
tupleobject.c
traceback.c
tokenizer.c
timemodule.c
threadmodule.c
thread.c
sysmodule.c
symtablemodule.c
symtable.c
structseq.c
structmember.c
stropmodule.c
stringobject.c
sliceobject.c
signalmodule.c
shamodule.c
sha512module.c
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2146: syntax error :
missing ')' before identifier 'L'
\Python-2.5\Modules\sha512module.c(146) : error C2144: syntax error :
'' should be preceded by ''
\Python-2.5\Modules\sha512module.c(146) : error C2144: syntax error :
'' should be preceded by ''
\Python-2.5\Modules\sha512module.c(146) : error C2143: syntax error :
missing ')' before 'identifier'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(146) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2146: syntax error :
missing ')' before identifier 'L'
\Python-2.5\Modules\sha512module.c(159) : error C2144: syntax error :
'' should be preceded by ''
\Python-2.5\Modules\sha512module.c(159) : error C2144: syntax error :
'' should be preceded by ''
\Python-2.5\Modules\sha512module.c(159) : error C2143: syntax error :
missing ')' before 'identifier'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2146: syntax error :
missing ')' before identifier 'L'
\Python-2.5\Modules\sha512module.c(159) : error C2144: syntax error :
'' should be preceded by ''
\Python-2.5\Modules\sha512module.c(159) : error C2144: syntax error :
'' should be preceded by ''
\Python-2.5\Modules\sha512module.c(159) : error C2143: syntax error :
missing ')' before 'identifier'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Python-2.5\Modules\sha512module.c(159) : error C2059: syntax error : 'bad
suffix on number'
\Pyth

[ python-Bugs-1603527 ] Python socket library confused by IPV6 notation in /etc/host

2006-12-03 Thread SourceForge.net
Bugs item #1603527, was opened at 2006-11-27 05:43
Message generated for change (Comment added) made by rjbsourceforge
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1603527&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: Eric S. Raymond (esr)
Assigned to: Nobody/Anonymous (nobody)
Summary: Python socket library confused by IPV6 notation in /etc/host

Initial Comment:
Robert J.Berger <[EMAIL PROTECTED]> reported this on the gpsd-dev mailing list 
of the GPSD project.

"Until I changed the line in /etc/hosts from:

::1localhost.localdomain   localhost

to:

127.0.0.1   localhost.localdomain   localhost

the gps.py [library distributed by the GPSD project] would fail when trying to 
open the socket connection to gpsd:

   File "/usr/local/bin/spGps.py", line 198, in __init__
 self.connect(host, port)
   File "/usr/local/bin/spGps.py", line 237, in connect
 raise socket.error, msg
socket.error: (111, 'Connection refused')

This is with Python 2.4.4 under Red Hat Linux, kernel version not reported.

Robert believes, and I concur, that this is not a GPSD bug.  Rather, something 
lower-level -- possibly the Python socket library, possibly some C library it 
uses -- is having indigestion on the IPV6 notation.


--

Comment By: Robert J. Berger (rjbsourceforge)
Date: 2006-12-03 20:15

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

I will try to get a simple example that reproduces it. Unfortunately I
don't have access to the system that was doing it today. I will try to get
something in the bug report in the next day or so.

But basically if /etc/hosts had localhost defined as ::1 the connect
method failded, when I set localhost to 127.0.0.1 the connect worked.

Other non-python (c++) processes were able to access the socket when
localhost was set to ::1

This was on Fedora Core 6 with the latest patches at that time.


--

Comment By: Eric S. Raymond (esr)
Date: 2006-12-01 22:18

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

>Are you sure this isn't a local misconfiguration?

I'm not.  I didn't see it happen. I suggest you email Mr. Berger and ask
him.


--

Comment By: Jp Calderone (kuran)
Date: 2006-12-01 21:10

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

This seems to work fine for me:

>>> s = socket.socket(socket.AF_INET6)
>>> s.bind(('ip6-localhost', 8091))
>>> s.getsockname()
('::1', 8091, 0, 0)
>>> 

[EMAIL PROTECTED]:~$ grep ip6-localhost /etc/hosts
::1 ip6-localhost ip6-loopback
[EMAIL PROTECTED]:~$ 

Are you sure this isn't a local misconfiguration?  Perhaps gpsd isn't
listening on ::1, only 127.1?


--

Comment By: Eric S. Raymond (esr)
Date: 2006-11-29 21:35

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

host is 'localhost'
port is 2947

What's going on here is that gps.py is a Python client module for a local
daemon that monitors GPS devices on the host's serial and USB ports and
presents output on port 2947.  While it is possible to use gps.py to
monitor a remote host, Berger wasn't doing that. The socket module threw
an error while attempting to connect to localhost.




--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-29 21:18

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

Can you please report the values of "host" and "port" when that error is
raised?

--

Comment By: Eric S. Raymond (esr)
Date: 2006-11-27 06:03

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

Berger reports the kernel is 2.6.18.  Fedora Core 6.


--

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



[ python-Bugs-1602378 ] Incorrect docs for bisect_left

2006-12-03 Thread SourceForge.net
Bugs item #1602378, was opened at 2006-11-24 09:07
Message generated for change (Comment added) made by eloff
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1602378&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.5
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Daniel Eloff (eloff)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Incorrect docs for bisect_left

Initial Comment:
Quote:
Return the index where to insert item x in list a, assuming a is sorted.

The return value i is such that all e in a[:i] have e < x, and all e in a[i:] 
have e >= x.  So if x already appears in the list, i points just before the 
leftmost x already there.

The last sentence is incorrect, and it contradicts what comes earlier. Not 
knowing which is correct, I had to test it in the shell.

>>> from bisect import *
>>> l = [1,2,3,3,3,4,5]
>>> bisect_left(l,3)
2
>>> l[2:]
[3, 3, 3, 4, 5]

It should be changed to read "i points at the leftmost x already there"

-Dan

--

>Comment By: Daniel Eloff (eloff)
Date: 2006-12-03 14:39

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

That makes more sense, but if that's explained anywhere it was hidden away
where I've never discovered it. I would be in favor of you're suggested fix
to the line in question.

-Dan

--

Comment By: Tim Peters (tim_one)
Date: 2006-11-24 11:16

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

The docs are written from the POV that indices in Python point /between/
array elements, which is the easiest way to understand slices, and that
there are n+1 non-negative indices that "make obvious sense" in slices of
a sequence with n elements:  index 0 points "just before" element a[0],
and index n "just after" element a[n-1], while for 0 < i < n-1, index i
points "just before" element [i] /and/ "just after" element a[i-1].

This is also the sanest way to understand the return value of the bisect
functions, which again can return n+1 values given a sequence with n
elements.

That said, I agree the docs are cryptic if you don't understand that
first.  I'm not sure this is the best place to explain it.  The specific
line in question could be "repaired" by saying a[i] is the leftmost x
already there, identifying one of the n elements instead of one of the n+1
sequence positions.

--

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



[ python-Bugs-1579931 ] not configured for tk

2006-12-03 Thread SourceForge.net
Bugs item #1579931, was opened at 2006-10-18 11:59
Message generated for change (Comment added) made by sf-robot
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1579931&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: Demos and Tools
Group: Python 2.4
>Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Carl Wenrich (carlwenrich)
Assigned to: Nobody/Anonymous (nobody)
Summary: not configured for tk

Initial Comment:
When I try to run the sample tkinter script (hello.py)
I get a message saying my python isn't configured for tk.

--

>Comment By: SourceForge Robot (sf-robot)
Date: 2006-12-03 19:20

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

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

--

Comment By: Borisov Michael (nironius)
Date: 2006-11-19 02:39

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

You must install Tk libraries for working

--

Comment By: Borisov Michael (nironius)
Date: 2006-11-19 02:39

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

You must install Tk libraries for working

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-10-18 14:06

Message:
Logged In: YES 
user_id=21627

Why do you think this is a bug? What operating system are
you using, and where do your Python binaries come from?

--

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



[ python-Bugs-1579931 ] not configured for tk

2006-12-03 Thread SourceForge.net
Bugs item #1579931, was opened at 2006-10-18 11:59
Message generated for change (Comment added) made by carlwenrich
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1579931&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: Demos and Tools
Group: Python 2.4
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Carl Wenrich (carlwenrich)
Assigned to: Nobody/Anonymous (nobody)
Summary: not configured for tk

Initial Comment:
When I try to run the sample tkinter script (hello.py)
I get a message saying my python isn't configured for tk.

--

>Comment By: Carl Wenrich (carlwenrich)
Date: 2006-12-03 19:23

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

just found out i didn't have the DEVELOPMENT libraries for tcl and tk. got
them. it works now.

--

Comment By: SourceForge Robot (sf-robot)
Date: 2006-12-03 19:20

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

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

--

Comment By: Borisov Michael (nironius)
Date: 2006-11-19 02:39

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

You must install Tk libraries for working

--

Comment By: Borisov Michael (nironius)
Date: 2006-11-19 02:39

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

You must install Tk libraries for working

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-10-18 14:06

Message:
Logged In: YES 
user_id=21627

Why do you think this is a bug? What operating system are
you using, and where do your Python binaries come from?

--

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