Roundup Robot added the comment:
New changeset 13c1c5e3d2ee by R David Murray in branch '3.4':
#12220: improve minidom error when URI contains spaces.
http://hg.python.org/cpython/rev/13c1c5e3d2ee
New changeset 3e67d923a0df by R David Murray in branch 'default':
Merge: #12220: improve minidom
R. David Murray added the comment:
Thanks, amathew and Marek.
--
resolution: - fixed
stage: needs patch - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12220
Marek Stepniowski added the comment:
I agree that Unsupported syntax is a more accurate message. Changed in the
newest patch.
--
Added file:
http://bugs.python.org/file34866/minidom_space_char_in_namespace_unsupported.patch
___
Python tracker
Marek Stepniowski added the comment:
Added test to amathew's patch.
--
nosy: +mstepniowski
Added file:
http://bugs.python.org/file34819/minidom_space_char_in_namespace_with_test.patch
___
Python tracker rep...@bugs.python.org
R. David Murray added the comment:
Thanks. Could you also change 'Invalid syntax' to 'Unsupported syntax', per
the last bit of the discussion between Terry and I?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12220
R. David Murray added the comment:
Thanks for the patch. It would be nice to have a test before we commit this.
The tests should use assertRaisesRegex to look for something specific to this
error...probably the word 'syntax'...in the error text.
On the other hand, if the spaces are
Terry J. Reedy added the comment:
'unsupported syntax' would be more accurate, but I agree that saying what it is
that is unsupported is even better.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12220
amathew added the comment:
I added a more descriptive error message for invalid namespaces. I agree that
it would be great to eventually move to DOMException's.
--
keywords: +patch
nosy: +amathew
Added file:
http://bugs.python.org/file29812/minidom_space_char_in_namespace.patch
Terry J. Reedy tjre...@udel.edu added the comment:
SyntaxErrors refer to Python syntax errors; they are raised during parsing of
*Python* code. An error in the value given to a Python sensibly raises a
ValueError unless a module does something more specific.
From the xml.dom doc
DOM Level 2
New submission from Herm Fischer fisc...@markv.com:
Minidom raises an exception if there's a space anywhere in the URI of an xmlns,
but it is legal (but terrible practice) to have spaces in URIs. I think this
should work or politely raise a syntax error. E.g., this fails:
Changes by Ned Deily n...@acm.org:
--
stage: - needs patch
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12220
___
___
11 matches
Mail list logo