Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new-style classes #71

Open
ewheeler opened this issue Jul 3, 2015 · 1 comment
Open

Use new-style classes #71

ewheeler opened this issue Jul 3, 2015 · 1 comment

Comments

@ewheeler
Copy link
Member

ewheeler commented Jul 3, 2015

Classes should subclass object to ensure compatibility among Python 2.x and Python 3.x versions.
Without subclassing object these classes are 'old-style' which have some very different behaviors around how super works and several other differences. Read more here: https://www.python.org/doc/newstyle/

The Facade and FakeResponse classes, for example, should be updated:
https://github.com/unicefuganda/eums/blob/master/eums/vision/vision_facade.py#L32
https://github.com/unicefuganda/eums/blob/master/eums/rapid_pro/fake_response.py#L1

Also some here:
https://github.com/unicefuganda/eums/blob/master/eums/test/services/mock_celery.py

@wanderanimrod
Copy link
Contributor

Hi Evan,

Thanks for pointing this out. The team is going to ensure the any new classes created are python 3 compatible.

I will close this issue once we have cleaned out the codebase in the areas you pointed out. Part of this work has already been done.

Thank you.

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

No branches or pull requests

2 participants