mikolmogorov / Ragout

Chromosome-level scaffolding using multiple references
Other
149 stars 27 forks source link

Please port to Python3 #52

Closed tillea closed 4 years ago

tillea commented 5 years ago

Hello, the Debian Med team is maintaining Ragout for official Debian. The recently released Debian 10 was the last Debian release featuring Python2 since this programming language is EOL. If you are interested that we continue to maintain Ragout in official Debian (and that users of other modern distributions will have no problems to install Ragout on their systems) I'd recommend you port your code to Python3. The 2to3 tool might be of great help here. Since I wanted to give 2to3 a chance myself I created a patch which turns the code into Python3 syntax. Unfortunately the conversion is a bit more complex. The header of the patch contains the error message I get when trying to build the package. It boils down to

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf0 in position 24: invalid continuation byte

and for the moment I gave up here. Please feel free to ask for more hints if needed. Kind regards, Andreas.

mikolmogorov commented 5 years ago

Hi Andreas,

Thanks for lettin me know. Yes, supporting Python3 is in the plans. When are you guys planning to transition to the next Debian release?

Best, Mikhail

tillea commented 5 years ago

Hi Mikhail,

Thanks for lettin me know. Yes, supporting Python3 is in the plans. Nice.

When are you guys planning to transition to the next Debian release? Probably in 2021 but its not only Debian that is relevant here. Other distribution might kick Python2 earlier.

Thanks for your quick and positive response, Andreas.

tillea commented 4 years ago

Any news about the Python3 port?

mikolmogorov commented 4 years ago

Haven't got a chance to work on this yet, unfortunately. Early 2020 sounds more realistic.

smoe commented 4 years ago

Hello, I just had a look. The error Andreas reported is just about the scripts to be installed in setup.py being binaries. I moved the installation of everything in bin/* to a corresponding line in the Debian package build instructions as an interim solution. The import instruction in line 39 of ragout/main.py gives a syntax error that you may want to have a look at. Otherwise I think the port to version 3 you can consider to be a worry of your past. Early 2020 indeed, HNY, Steffen

smoe commented 4 years ago

Well, and there is maketrans that is now no longer to be imported - see https://stackoverflow.com/questions/27539884/maketrans-not-working-for-petl-with-python3-4

mikolmogorov commented 4 years ago

Ok, thanks for the update - sounds promising!

mikolmogorov commented 4 years ago

Version 2.3 now has Python 3 support, yay!