PyXML for 2.2

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

PyXML for 2.2

Charlie Groves
Hi,

As of last night, there are only 4 bugtests failing on trunk(for me at
least).  All of them are related to PyXML being absent.  I see there's
been a fair amount of discussion on getting it back into Jython on the
list.  Is anyone still working on it?  If not, does anyone have a
partially completed integration they'd like to send my way?

I'm personally kinda lukewarm on PyXML in general. It seems like if
you want SAX or DOM from Jython you'd be better off using the Java
libraries, and I've found ElementTree more enjoyable than anything
DOM, SAX, StAX or otherwise.  Are there big users of PyXML out there?

Thanks,
Charlie

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Sean McGrath
I spend (slight exaggeration ahead) all day, every day working with XML
in Jython.

I use the Java libs and have never felt the need for PyXML. Xerces-J and
Xalan are excellent.

If ElementTree works with Jython (I've never tried it), then that would
be an excellent choice for a Pythonesque XML interface.

Using Xerces SAX directly from Jython is very simple (and shows off the
magic of Jython very well). Anyone who has to use the DOM probably wraps
it in their own friendly API.

If I had to use something DOM-like I would be inclined to use JDOM or
XOM anyway.

Other than ElementTree, I'm not sure I see anything compelling in the
pure-Python/CPython worlds that isn't available in spades via Java
libraries.

Sean

Charlie Groves wrote:

> Hi,
>
> As of last night, there are only 4 bugtests failing on trunk(for me at
> least).  All of them are related to PyXML being absent.  I see there's
> been a fair amount of discussion on getting it back into Jython on the
> list.  Is anyone still working on it?  If not, does anyone have a
> partially completed integration they'd like to send my way?
>
> I'm personally kinda lukewarm on PyXML in general. It seems like if
> you want SAX or DOM from Jython you'd be better off using the Java
> libraries, and I've found ElementTree more enjoyable than anything
> DOM, SAX, StAX or otherwise.  Are there big users of PyXML out there?
>
> Thanks,
> Charlie
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Jython-dev mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jython-dev
>
>
>  


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Khalid Zuberi
In reply to this post by Charlie Groves
On 8/18/06, Charlie Groves <[hidden email]> wrote:
> and I've found ElementTree more enjoyable than anything
> DOM, SAX, StAX or otherwise.  Are there big users of PyXML out there?
>

Haven't used PyXML, but have been productive with ElementTree and
think it would be a good addition to jython. Apparently the author has
done some work towards a jython version [1], might be worth
approaching him about a potential integration. ElementTree gets into
CPython in the forthcoming 2.5 release i believe.

- kz

[1] http://mail.python.org/pipermail/python-dev/2005-December/058680.html

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Pekka Klärck
In reply to this post by Charlie Groves
Charlie Groves wrote:

> As of last night, there are only 4 bugtests failing on trunk(for me at
> least).  All of them are related to PyXML being absent.  I see there's
> been a fair amount of discussion on getting it back into Jython on the
> list.  Is anyone still working on it?  If not, does anyone have a
> partially completed integration they'd like to send my way?
>
> I'm personally kinda lukewarm on PyXML in general. It seems like if
> you want SAX or DOM from Jython you'd be better off using the Java
> libraries, and I've found ElementTree more enjoyable than anything
> DOM, SAX, StAX or otherwise.  Are there big users of PyXML out there?

I don't currently need PyXML because in our project we wrote a simple
wrapper that uses Python XML modules in CPython and Java XML libraries
in Jython. Having same XML APIs in Jython as in CPython would of course
be very good from the compatibility point of view.

I asked about XML in Jython a year ago [1] and then David Hume answered
[2] and told that he was writing an implementation of the xml.dom using
Java libraries and that he was planning to offer the module later to
Jython team. We used his module in our project then and it worked very
well. If you are interested you may want to contact David for more
information.

[1] http://sourceforge.net/mailarchive/message.php?msg_id=12619393
[2] http://sourceforge.net/mailarchive/message.php?msg_id=12620426

Cheers,
        .peke


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

oti-3
In reply to this post by Charlie Groves
On 8/18/06, Charlie Groves <[hidden email]> wrote:
> Hi,
>
> As of last night, there are only 4 bugtests failing on trunk(for me at
> least).  All of them are related to PyXML being absent.

Hi Charlie,

that is REALLY GREAT news - thanks a lot !

> I see there's
> been a fair amount of discussion on getting it back into Jython on the
> list.  Is anyone still working on it?  If not, does anyone have a
> partially completed integration they'd like to send my way?
>
> I'm personally kinda lukewarm on PyXML in general. It seems like if
> you want SAX or DOM from Jython you'd be better off using the Java
> libraries, and I've found ElementTree more enjoyable than anything
> DOM, SAX, StAX or otherwise.  Are there big users of PyXML out there?

About the PyXML usage, my answer would be about the same as Seans's.

Best wishes,
Oti.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Carlos Quiroz-3
In reply to this post by Charlie Groves
Hi

Though you may have always the choice to use the Java libraries many
python libraries depend on pyXML, for example SOAPpy.
In that sense we ought to have PyXML working in jython even if it is
just a thin wrapper aroud the Java

my 2€c

Carlos

Charlie Groves wrote:

>Hi,
>
>As of last night, there are only 4 bugtests failing on trunk(for me at
>least).  All of them are related to PyXML being absent.  I see there's
>been a fair amount of discussion on getting it back into Jython on the
>list.  Is anyone still working on it?  If not, does anyone have a
>partially completed integration they'd like to send my way?
>
>I'm personally kinda lukewarm on PyXML in general. It seems like if
>you want SAX or DOM from Jython you'd be better off using the Java
>libraries, and I've found ElementTree more enjoyable than anything
>DOM, SAX, StAX or otherwise.  Are there big users of PyXML out there?
>
>Thanks,
>Charlie
>
>-------------------------------------------------------------------------
>Using Tomcat but need to do more? Need to support web services, security?
>Get stuff done quickly with pre-integrated technology to make your job easier
>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>_______________________________________________
>Jython-dev mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/jython-dev
>  
>


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Alan Kennedy-2
In reply to this post by Charlie Groves
[Charlie Groves]
> As of last night, there are only 4 bugtests failing on trunk(for me at
> least).  

Wow, that's good!

 > All of them are related to PyXML being absent.  I see there's
> been a fair amount of discussion on getting it back into Jython on the
> list.  Is anyone still working on it?  If not, does anyone have a
> partially completed integration they'd like to send my way?

I certainly have NOT been working on it.

In relation to DOM, there is already jython/java support in the current
PyXML, in the shape of an adapter library which provides a pythonic API
for common java DOMs.

http://pyxml.cvs.sourceforge.net/pyxml/xml/xml/dom/javadom.py

I submitted a patch a couple of years ago that updated that module to
include JAXP.

http://sourceforge.net/tracker/index.php?func=detail&aid=876821&group_id=12867&atid=312867

As Samuele mentions in relation to that patch, it should really be
submitted to the PyXML project, which is where it belongs.

Really, xml-sig is the place to be discussing these issues, since it is
the pyxml codebase that needs to change, not the jython codebase.

> I'm personally kinda lukewarm on PyXML in general. It seems like if
> you want SAX or DOM from Jython you'd be better off using the Java
> libraries, and I've found ElementTree more enjoyable than anything
> DOM, SAX, StAX or otherwise.  Are there big users of PyXML out there?

I think that most people who use standard SAX and DOM in jython use the
java versions instead: I do so myself.

But it would be nice to be able to write the same code to run on both
cpython and jython.

There are other things that would be nice to integrate. For example, it
would be nice to use the excellent (OM-independent) jaxen.org Xpath
library to implement an Xpath API that is compatible with PyXML xpath api.

I think we would need to be fairly clear on what would achieved by
bringing PyXML up-to-date with the latest jython. Would code that uses
PyXML run seamlessly across cpython and jython? (Excluding 2.2 vs.
2.{3|4|5} differences.) For what components of PyXML? SAX? DOM? Xpath?

Maybe we need a wiki page to discuss what the goals might be?

Regards,

Alan.


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Alan Kennedy-2
In reply to this post by Khalid Zuberi
[Khalid Zuberi]
> Haven't used PyXML, but have been productive with ElementTree and
> think it would be a good addition to jython. Apparently the author has
> done some work towards a jython version [1], might be worth
> approaching him about a potential integration. ElementTree gets into
> CPython in the forthcoming 2.5 release i believe.

Has anyone contacted /F to ask what work might be required to integrate
ElementTree into jython?

Regards,

Alan.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Charlie Groves
In reply to this post by Alan Kennedy-2
On 8/19/06, Alan Kennedy <[hidden email]> wrote:
> [Charlie Groves]
> > As of last night, there are only 4 bugtests failing on trunk(for me at
> > least).
>
> Wow, that's good!

Just to make sure I'm not raising false hopes here, I'm talking about
the Jython bugtests(ie test001.py through test391.py) not the Python
standard library tests in Lib/test.  It's not THAT exciting  :)

> Really, xml-sig is the place to be discussing these issues, since it is
> the pyxml codebase that needs to change, not the jython codebase.

I'd like to figure out what we want in Jython before I start talking
to the PyXML people.  Need to know what to ask them to change first.

> I think we would need to be fairly clear on what would achieved by
> bringing PyXML up-to-date with the latest jython. Would code that uses
> PyXML run seamlessly across cpython and jython? (Excluding 2.2 vs.
> 2.{3|4|5} differences.) For what components of PyXML? SAX? DOM? Xpath?
>
> Maybe we need a wiki page to discuss what the goals might be?

I'd rather keep this on the list for the time being so we can have a
few more eyes watching for bad decisions.  We should definitely write
down whatever we come up with in the wiki though.

Judging from the responses to my initial email, we need to support the
parts of PyXML that made it into Python's Lib directory directly from
Jython.  I think this would handle most of the existing Python code
that uses PyXML.  Looking at the CPython 2.2 Lib directory, this is
xml.dom.domreg, xml.dom.minidom, xml.dom.pulldom, and
xml.sax.saxutils, xml.sax.xmlreader and xml.sax.handler.  It looks
like 2.3 added some stuff to build the dom with expat but exposes the
same functionality, and 2.4 didn't really add anything at all.  Does
this seem like a decent baseline to support?  It leaves out all of the
xpath, xslt, schema and sax2 stuff from the most recent PyXML(and the
expat stuff of course).  It'd be nice to support the more advanced
stuff, but since it's already accessible from Java, until someone
really needs for it in the guise of the PyXML implementation it's just
extra work.

Are there any reason not to sync to the latest PyXML?  Did the
signatures change at all between 2.2 and upwards?  It'd definitely
make getting any changes back into PyXML easier.

Charlie

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Khalid Zuberi
In reply to this post by Alan Kennedy-2
On 8/19/06, Alan Kennedy <[hidden email]> wrote:
> Has anyone contacted /F to ask what work might be required to integrate
> ElementTree into jython?
>

Sent him a note. He gave his permission to forward his reply to the
list, see below. I played with the module a tiny bit and was able to
get an element structure from some test xml data with jython2.2 and
ElementTree 1.2.6. I got some sre error with the jython 2.3 branch,
but maybe i had something setup wrong.

- kz

On 8/21/06, Fredrik Lundh wrote:

> hi khalid,
>
> there's a java treebuilder in the elementlib sandbox, written by Anthony
> Tarlano:
>
> http://svn.effbot.python-hosting.com/stuff/sandbox/elementlib
>
> it was a while since I've looked at it, and (iirc) it needs to be cleaned up a
> little before adding it to the standard ET distribution.  fixes and
> optimizations
> are welcome.
>
> cheers /F

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Charlie Groves
On 8/22/06, Khalid Zuberi <[hidden email]> wrote:
> I got some sre error with the jython 2.3 branch,
> but maybe i had something setup wrong.

sre's broken in 2.3 in a couple places I mentioned in
http://sourceforge.net/mailarchive/forum.php?thread_id=28310582&forum_id=5587.
 Mind sending the error my way so I see if it's broken in a heretofore
unknown way?

Thanks,
Charlie

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev
Reply | Threaded
Open this post in threaded view
|

Re: PyXML for 2.2

Khalid Zuberi
On 8/22/06, Charlie Groves <[hidden email]> wrote:
> On 8/22/06, Khalid Zuberi <[hidden email]> wrote:
> > I got some sre error with the jython 2.3 branch,
> > but maybe i had something setup wrong.
>
> sre's broken in 2.3 in a couple places I mentioned in
> http://sourceforge.net/mailarchive/forum.php?thread_id=28310582&forum_id=5587.
>  Mind sending the error my way so I see if it's broken in a heretofore
> unknown way?
>


Sure, I'll boil it down and put it in a bug report.

- kz

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jython-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jython-dev