oracle / oracle/graalpython

Support for robotframework

Open
#295 20 comments 0 reactions 1 assignee View on GitHub

@msimacek is already working on this.

Since Nov 4, 2022.

Dominant language
Python
Stars
1.6k
Forks
155
Avg merge
9h 42m
Merged PRs (30d)
36

Description

I would like to start this issue mainly to see interest for the support in robotframework community.

Ever since RoboCon 2021 GraalVM Python was on our radar as potential replacement for Jython. Seems the progress since then was very limited. After talking to @steve-s recently on GeeCon 2022 I understand GraalVM Python developers were not aware of such use-case and that might be the reason why there was minimal progress.

I've tried basically the same as robotframework-after-jython with latest GraalVM 22.3.0

$ python --version
GraalVM Python 3.8.5 (GraalVM CE Native 22.3.0)

$ python -m robot --help
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/vehovsky/playground/graalvm-ce-java11-22.3.0/languages/python/lib-python/3/runpy.py", line 185, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/home/vehovsky/playground/graalvm-ce-java11-22.3.0/languages/python/lib-python/3/runpy.py", line 144, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/home/vehovsky/playground/graalvm-ce-java11-22.3.0/languages/python/lib-python/3/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/__init__.py", line 43, in <module>
    from robot.rebot import rebot, rebot_cli
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/rebot.py", line 45, in <module>
    from robot.run import RobotFramework
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/run.py", line 44, in <module>
    from robot.running.builder import TestSuiteBuilder
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/running/__init__.py", line 104, in <module>
    from .userkeyword import UserLibrary
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/running/userkeyword.py", line 24, in <module>
    from .userkeywordrunner import UserKeywordRunner, EmbeddedArgumentsRunner
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/running/userkeywordrunner.py", line 28, in <module>
    from .timeouts import KeywordTimeout
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/running/timeouts/__init__.py", line 24, in <module>
    from .posix import Timeout
  File "/home/vehovsky/rf/lib/python3.8/site-packages/robot/running/timeouts/posix.py", line 16, in <module>
    from signal import setitimer, signal, SIGALRM, ITIMER_REAL
ImportError: cannot import name 'setitimer' from 'signal' (/home/vehovsky/playground/graalvm-ce-java11-22.3.0/languages/python/lib-python/3/signal.py)

Which I tracked to https://github.com/robotframework/robotframework/issues/4100:

The problem occurs when importing robot.running.timeouts.posix module which shouldn't be imported at all when using Jython.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.