[issue10205] Can't have two tags with the same QName

2010-11-13 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Thanks for the explanation, Éric. That helps.
- Backported QName tests in r86447 to release31-maint.

As for the logic of the fix, it follows like this:

If True and False:
  #Doesn't go here
elif True:
  # Goes here

vs

if True:
   # Goes here
   if False:
  # Does not matter
elif:
   # Doesn't go here.

--
status: open - closed

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



[issue10205] Can't have two tags with the same QName

2010-11-11 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

3.1 was released before 2.7, so there are some features in 2.7 that aren’t in 
3.1.  Tests are probably candidate for backport.

(BTW, I don’t understand the fix :)  I guess I fail at boolean logic tonight.)

--
nosy: +eric.araujo

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



[issue10205] Can't have two tags with the same QName

2010-11-08 Thread Senthil Kumaran

Senthil Kumaran orsent...@gmail.com added the comment:

Fixed in r86348 for py3k and r86349 for release27-maint.

In release31-maint, I see that there are missing features, like support for 
xml_declaration and default_namespace, which are however available in 
release27-maint. This is not a desirable scenario and I not sure why this 
difference exists. Additionally, the tests in release31-maint are lacking QName 
tests which are present in py3k and release27-maint. 

Only after these changes, can this be backported to release31-maint.

--
assignee:  - orsenthil
resolution:  - fixed
stage:  - committed/rejected
type:  - behavior
versions: +Python 3.2

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



[issue10205] Can't have two tags with the same QName

2010-11-06 Thread Senthil Kumaran

Changes by Senthil Kumaran orsent...@gmail.com:


--
nosy: +orsenthil

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



[issue10205] Can't have two tags with the same QName

2010-10-27 Thread Éric Araujo

Changes by Éric Araujo mer...@netwok.org:


--
nosy: +flox

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



[issue10205] Can't have two tags with the same QName

2010-10-26 Thread Étienne BERSAC

New submission from Étienne BERSAC bersac...@gmail.com:

Hi,

Here is the code to reproduce and the unexcpected behaviour :

21:37:41 bers...@st-francois-de-sales:~/Bureau/$ cat bug.py 
from xml.etree.ElementTree import QName, ElementTree, Element, SubElement
import sys

head = Element(QName('http://www.w3.org/1999/xhtml', 'html'))
SubElement(head, QName('http://www.w3.org/1999/xhtml', 'meta'))
SubElement(head, QName('http://www.w3.org/1999/xhtml', 'meta'))

tree = ElementTree(head)
tree.write(sys.stdout, encoding=utf-8, xml_declaration=True,
   default_namespace='http://www.w3.org/1999/xhtml')
21:38:00 bers...@st-francois-de-sales:~/Bureau/$ python2.7 bug.py 
?xml version='1.0' encoding='utf-8'?
Traceback (most recent call last):
  File bug.py, line 10, in module
default_namespace='http://www.w3.org/1999/xhtml')
  File /usr/lib/python2.7/xml/etree/ElementTree.py, line 812, in write
self._root, encoding, default_namespace
  File /usr/lib/python2.7/xml/etree/ElementTree.py, line 880, in _namespaces
_raise_serialization_error(tag)
  File /usr/lib/python2.7/xml/etree/ElementTree.py, line 1046, in 
_raise_serialization_error
cannot serialize %r (type %s) % (text, type(text).__name__)
TypeError: cannot serialize xml.etree.ElementTree.QName object at 0xb76aa60c 
(type QName)
21:38:01 bers...@st-francois-de-sales:~/Bureau/$ 

Patch is attached.

Regards,
Étienne

--
components: XML
files: python2.7-fix-qname-already-registered.patch
keywords: patch
messages: 119643
nosy: bersace
priority: normal
severity: normal
status: open
title: Can't have two tags with the same QName
versions: Python 2.7
Added file: 
http://bugs.python.org/file19374/python2.7-fix-qname-already-registered.patch

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