Roundup Robot added the comment:
New changeset d3e7aea8a550 by Serhiy Storchaka in branch '2.7':
Issue #11159: SAX parser now supports unicode file names.
http://hg.python.org/cpython/rev/d3e7aea8a550
New changeset d2622ca8493a by Serhiy Storchaka in branch '3.2':
Issue #11159: Add tests for
Serhiy Storchaka added the comment:
Fixed. Thank you for the report.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
Roundup Robot added the comment:
New changeset 706218e0facb by Serhiy Storchaka in branch '2.7':
Fix tests for issue #11159.
http://hg.python.org/cpython/rev/706218e0facb
New changeset a7c074d9cbfb by Serhiy Storchaka in branch '3.2':
Fix tests for issue #11159.
Serhiy Storchaka added the comment:
Yes, this thing was doubted me too. I proceeded from the following
considerations.
1. Often system id is used for file operations and in this case you need to use
the file system encoding. Unfortunately Python 2 does not have
'surrogateescape' handler
Serhiy Storchaka added the comment:
Here is an alternative patch. It doesn't encode system id when it settled,
instead system id attribute can be bytes or an unicode and encoding/decoding
happened only a file opened.
--
Added file:
Changes by Serhiy Storchaka storch...@gmail.com:
Removed file: http://bugs.python.org/file28268/sax_unicode_fn-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
Changes by Serhiy Storchaka storch...@gmail.com:
Added file: http://bugs.python.org/file28268/sax_unicode_fn-2.7.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
Serhiy Storchaka added the comment:
Ported tests for nonascii System-Id on 3.x.
If no one objects I'll commit this next week.
--
Added file: http://bugs.python.org/file28714/sax_unicode_fn-3.x.patch
___
Python tracker rep...@bugs.python.org
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
___
Christian Heimes added the comment:
I don't think that the file system encoding is the correct answer here. AFAIR
expat uses UTF-8 encoded strings. Python 3.x uses PyArg_ParseTupleAndKeywords()
with s which converts PyUnicode to PyBytes with the utf-8 codec.
--
nosy: +christian.heimes
Changes by Sergey Prokhorov sergey.prokho...@gmail.com:
--
nosy: +Sergey.Prokhorov
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
assignee: - serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
___
Serhiy Storchaka added the comment:
However Python doesn't work with bytes filenames (I don't think this is a bug).
The proposed patch allows unicode filenames be used in SAX parser.
--
keywords: +patch
nosy: +serhiy.storchaka
stage: - patch review
Added file:
Changes by Carsten Grohmann carstengrohm...@gmx.de:
--
nosy: +cgrohmann
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
___
Changes by Daniel Urban urban.dani...@gmail.com:
--
type: crash - behavior
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11159
___
___
John Chandler therealmetal...@gmail.com added the comment:
Confirmed about not being an issue in Python 3. Just checked with Python
3.3.0a0 and the example works fine - no exception raised.
--
nosy: +John.Chandler
___
Python tracker
New submission from Rickard Lindberg ricl...@gmail.com:
The error is the following:
Traceback (most recent call last):
File stdin, line 4, in module
File /usr/lib64/python2.7/site-packages/_xmlplus/sax/__init__.py, line
31, in parse
parser.parse(filename_or_stream)
17 matches
Mail list logo