airr-community / airr-standards

AIRR Community Data Standards
https://docs.airr-community.org
Creative Commons Attribution 4.0 International
35 stars 23 forks source link

Python language support - Treatment of json objects in Python 2 #584

Closed williamdlees closed 1 year ago

williamdlees commented 2 years ago

In python 2, the json parser reads strings into Unicode objects. On the other hand, the validator expects strings to be str. This means that under python 2, validation of any objects against the schema will fail in the current library. Not an issue with Python 3 as strings are all Unicode.

Possible solutions:

schristley commented 2 years ago

We'd previously decided #496 that python 2 support would be dropped with AIRR V2. However, V1.4 has been taking much longer to solidify and release, so we might consider dropping with V1.4.

scharch commented 1 year ago

@javh if we aren't already dropping python2 with 1.5, maybe we should?

javh commented 1 year ago

Yes, dropping python 2 for v1.5 makes sense to me.

javh commented 1 year ago

Should remove python 2 support code from the python library. Update setup.py, if necessary to remove python 2 support

javh commented 1 year ago

setup.py is already set to python>=3. There's some future imports still in the code, but if they aren't breaking anything, then I think it's fine to leave them for now.