Menu

Python 3

Dave Lee
2020-04-04
2021-02-06
1 2 > >> (Page 1 of 2)
  • Dave Lee

    Dave Lee - 2020-04-04

    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?

     
  • Stephen Fairchild

    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.

     
    • DJ Accy

      DJ Accy - 2020-09-07

      Hi Stephen, thank you for the update. How much money would it take for the port to make IDJC worth it? Thanks :)

       
  • Dave Lee

    Dave Lee - 2020-04-05

    Thanks for the clarification.

    Could this spell the end of IDJC should Python 2 disappear completely?

     
  • Gilles

    Gilles - 2020-04-26

    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!

     
  • Gilles

    Gilles - 2020-04-26

    I just saw the more recent commits, related to pygtk3, that sounds great.

     
  • tadiwe

    tadiwe - 2020-05-18

    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 ...

     
  • Christian Hennecke

    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.

     
    • DJ Accy

      DJ Accy - 2021-01-10

      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

       
      • Christian Hennecke

        I removed one package for nemo that required python3-mutagen. Also python3-mutagen. Then I re-installed all the python2 packages.

         
  • Gilles

    Gilles - 2020-11-05

    Agreed, idjc is an excellent base for serious opensource actual broadcasting… and it would be nice to make it properly available on Python3 :P

     
  • Brian Millham

    Brian Millham - 2021-01-08

    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)

     
    • Stephen Fairchild

      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.

       
  • Brian Millham

    Brian Millham - 2021-01-11

    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.

     
    • Brian Millham

      Brian Millham - 2021-01-17

      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.

       
      • Christian Hennecke

        Brian, how did you solve the problem that PyGTK is not available for Python 3?

         
        • Stephen Fairchild

          PyGTK is out and the gi module is in.

           
        • Brian Millham

          Brian Millham - 2021-01-26

          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.

           
  • Brian Millham

    Brian Millham - 2021-01-20

    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.

     
    • Brian Millham

      Brian Millham - 2021-01-21

      Just submitted another patch to replace my first one as there was still a problem with bytes/string conversions.

       
      • Stephen Fairchild

        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
        • Brian Millham

          Brian Millham - 2021-01-26

          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.

           
  • Gilles

    Gilles - 2021-01-25

    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

     
    • Brian Millham

      Brian Millham - 2021-01-26

      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.

       
  • Moonbase

    Moonbase - 2021-02-05

    Heartfelt thanks to Stephen and Brian for bringing us a Python3 IDJC! Many thanks for all your hard work! Keep it rocking!

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.