zooniverse / panoptes-cli

A command-line interface for Panoptes
Apache License 2.0
18 stars 5 forks source link

subject_set.py line 314 broken in Python version 3.11 #240

Closed PmasonFF closed 1 year ago

PmasonFF commented 1 year ago

Open mode 'U' deprecated in Python from version 3.4, removed in version 3.11 This results in a ValueError see https://www.zooniverse.org/talk/18/2743060?page=1&scrollToLastComment=true

Not sure how much longer you can ensure compatibility with Python 2.7, and I question if you should....

lcjohnso commented 1 year ago

Hi @PmasonFF -- Are you a Python 2.7 user? If so, can you comment on whether dropping the U mode would break your code? It seems that the risk would mostly be for Windows users of Python 2.7 so wanted to ask.

I'm leaning towards making the change -- given Python 2.7's official deprecated status, the risk for failure by a typical user seems larger in the case of the current state of the code (including the U mode in the open() call). And I'm not too keen on adding an if clause as a backward compatible workaround.

PmasonFF commented 1 year ago

No I am not a Python 2.7 user. I am currently using 3.10, and tend to stay current with NfN reconcile.py which is usually one or two major revisions behind.

I am not aware of anyone using 2.7 - all my teams are on 3.5 or later, Last hold out I knew was one of your own zooniverse staff Meg Schwamb who I believe has updated, though there is still 2.7 code based on her work on the zoo data digging repository.