1 |
thev00d00 12/08/26 16:16:22 |
2 |
|
3 |
Added: jython-2.5.2-sax-parser-class-not-found.patch |
4 |
Log: |
5 |
Add patch to fix SAXParser ClassNotFoundException #431754 |
6 |
|
7 |
(Portage version: 2.2.0_alpha121/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-java/jython/files/jython-2.5.2-sax-parser-class-not-found.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/files/jython-2.5.2-sax-parser-class-not-found.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/jython/files/jython-2.5.2-sax-parser-class-not-found.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: jython-2.5.2-sax-parser-class-not-found.patch |
16 |
=================================================================== |
17 |
# HG changeset patch |
18 |
# User Alan Kennedy <alan@×××××.com> |
19 |
# Date 1333300584 -3600 |
20 |
# Node ID a972112ac1b155ef41b3f8ce195251bc6cc3ebce |
21 |
# Parent 920a60f5d5b5fdf46f4f26c75cab42e2a671be2f |
22 |
#1537: Fix for classloading issues with MATLAB/OpenJDK |
23 |
|
24 |
diff --git a/Lib/xml/parsers/expat.py b/Lib/xml/parsers/expat.py |
25 |
--- a/Lib/xml/parsers/expat.py |
26 |
+++ b/Lib/xml/parsers/expat.py |
27 |
@@ -47,12 +47,8 @@ from org.xml.sax.helpers import XMLReade |
28 |
from org.xml.sax.ext import DefaultHandler2 |
29 |
|
30 |
# Xerces |
31 |
-try: |
32 |
- # Name mangled by jarjar? |
33 |
- import org.python.apache.xerces.parsers.SAXParser |
34 |
- _xerces_parser = "org.python.apache.xerces.parsers.SAXParser" |
35 |
-except ImportError: |
36 |
- _xerces_parser = "org.apache.xerces.parsers.SAXParser" |
37 |
+_mangled_xerces_parser_name = "org.python.apache.xerces.parsers.SAXParser" |
38 |
+_xerces_parser_name = "org.apache.xerces.parsers.SAXParser" |
39 |
|
40 |
|
41 |
# @expat args registry |
42 |
@@ -88,7 +84,11 @@ class XMLParser(object): |
43 |
"not %s" % type(namespace_separator).__name__) |
44 |
raise TypeError(error) |
45 |
|
46 |
- self._reader = XMLReaderFactory.createXMLReader(_xerces_parser) |
47 |
+ # See http://bugs.jython.org/issue1537 |
48 |
+ try: |
49 |
+ self._reader = XMLReaderFactory.createXMLReader(_mangled_xerces_parser_name) |
50 |
+ except: |
51 |
+ self._reader = XMLReaderFactory.createXMLReader(_xerces_parser_name) |
52 |
|
53 |
if self.namespace_separator is None: |
54 |
try: |