Skip to content

Python 3 support #479

Closed
Closed

Description

@davidjb

Are there any plans for this library to look at supporting Python 3? The biggest blocker appears to be the fact that robotframework itself isn't yet Python 3.x compatible (though there is a Py3 fork available on PyPI; robotframework/robotframework#1506).

For this package, though, it looks as though there'd need to some changes around the packaging (ez_setup.py), and minor changes to the syntax (exception handling, printing, relative imports), and the big one -- having a conditional statement in setup.py to choose between robotframework and robotframework-python3; all other dependencies appear Python 3 compatible. With only those changes required, supporting 2.7 and 3.x seems reasonably straightforward, though I'm not intimately familiar with the code base.

Thoughts?

Activity

  1. emanlove commented on Aug 5, 2015

    @emanlove
    Member

    Feel free to submit a pull request. My only concern is that we maintain support for Python 2.7 (and possibly 2.6).

  2. added this to the v1.8 milestone on Aug 14, 2015
  3. pekkaklarck commented on Aug 28, 2015

    @pekkaklarck
    Member

    Python 3 support would be great. I agree with @emanlove that Python 2.7 must be supported also in the future. Python 2.6 is not too much extra work on top of that (as long as dependencies support it) but because it is officially retired I'm not sure is that worth any effort. We haven't yet decided are we going to support it with Robot Framework itself in RF 3.0 anymore.

    Another decision to make is what is minimum Python 3 version to support. I'm thinking about Python 3.3 because it supports u'foo' syntax (PEP-414) that makes it easier to write Python 2 compatible code.

  4. aaltat commented on Aug 28, 2015

    @aaltat
    Contributor

    I guess we should somehow discover the dependencies which each external RF library requires. For Selenium2Library, we depend on decorator, selenium, docutils and RF itself.

    The only external library that does not clearly say it supported 3.X version is docutils, but it claims to be Python 3 compatible. Decorator has best support for Python version, from 2.6 to all the way to 3.5. Selenium also nice support Python 2.6, 2.7, 3.2 and 3.3.

    But I guess that the bottom line is that change for Python 3.X is coming and the RF core them should lead the change and the rest of us will/should follow. So choose wisely. But perhaps this would be place for a wider audience and should be discussed with the whole user group people.

    Personally I have not coded with Python 3.X or read anything that would allow me to form an opinion to any direction from Python 3.X.

    But @zephraph, I think that support for Python 3 requires a major version change, should we change the label to 2.0?

  5. pekkaklarck commented on Aug 28, 2015

    @pekkaklarck
    Member

    In general I think its each projects own decision to select what Python versions they support. The Python world is moving slowly but steadyly towards Python 3 so supporting it is a good idea, but nobody can mandate it. For projects that are used only with Robot Framework supporting Python versions not supported by RF itself doesn't obviously make much sense (unless there is a need to support older RF versions that support older Python versions).

    For Robot Framework core I explained my position already in my previous comment. Here are the main points:

    • RF 3.0 will support Python 3. It will hopefully be releases still this year.
    • There is no plan to drop Python/Jython/IronPython 2.7 support in the foreseeable future.
    • Python 2.6 support will probably be dropped at some point, possibly already in RF 3.0.
    • Python 3.0-3.2 will not be supported because they do not support u'foo' syntax and they have very limited user base.
  6. modified the milestones: , v1.8 on Aug 28, 2015
  7. just-be-dev commented on Aug 28, 2015

    @just-be-dev
    Contributor

    I moved this over to the 2.0 milestone as @aaltat suggested. Hopefully we can synchronize this with RF's 3.0 release.

    As far as what we support, I'm going to follow your lead @pekkaklarck. I think if it's not too much trouble then we should probably try to maintain support for 2.6 though.

  8. aaltat commented on Nov 27, 2015

    @aaltat
    Contributor

    To take more steps towards Python 3 direction, should we first enhance the CI to build with Python 3? When that is done, it would be easier to support and track the progress of Python 3 comparability.

  9. wingyplus commented on Aug 22, 2016

    @wingyplus

    Hi, I interesting this issue. What can I help to make this to done?

  10. aaltat commented on Aug 22, 2016

    @aaltat
    Contributor

    The easiest way is to take part of the code (or all of the code) and make it work with Python 2.7 and Python 3.3. When you are happy with the results, send a pull request with GitHub. The small parts are liked more because it makes the review process easier. Also cleaning the code, to make it more readable is a plus.

  11. wingyplus commented on Aug 24, 2016

    @wingyplus

    Thanks for information. I will python3 on travis first, fix it and send pr.

  12. HelioGuilherme66 commented on Aug 24, 2016

    @HelioGuilherme66
    Member

    That is already fixed in myfork release, PR #562.

  13. aaltat commented on Aug 24, 2016

    @aaltat
    Contributor

    The CI stuff is done by @drobota in the CI branch. He has already done some work for it, which all is not in the CI branch. Therefore you could contact him before doing anything in twice.

  14. wingyplus commented on Aug 24, 2016

    @wingyplus

    @HelioGuilherme66 Great! 👍 I will test it.

    @drobota Can you share progress on ci branch. May I help you?

  15. 8 remaining items

  16. arvk26 commented on Jan 14, 2017

    @arvk26

    When selenium2Library 2.0 is going to release? Any approx date?

  17. aaltat commented on Jan 14, 2017

    @aaltat
    Contributor

    No, not really. It's done without any company support and therefore progress is slow. Pekka is helping a lot, but he also does it in his own time.

    We are also cleaning the code base and making changes to the architecture. This hopefully in the future allows more frequent releases and easier maintenance.

  18. arvk26 commented on Jan 14, 2017

    @arvk26

    I understand. Thanks

  19. pekkaklarck commented on Jan 14, 2017

    @pekkaklarck
    Member

    Yeah, cannot make promises because we have our own jobs, families, etc.. But I hope we get S2L 2.0 w/ Py3 support out in February, latest in March.

  20. Tset-Noitamotua commented on Jan 31, 2017

    @Tset-Noitamotua

    @aaltat you said

    We have spilt this to multiple different issues and therefore closing this one. The Python 3 support should happen in release 2.0 and it should be next release

    Can you add links please. I would like to contribute and trying to figure out where to start.

  21. aaltat commented on Feb 1, 2017

    @aaltat
    Contributor

    There might be something missing but most of the needed improvements should be in issue tracker 2.0 milestone.

  22. Tset-Noitamotua commented on Feb 1, 2017

    @Tset-Noitamotua
  23. vinaybajaj commented on Apr 16, 2017

    @vinaybajaj

    Hi Team,

    Today, i was trying to install Selenium2Library for python 3.X. I go through so many blog and everywhere it is mentioned that it is not compatible with Python3.x. Is there any further updates on new updates of selenium2library?

    Thanks in advance!

  24. aaltat commented on Apr 16, 2017

    @aaltat
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions