oncokb / oncokb-annotator

Annotates variants in MAF with OncoKB annotation.
GNU Affero General Public License v3.0
122 stars 61 forks source link

open() mode 'rU' invalid mode #188

Closed gruenbergera closed 1 year ago

gruenbergera commented 1 year ago

Hello,

It looks like on line 480 of AnnotatorCore.py, open(eventfile, 'rU'), the mode for open() is set as rU. I believe python 3.11+ no longer has U as one of the valid modes, which causes some run time issues as is (if you're using 3.11 and newer, of course).

open()](https://docs.python.org/3/library/functions.html#open), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode. In Python 3, “universal newline” mode is used by default whenever a file is opened in text mode, and the 'U' flag has been deprecated since Python 3.3. The newline parameter to these functions controls how universal newlines work. (Contributed by Victor Stinner in bpo-37330.)

https://docs.python.org/3/whatsnew/3.11.html#porting-to-python-3-11

In any case, whether this is a real issue or not, I appreciate the great work your organization contributes to the research community.

zhx828 commented 1 year ago

Thank you! We will look into.