easy-as-python/django-webmention

Django 1.10 compatibility

Closed this issue · 3 comments

Django: 1.10.8
Python: 3.6.3

With middleware enabled in settings.py, the following error occurs:

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x10ed9bea0>
Traceback (most recent call last):
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 142, in inner_run
    handler = self.get_handler(*args, **options)
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/contrib/staticfiles/management/commands/runserver.py", line 27, in get_handler
    handler = super(Command, self).get_handler(*args, **options)
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 64, in get_handler
    return get_internal_wsgi_application()
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/core/servers/basehttp.py", line 46, in get_internal_wsgi_application
    return get_wsgi_application()
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
    return WSGIHandler()
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 153, in __init__
    self.load_middleware()
  File "/Users/tehfink/Documents/work/mylittlepony.net/www./source/3.0/mlp_website-virtualenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 82, in load_middleware
    mw_instance = middleware(handler)
TypeError: object() takes no parameters

Ping!

Hey @tehfink, I'm only now seeing this so I apologize profusely. I just saw another user has updated their fork for Django 2.0 compatibility, so I'm keen to get this up to snuff on both versions soon. Sorry again for the delay but I'll keep you posted!

@tehfink I've made a pull request (referenced just above) and would appreciate a quick review of the code if you have time! Meanwhile I'm running the test suites against all combinations of:

  • Python 3.4, 3.5, 3.6 (latest patch versions)
  • Django 1.8, 1.9, 1.10, 1.11, 2.0 (latest patch versions)

cc'ing @things as well since I see you did some Django 2.0 work on your fork. I made similar changes but kept things working for Django < 2.0 since others made not make the switch just for this little ol' library 😉