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

Django 1.8+ compatibility #36

Merged
merged 2 commits into from Apr 6, 2015

Conversation

Projects
None yet
3 participants
@maryokhin
Copy link
Contributor

maryokhin commented Mar 31, 2015

As per the deprecation note.

@maryokhin maryokhin force-pushed the maryokhin:master branch from dac530e to e555cd9 Apr 2, 2015

@jschneier

This comment has been minimized.

Copy link
Owner

jschneier commented Apr 5, 2015

Thanks for this it looks great! My only concern is whether the super calls with no arguments will work on Python2.

@maryokhin

This comment has been minimized.

Copy link
Contributor Author

maryokhin commented Apr 5, 2015

@mbarrien

This comment has been minimized.

Copy link
Contributor

mbarrien commented Apr 5, 2015

Wrong, argumentless super() was introduced in Python 3, and never back ported. From a Python 2.7 REPL session:

>>> class Foo(object):
...     def func(self):
...         print "Foo"
...
>>> class Bar(Foo):
...     def func(self):
...         super().func()
...
>>> Bar().func()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in func
TypeError: super() takes at least 1 argument (0 given)
>>>

See first entry under Builtins at https://docs.python.org/3.0/whatsnew/3.0.html (the note about PEP 3135).

@maryokhin

This comment has been minimized.

Copy link
Contributor Author

maryokhin commented Apr 5, 2015

Ok, true. I don't use Python 2, didn't expect it to still be such a mess. I'll fix it.

@maryokhin maryokhin force-pushed the maryokhin:master branch from e555cd9 to 858d2f6 Apr 5, 2015

jschneier added a commit that referenced this pull request Apr 6, 2015

Merge pull request #36 from maryokhin/master
Django 1.8+ compatibility

@jschneier jschneier merged commit 46de0ec into jschneier:master Apr 6, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

jschneier added a commit that referenced this pull request Apr 6, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.