Skip to content

Python 3 support#6

Open
alanjds wants to merge 2 commits intomiketheredherring:masterfrom
alanjds:py39
Open

Python 3 support#6
alanjds wants to merge 2 commits intomiketheredherring:masterfrom
alanjds:py39

Conversation

@alanjds
Copy link

@alanjds alanjds commented Nov 4, 2020

First shot for Python 3 support: pass 2to3 on the codebase.

Resulted in an importable and working(?) module. Tests fail on name resolution over api.genepeeks.com and I guess this is not a fault of the module. The changes also broke Py2.7. May be possible to have it work by using futures module as a compatibility layer. Idk if is worth, as Py2.7 is EOLed for almost an year already.

That said, I have no way to know if this is working. My target REST API is Django Rest Framework, that does not honor .filter() without plugins.

Owner/maintainer, please enlighten the next steps needed here.
(and thanks for the existing code)

@miketheredherring
Copy link
Owner

@alanjds Thank for submitting this PR, I think Python 3.X support would be a wonderful thing to add! GenePeeks used to be a company I worked for, but the API is sadly no longer around... So I would add some mocking around the API or using something like responses would satisfy that part of the tests.

As for supporting Python 2.7, I'd definitely like to do it, if for nothing else than just on principal (I'm sure some people will be using it 10 years from now still). This is a small library so I imagine it won't be a huge overhead in the maintenance. I will take a pass on the tests and get back to you with some insights on where we should go from here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants