Scoary
Scoary copied to clipboard
fix ValueError: invalid mode: 'rU' with python3.11
Since python3, the universal newline mode 'U' has no effects. Since python3.11, that mode is obsolete and its use raises:
Command: scoary.py -g scoary/exampledata/Gene_presence_absence.csv -t scoary/exa
mpledata/Tetracycline_resistance.csv -o Test1 --no-time
Traceback (most recent call last):
File "/<<PKGBUILDDIR>>/scoary.py", line 25, in <module>
methods.main()
File "/<<PKGBUILDDIR>>/scoary/methods.py", line 184, in main
with open(args.genes, "rU") as genes, \
^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid mode: 'rU'
Note this patch suppresses various references to the 'U' mode in calls to the "open" function, which most likely breaks compatibility of Scoary with python2. Given that this interpreter version is out of maintenance since 2020, it should not be too problematic.