You've probably been dreading this question... with Python 2 due to be killed off later this year, and major Linux distributions already dropping support for Python 2, is there a plan to migrate IDJC to Python 3 any time soon?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is PyGTK is not and will not be ported to Python 3. This forces migration to gi which doesn't work properly with Gtk 2 so another forced migration to Gtk 3. This adds up to far more work than IDJC is worth. The Python language specific changes are miniscule in comparison.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there development ongoing? I see some commits the last days.
@Stephen Fairchild : If you need me to test, let me know. I just checked out on the new Branch, but it still needs the Py2 GTK ...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Any news here? I finally managed to get IDJC running on Linux Mint 20 but that wasn't a picnic and sure isn't future proof. Stephen, I realize taking IDJC into the future would be a lot of work. What about some crowd funding to compensate you for your efforts? I'd be sure to chip in.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've started looking at getting IDJC working on Mint 20 with Python3 (not trying to get Python2 installed, actually using pure Python3). I'm making progress. I have very basic functionality working. The big thing I'm finding is how strings are handled in Python 3. From what I'm finding so far, it will be simpler handling strings, but there's a lot of minor changes to do. Once I get something working that I consider stable, I'll share it here (unless Stephen beats me to it)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My impressions also regarding the str vs bytes situation in fact I wouldn't be surprised if this was the only issue. Two choices are to open the pipe to the back end in binary and send non utf8 or open in text mode and send only utf8. I opted for the latter in the python3 branch and stopped at the point where I considered the way forward was to scrub all latin1 support from the idjc codebase cleaning out .encode, .decode, and unicode references on the python directory as well as the streaming format Latin1 options. The reason to keep latin1 around was version 1 of the shoutcast server which is probably unavailable to download anymore as was my impression last I looked.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Would you like me to continue with working on this? I've so far got drag-drop of files working, DnD between the players. I also have the songdb working, but only partially. I haven't quite tracked that problem down yet, but it looks again to be a bytes/string conversion issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just an update for anyone interested. I have the Python3 version almost totally working on Mint 20. It's completely usable, but I have a few minor issues to track down yet. I hope to be able to post patches in a few days. One important note, I've made no attempt to keep Python2 compatibility. I don't see it worth the effort as Py2 is basically dead.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Stephen actually did the start of the conversion to gi.repository. I just finished it. So it's 100% Gtk3. Also in my changes, I made no attempt to keep Python 2 compatibility. Like I used f-strings (where it made sense). The big challenge was handling when to convert bytes/strings. And a lot of little differences between PyGTK and gi.repository.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All your patches are now merged. The python3 branch is now merged into master. libshout-idjc has been updated to version 2.4.5 a little ahead of the official libshout (so it's got some green code in there from upstream I would wager) anyhow, I recommend you update and test this against current idjc master. Moving towards releasing idjc-0.9.0 soon.
🎉
1
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for merging! Do you want me to continue to look at my changes and see if I can refine them? While it works, I think there were a few spots where I could have done it better.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I plan on doing a fresh install on a Mint 20.1 server that has never had IDJC installed on before. I will keep notes of exactly what packages that are needed, and will post the information.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You've probably been dreading this question... with Python 2 due to be killed off later this year, and major Linux distributions already dropping support for Python 2, is there a plan to migrate IDJC to Python 3 any time soon?
The problem is PyGTK is not and will not be ported to Python 3. This forces migration to gi which doesn't work properly with Gtk 2 so another forced migration to Gtk 3. This adds up to far more work than IDJC is worth. The Python language specific changes are miniscule in comparison.
Hi Stephen, thank you for the update. How much money would it take for the port to make IDJC worth it? Thanks :)
Thanks for the clarification.
Could this spell the end of IDJC should Python 2 disappear completely?
Was the work on idjc-x totally unrelated to this?
https://github.com/radiocicletta/idjc-x
It's a bit sad, with distributions going python3 only, and certainly gtk < 3 free, to have to lose idjc in the process!
I just saw the more recent commits, related to pygtk3, that sounds great.
Is there development ongoing? I see some commits the last days.
@Stephen Fairchild : If you need me to test, let me know. I just checked out on the new Branch, but it still needs the Py2 GTK ...
Any news here? I finally managed to get IDJC running on Linux Mint 20 but that wasn't a picnic and sure isn't future proof. Stephen, I realize taking IDJC into the future would be a lot of work. What about some crowd funding to compensate you for your efforts? I'd be sure to chip in.
how did you manage to do this? I'm trying to get it to run on ubuntu studio 20 as a fix...but having no luck!
cheers
I removed one package for nemo that required python3-mutagen. Also python3-mutagen. Then I re-installed all the python2 packages.
Agreed, idjc is an excellent base for serious opensource actual broadcasting… and it would be nice to make it properly available on Python3 :P
I've started looking at getting IDJC working on Mint 20 with Python3 (not trying to get Python2 installed, actually using pure Python3). I'm making progress. I have very basic functionality working. The big thing I'm finding is how strings are handled in Python 3. From what I'm finding so far, it will be simpler handling strings, but there's a lot of minor changes to do. Once I get something working that I consider stable, I'll share it here (unless Stephen beats me to it)
My impressions also regarding the str vs bytes situation in fact I wouldn't be surprised if this was the only issue. Two choices are to open the pipe to the back end in binary and send non utf8 or open in text mode and send only utf8. I opted for the latter in the python3 branch and stopped at the point where I considered the way forward was to scrub all latin1 support from the idjc codebase cleaning out .encode, .decode, and unicode references on the python directory as well as the streaming format Latin1 options. The reason to keep latin1 around was version 1 of the shoutcast server which is probably unavailable to download anymore as was my impression last I looked.
Would you like me to continue with working on this? I've so far got drag-drop of files working, DnD between the players. I also have the songdb working, but only partially. I haven't quite tracked that problem down yet, but it looks again to be a bytes/string conversion issue.
Just an update for anyone interested. I have the Python3 version almost totally working on Mint 20. It's completely usable, but I have a few minor issues to track down yet. I hope to be able to post patches in a few days. One important note, I've made no attempt to keep Python2 compatibility. I don't see it worth the effort as Py2 is basically dead.
Brian, how did you solve the problem that PyGTK is not available for Python 3?
PyGTK is out and the gi module is in.
Stephen actually did the start of the conversion to gi.repository. I just finished it. So it's 100% Gtk3. Also in my changes, I made no attempt to keep Python 2 compatibility. Like I used f-strings (where it made sense). The big challenge was handling when to convert bytes/strings. And a lot of little differences between PyGTK and gi.repository.
I just submitted a patch for Py3 compatibility. So far with my testing, it's working great, but I wouldn't be surprised if I missed a few things.
I did not test idjcmonitor.py yet. I will try that shortly and send a new patch for that if needed.
Just submitted another patch to replace my first one as there was still a problem with bytes/string conversions.
All your patches are now merged. The python3 branch is now merged into master. libshout-idjc has been updated to version 2.4.5 a little ahead of the official libshout (so it's got some green code in there from upstream I would wager) anyhow, I recommend you update and test this against current idjc master. Moving towards releasing idjc-0.9.0 soon.
Thanks for merging! Do you want me to continue to look at my changes and see if I can refine them? While it works, I think there were a few spots where I could have done it better.
Excellent work guys!
I think idjc really has a role to play in the opensource radio broadcast community, mixxx is fun to play with but a lot less radio oriented!
Thanks a lot for the python3 effort, it will help a lot!
Cheers,
Gilou
I plan on doing a fresh install on a Mint 20.1 server that has never had IDJC installed on before. I will keep notes of exactly what packages that are needed, and will post the information.
Heartfelt thanks to Stephen and Brian for bringing us a Python3 IDJC! Many thanks for all your hard work! Keep it rocking!