-
Notifications
You must be signed in to change notification settings - Fork 8
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
Port to Python 3 #52
Comments
Yeah, up until Thursday the python2 versions of python-requests and python-urllib3 were available on the repository for the release candidate. While the release notes did say that python2 would no longer be installed by default and moved to universe, unfortunately they neglected to mention that they will also be removing some of those key python2 packages from the respository. Until we get a python3 versions of DataTree and tvgrabpyAPI working, here's the .deb packages for python-requests and its dependency python-urllib3 that were available in the release candidate. The rest of the python2 dependencies like python-tz and python-openssl are still available in the repository: Also, if you previously installed it with "python setup.py", you'll have to remove the build folder and redo the install with "python2 setup.py" |
This is work in progress. Most of the code is compatible, but this requires a lot of testing. |
Would it be possible to create a Python 3 branch for testing? Anyways, thanks for the hard work! |
Hi, Tried to do some work as I miss my EPG data 😉 Currently the resulting output is this, not sure yet why it craps out with that last message: |
If you need guide data now and don't have another machine with a working python2 installation to use, install the deb packages for python-requests and python-urllib3 from the zip file I attached in post 2. Since you're on Linux and know how to create your own git fork and commit to it, I'm guessing you already know how to do that, but for anyone else, extract them to a folder, open a terminal and navigate to that folder, and run the following:
If you get an error message about missing dependencies, you'll need to install them first:
If you previously installed tvgrabpyAPI with "python setup.py install", you'll have to remove the build folder and redo the install with "python2 setup.py install" since Focal also removed the /usr/bin/python symlink. |
Hi Kyl, I pushed my latest try with below log results, hope it helps you guys.
|
Yeah, as you saw it's a lot more complicated than just changing references of "python2" to "python3". They changed the capitilazation of several libraries like "Queue" to "queue", and they also changed the parameters of many API calls so some segments of code might need a complete rewrite to reproduce the python2 behavior. This was one of the big reasons why the python team kept python2 alive for an additional 5 years. The original plan was to drop support in 2015, but the changes were just too complex and many key projects weren't ready for python3. Even major projects like GIMP are still using python2 code for some of their plugins. i.e. on Focal if you install gimp-plugin-repository you'll get a bunch of errors in the log because Focal no longer ships gimp-python, and if you install python-is-python3 to create a symlink to python3, you'll get crashes when those plugins attempt to load with python3. |
Yep they made it a serious refactoring job, luckily they have the "2to3" script to help out with a lot of the boring stuff but it's not perfect. But I have good news, I got my fork working. Be warned I'm not a Python expert so I'm sure some things could be done better! 😃 Python 3 branches (I'll send a pull request if you like): Just sudo ./setup install as usual for both projects and all should be fine with Ubuntu 20.04. I tested with TvHeadend and manual: |
I am working on it, but as I had some mayor updates standing on standby, I'm including the jump to python3 into those. Wait 1 or 2 weeks and I'll publish an alfa for both DataTreeGrab and tvgrabpyAPI. |
Hi Hikavdh, thanks for the update. Looking forward to it 👍 |
Hi, any updates on this? |
Op Fedora 32 soortgelijke issues als ik een nieuwere versie uit git wil installeren. |
Even worse than writing in English for a product that has NL in the name: (...) So this must be a grave situation. |
Before I issue an upgrade I do want to incorporate everything I have been developing on a parallel thread. With the present worldwide situation I have a hard time focusing and concentrating on finish this job, so please have patients. By the way, one of our developers is American. He does understand dutch, but give him some courtesy |
Just installed Ubuntu 20.04 in which support for Python 2.x and pip has officially been dropped. Would be great to be able to continue to use tvgrabpyAPI on Python 3.
The text was updated successfully, but these errors were encountered: