[issue1289] Typo in Context Manager Types

2007-10-17 Thread Nathan Haines

New submission from Nathan Haines:

In the first sentence in the ContextManager.__exit__() section,
"exception" is spelled "expection".

--
components: Documentation
messages: 56510
nosy: nhaines
severity: normal
status: open
title: Typo in Context Manager Types
type: rfe
versions: Python 2.5, Python 2.6, Python 3.0

__
Tracker <[EMAIL PROTECTED]>

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



[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Sharmila Sivakumar

New submission from Sharmila Sivakumar:

I try to load the data in the testdata.txt file into a dom.

I tried 
import xml.dom.minidom as dom
data = open('testdata.txt','r').read()
mydom = dom.parseString(data)
I get the following error

>>> mydom.firstChild.childNodes
Traceback (most recent call last):
  File "", line 1, in 
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2022' in 
position 18: ordinal not in range(128)


So I tried decoding the data and using it but it failed again.

>>> mydom2 = dom.parseString(data.decode('utf-8'))
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/site-packages/_xmlplus/dom/minidom.py", line 
1925, in parseString
return expatbuilder.parseString(string)
  File "/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py", 
line 942, in parseString
return builder.parseString(string)
  File "/usr/lib/python2.5/site-packages/_xmlplus/dom/expatbuilder.py", 
line 223, in parseString
parser.Parse(string, True)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u014d' in 
position 173: ordinal not in range(128)


I am willing to fix this myself if I'm given the permission.

--
components: Interpreter Core, Unicode, XML
files: testdata.txt
messages: 56511
nosy: sharmila
severity: normal
status: open
title: xml.dom.minidom not able to handle utf-8 data
type: compile error
versions: Python 2.5
Added file: http://bugs.python.org/file8558/testdata.txt

__
Tracker <[EMAIL PROTECTED]>

__noun
 Etymology: Middle English, from Anglo-French dragun, from 
Latin dracon-, draco serpent, dragon, from Greek drakōn serpent; 
akin to Old English torht bright, Greek derkesthai to see, look 
at
 Date: 13th century
 1. archaic  a huge serpent
 2.  a mythical animal usually represented as a monstrous 
winged and scaly serpent or saurian with a crested head and enormous 
claws
 3.  a violent, combative, or very strict person
 4. capitalized  Draco
 5.  something or someone formidable or baneful
 • dragonish adjective
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1580738] httplib hangs reading too much data

2007-10-17 Thread Facundo Batista

Facundo Batista added the comment:

Fixed in rev 58530 (also added a test case)

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

_
Tracker <[EMAIL PROTECTED]>

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



[issue1289] Typo in Context Manager Types

2007-10-17 Thread Facundo Batista

Facundo Batista added the comment:

Where this happens? In the documentation? In the PEP? Do you have the
URL where you found this?

--
nosy: +facundobatista

__
Tracker <[EMAIL PROTECTED]>

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



[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Facundo Batista

Facundo Batista added the comment:

Downloaded the testdata.txt file, and yes, it's UTF-8:

[EMAIL PROTECTED]:~/devel$ file testdata.txt 
testdata.txt: UTF-8 Unicode text

But I opened it perfectly!

Python 2.5.1 (r251:54863, May  2 2007, 16:56:35) 
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.dom.minidom as dom
>>> data = open('testdata.txt','r').read()
>>> mydom = dom.parseString(data)
>>> mydom

>>> 

In which platform you're working?

And yes, you have absolute permission to fix it, patchs are always welcomed!

--
nosy: +facundobatista
resolution:  -> works for me
status: open -> closed

__
Tracker <[EMAIL PROTECTED]>

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



[issue1289] Typo in Context Manager Types

2007-10-17 Thread Nathan Haines

Nathan Haines added the comment:

This typo is in the Python Library Reference manual, section 3.10, for
versions 2.5, 2.6, and 3.0.

__
Tracker <[EMAIL PROTECTED]>

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



[issue1289] Typo in Context Manager Types

2007-10-17 Thread Facundo Batista

Facundo Batista added the comment:

Fixed in rev 58531.

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

__
Tracker <[EMAIL PROTECTED]>

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



[issue1631171] implement warnings module in C

2007-10-17 Thread Neal Norwitz

Neal Norwitz added the comment:

I think this is good enough for now.  The approach will probably stand
even if the details change.  Go for it!

_
Tracker <[EMAIL PROTECTED]>

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



[issue1631171] implement warnings module in C

2007-10-17 Thread Neal Norwitz

Changes by Neal Norwitz:


--
assignee: nnorwitz -> brett.cannon

_
Tracker <[EMAIL PROTECTED]>

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



[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Sharmila Sivakumar

Sharmila Sivakumar added the comment:

Thanks for your quick response Facundo.

I'm working on Ubuntu 7.04, python 2.5.1
Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2

This error occurs when the default encoding is 'ascii'.  When I change the
default encoding to 'utf-8' it works for me too.  Is, by any chance, your
default encoding 'utf-8'?

On 10/18/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
>
>
> Facundo Batista added the comment:
>
> Downloaded the testdata.txt file, and yes, it's UTF-8:
>
> [EMAIL PROTECTED]:~/devel$ file testdata.txt
> testdata.txt: UTF-8 Unicode text
>
> But I opened it perfectly!
>
> Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import xml.dom.minidom as dom
> >>> data = open('testdata.txt','r').read()
> >>> mydom = dom.parseString(data)
> >>> mydom
> 
> >>>
>
> In which platform you're working?
>
> And yes, you have absolute permission to fix it, patchs are always
> welcomed!
>
> --
> nosy: +facundobatista
> resolution:  -> works for me
> status: open -> closed
>
> __
> Tracker <[EMAIL PROTECTED]>
> 
> __
>

Added file: http://bugs.python.org/file8559/unnamed

__
Tracker <[EMAIL PROTECTED]>

__Thanks for your quick response Facundo.I'm working on Ubuntu 7.04, 
python 2.5.1 Python 2.5.1 (r251:54863, May  2 2007, 16:56:35) [GCC 
4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2This error occurs when the 
default encoding is 'ascii'.  When I change the default encoding 
to 'utf-8' it works for me too.  Is, by any chance, your default 
encoding 'utf-8'?
On 10/18/07, Facundo Batista [EMAIL PROTECTED]> wrote:
Facundo Batista added the comment:Downloaded the testdata.txt file, 
and yes, it's UTF-8:[EMAIL PROTECTED]:~/devel$ file 
testdata.txttestdata.txt: UTF-8 Unicode textBut I opened it 
perfectly!
Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)[GCC 
4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2Type "help", 
"copyright", "credits" or "license" for more 
information.
>>> import xml.dom.minidom as dom>>> data = 
open('testdata.txt','r').read()>>> mydom = 
dom.parseString(data)>>> mydom
>>>In which platform you're working?And yes, 
you have absolute permission to fix it, patchs are always 
welcomed!--nosy: 
+facundobatistaresolution:  -> works for me
status: open -> 
closed__Tracker [EMAIL PROTECTED]>http://bugs.python.org/issue1290
>__

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



[issue1290] xml.dom.minidom not able to handle utf-8 data

2007-10-17 Thread Sharmila Sivakumar

Sharmila Sivakumar added the comment:

Oops Facundo, that will work.   It actually fails *
after the dom construction* when you do

mydom.firstChild.childNodes

I request you to try it again.

The prob is there is some encoding and decoding done within the parser, and
it uses the default encoding 'ascii'.  This fails for utf-8 data.

On 10/18/07, Sharmila Sivakumar <[EMAIL PROTECTED]> wrote:
>
>
> Sharmila Sivakumar added the comment:
>
> Thanks for your quick response Facundo.
>
> I'm working on Ubuntu 7.04, python 2.5.1
> Python 2.5.1 (r251:54863, May 2 2007, 16:56:35)
> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
>
> This error occurs when the default encoding is 'ascii'.  When I change the
> default encoding to 'utf-8' it works for me too.  Is, by any chance, your
> default encoding 'utf-8'?
>
> On 10/18/07, Facundo Batista <[EMAIL PROTECTED]> wrote:
> >
> >
> > Facundo Batista added the comment:
> >
> > Downloaded the testdata.txt file, and yes, it's UTF-8:
> >
> > [EMAIL PROTECTED]:~/devel$ file testdata.txt
> > testdata.txt: UTF-8 Unicode text
> >
> > But I opened it perfectly!
> >
> > Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)
> > [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import xml.dom.minidom as dom
> > >>> data = open('testdata.txt','r').read()
> > >>> mydom = dom.parseString(data)
> > >>> mydom
> > 
> > >>>
> >
> > In which platform you're working?
> >
> > And yes, you have absolute permission to fix it, patchs are always
> > welcomed!
> >
> > --
> > nosy: +facundobatista
> > resolution:  -> works for me
> > status: open -> closed
> >
> > __
> > Tracker <[EMAIL PROTECTED]>
> > 
> > __
> >
>
> Added file: http://bugs.python.org/file8559/unnamed
>
> __
> Tracker <[EMAIL PROTECTED]>
> 
> __
>

Added file: http://bugs.python.org/file8560/unnamed

__
Tracker <[EMAIL PROTECTED]>

__Oops Facundo, that will work.   It actually 
fails after the dom construction when you do 
mydom.firstChild.childNodesI request you to try it 
again.The prob is there is some encoding and decoding done within the 
parser, and it uses the default encoding 'ascii'.  This fails for 
utf-8 data.
On 10/18/07, Sharmila Sivakumar [EMAIL PROTECTED]> wrote:
Sharmila Sivakumar added the comment:Thanks for your quick response 
Facundo.I'm working on Ubuntu 7.04, python 2.5.1Python 2.5.1 
(r251:54863, May 2 2007, 16:56:35)[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4
)] on linux2This error occurs when the default encoding is 
'ascii'.  When I change thedefault encoding to 
'utf-8' it works for me too.  Is, by any chance, 
yourdefault encoding 'utf-8'?
On 10/18/07, Facundo Batista [EMAIL PROTECTED]> wrote:>>> Facundo 
Batista added the comment:>> Downloaded the testdata.txt
 file, and yes, it's UTF-8:>> [EMAIL PROTECTED]:~/devel$ file 
testdata.txt> testdata.txt: UTF-8 Unicode text>> But I 
opened it perfectly!>> Python 2.5.1 (r251:54863, May  2 
2007, 16:56:35)
> [GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2> Type 
"help", "copyright", "credits" or 
"license" for more information.> >>> import 
xml.dom.minidom as dom
> >>> data = 
open('testdata.txt','r').read()> >>> mydom = 
dom.parseString(data)> >>> mydom> 

> > In which platform you're 
working?>> And yes, you have absolute permission to fix it, 
patchs are always> welcomed!>> --> nosy: 
+facundobatista
> resolution:  -> works for me> status: open -> 
closed>> __> Tracker 
[EMAIL PROTECTED]>> <
http://bugs.python.org/issue1290";>http://bugs.python.org/issue1290>>
 __>Added file: http://bugs.python.org/file8559/unnamed";>http://bugs.python.org/file8559/unnamed
__Tracker [EMAIL PROTECTED]>http://bugs.python.org/issue1290>
__

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