castro icon indicating copy to clipboard operation
castro copied to clipboard

Support Python 3

Open VanDavv opened this issue 7 years ago • 11 comments

Just instaled castro in my project, where I use python 3.6 and got following error

Traceback (most recent call last): File "/usr/local/lib/python3.6/unittest/loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "/usr/local/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name import(name) File "/app/src/test_auth.py", line 1, in from .base import SeleniumTestCase File "/app/src/base.py", line 9, in from castro import Castro File "/usr/local/lib/python3.6/site-packages/castro/init.py", line 110 print "Running ffmpeg: encoding and creating keyframes" ^ SyntaxError: Missing parentheses in call to 'print'

This is obviously python2 syntax, it would be nice to have a package that uses python 3

VanDavv avatar Jul 07 '17 08:07 VanDavv

@VanDavv @hugs i'd happy to help here.

saily avatar Jul 28 '17 07:07 saily

SyntaxError: Missing parentheses in call to 'print'

This is exactly what happened to me. I edited the file where the problem occurred, but after doing so the chain continues

Traceback (most recent call last): File "bot.py", line 9, in <module> from castro import Castro File "/usr/local/lib/python3.6/site-packages/castro/__init__.py", line 10, in <module> import lib.messageboard as mb ModuleNotFoundError: No module named 'lib'

Obviously, some refactoring required for python 3. Why is this package available for install if it uses python 2 syntax? Why using python 2 syntax if python 3 syntax is reverse compatible?

stivens13 avatar Sep 25 '17 22:09 stivens13

I had the same issues reported above. It'd be awesome to have the porting of this library to python3.

antedesk avatar Oct 12 '17 09:10 antedesk

This fork should have python3 supported - https://github.com/emazzotta/castro

VanDavv avatar Oct 13 '17 09:10 VanDavv

@hugs do you still maintain the project? if we put effort on this, do you accept merge requests, or should we fork it as @VanDavv already pointed out.

saily avatar Oct 13 '17 10:10 saily

It is recommended to use xvfbwrapper.

holdlg avatar Aug 30 '18 05:08 holdlg

Sorry but this does not anser the question. Was there an official message from castro maintainers? I would prefer and contribute porting castro to py3 as xvfbwrapper does not provide features as screen recording.

saily avatar Aug 31 '18 05:08 saily

This diff has everything in place to support python3. I suggest we should create casto3 project where all the codebase would be copied and this commit from @critiqueit would be cherry-picked.

This way we can resurrect this abandoned library, as I assume from the inactivity of it's contributors it is

VanDavv avatar Aug 31 '18 06:08 VanDavv

This diff has everything in place to support python3. I suggest we should create casto3 project where all the codebase would be copied and this commit from @critiqueit would be cherry-picked.

This way we can resurrect this abandoned library, as I assume from the inactivity of it's contributors it is

Has anything been done in this direction?

philall avatar Mar 05 '19 10:03 philall

/ping @hugs could you please comment on this before @philall is going to (hopefully) fork (and not copying) it.

saily avatar Mar 05 '19 14:03 saily

Bad news, It does not support Python3 yet.

2Niu avatar Mar 29 '19 07:03 2Niu