Accessing the latest python libraries when using Jython (Robotframework Maven)

456 views
Skip to first unread message

SeanRF

unread,
Oct 10, 2012, 4:31:35 AM10/10/12
to robotframe...@googlegroups.com

I am using robotframework-maven-plugin which uses Jython version=2.5.1 for running my test cases. My issue is when I try to use different robotframework libraries such the robotframework-requests I get import errors as I believe Jython version=2.5.1 does not have the latest Python libraries required (Python version >= 2.6). I know this as the tests run when I use my installed version of python but do not when I use:

  • maven robotframework:run command or
  • the jybot command.

I would also like to use Curl but Jython version=2.5.1 again does not have the python library I need. I have tried coping over the files needed but this seem like the wrong solution and is very time consuming. It seems I am stuck as I need maven robotframework and this uses Jython to run the test so is there a way that Robotframework Jython can have the latest Python libraries or is there a better approach?

SeanRF

unread,
Oct 11, 2012, 10:55:52 AM10/11/12
to robotframe...@googlegroups.com
A lot of robotframework python libraries required python version 2.6 or greater. Ex: https://github.com/bulkan/robotframework-requests which requires the request python library which requires python version 2.6 as it uses byte and io.

I believe what is required is that the maven-robotframework plug-in needs to be upgraded to Jython 2.7 so that these new python libraries are installed by default.

If or when this is to happen I am not sure about.

Tatu aalto

unread,
Oct 11, 2012, 11:13:29 AM10/11/12
to seanogo...@gmail.com, robotframe...@googlegroups.com

Ugh

One must note that even jython would be updated, you can not use all the python libraries with jython. Currently it is only possible to use libraries, with jython, that are native python libraries. If the python library is not native python library, example like nympy [1], then it can not be run over the jython. I remember reading, from somewhere, that this might change in jython 3.x version but that was just a rumor.

-Tatu

[1] http://numpy.scipy.org/

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/robotframework-users/-/rmntySqDzckJ.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.

Pekka Klärck

unread,
Oct 11, 2012, 6:26:47 PM10/11/12
to seanogo...@gmail.com, robotframe...@googlegroups.com
2012/10/11 SeanRF <seanogo...@gmail.com>:
>
> I believe what is required is that the maven-robotframework plug-in needs to
> be upgraded to Jython 2.7 so that these new python libraries are installed
> by default.

Unfortunately Jython 2.7 hasn't yet been officially released. If
enough people try it out with Robot and report that it works well, we
can consider creating an alternative release of robotframework.jar
(that the maven plugin uses) with the latest Jython 2.7 beta bundled
in.

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

SeanRF

unread,
Oct 12, 2012, 4:41:03 AM10/12/12
to robotframe...@googlegroups.com
Pekka and Tatu, thanks for the updates.

I do not mind adding non native python libraries if it was possible but currently I do not believe this is possible with python 2.5 (as explained above). Am I wrong in this assumption?

One of the main reason I want to change over to having all python libraries instead of some java ones and some python ones is that when tests are run with python they execute immediately versus running them with jython which takes 10 sec every time we kick off a test. 

1) Tatu did you succeed with jython 2.7?

2) Maybe there is another way around the jython delay issue?

3) Do people think there is a demand for the latest jython version?

Sean

Tatu aalto

unread,
Oct 12, 2012, 6:20:00 AM10/12/12
to seanogo...@gmail.com, robotframe...@googlegroups.com

Ugh

1) I have feeling that I did try it locally and it did work. But that was quite long time ago. But it was quite big hassle to get the dev the use correct versions and maven plugging was so easy to use. Which did lead that currently use maven plugging, if it is java based stuff.

-Tatu

--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
Reply all
Reply to author
Forward
0 new messages