Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Klara compatible with Python3 / replace torndb module #31

Open
Nono-m0le opened this issue Jul 20, 2023 · 3 comments
Open

Make Klara compatible with Python3 / replace torndb module #31

Nono-m0le opened this issue Jul 20, 2023 · 3 comments

Comments

@Nono-m0le
Copy link
Contributor

Is your feature request related to a problem? Please describe.

As python2 reaching end of life. I tried to upgrade my system, which doesn't come with python2 anymore.
My first attempt to manual install python2 (and especially the mysql module) failed, so I start digging if a transition to python3 wasn't going to be more straight forward.

I endup on a dead-end because (at least) the dispachter use the "tornado" and "torndb" module which isn't supported anymore.

Even though they still exists:

$ python3 --version
Python 3.10.6

$ python3 -m pip list | grep torn
tornado                6.3.2
torndb                 0.3

$ ./klara-dispatcher
Traceback (most recent call last):
  File "/dispatcher/./klara-dispatcher", line 9, in <module>
    import torndb
  File "/.local/lib/python3.10/site-packages/torndb.py", line 260, in <module>
    CONVERSIONS[field_type] = [(FLAG.BINARY, str)] + CONVERSIONS[field_type]
TypeError: can only concatenate list (not "type") to list

Thus the question, would it be possible to port the project to python3 using "recent" or at least still maintain library ?

Maybe tornado/torndb aren't the only one who'll need a rewrite.

@Nono-m0le Nono-m0le changed the title Make Klara compatible with Python3 / replace tornado module Make Klara compatible with Python3 / replace torndb module Jul 20, 2023
@xdanx
Copy link
Member

xdanx commented Jul 20, 2023

Hey!

Thanks for the feedback. Yes, I 100% agree with you. torndb module needs replacement. They specify in their code that torndb is not compatible with Python 3.

Indeed, this is an issue I have to handle soon.

I'll add it to my todo list with priority.

@Nono-m0le
Copy link
Contributor Author

It turns out, making it run (without error, maybe not on an ideal way) is straight forward.
The bigger part turns out to be moving the web app code from CodeIgniter 3 to CodeIgniter4 in order to support PHP8.

Do you have any ETA for this @xdanx ?

@Nono-m0le
Copy link
Contributor Author

Hi @xdanx as you may have seen, I've created a PR for the "migration" to python2 to python3 (it's more a wrapper of the turndb module), you can see it here : #32

I'm still very interesting to know the future for the project to support PHP8. Would it be an upgrade of CI3 or migration to CI4 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants