Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#13111 closed (fixed)

1.1.X: decorators broken by r12763

Reported by: Karen Tracey Owned by: nobody
Component: Uncategorized Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Since r12763 we're getting about 100 test errors on the 1.1.X branch, all (I'm guessing, I did not actually look at them all) like this:

ERROR: test_callable_process_view_middleware (regressiontests.utils.decorators.DecoratorFromMiddlewareTests)
Traceback (most recent call last):
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/tests/regressiontests/utils/", line 19, in test_callable_process_view_middleware
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/test/", line 281, in get
    response = self.request(**r)
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/core/handlers/", line 89, in get_response
    callback, callback_args, callback_kwargs = resolver.resolve(
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/core/", line 222, in resolve
    sub_match = pattern.resolve(new_path)
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/core/", line 220, in resolve
    for pattern in self.url_patterns:
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/core/", line 249, in _get_url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/core/", line 244, in _get_urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/utils/", line 35, in import_module
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/tests/regressiontests/utils/", line 3, in ?
    import views
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/tests/regressiontests/utils/", line 17, in ?
    class_xview = xview_dec(ClassXView())
  File "/home/buildbot/slave-py2.4/parts/ubuntu9.10-py2.4-sqlite/django-1.1.X_ubuntu9.10-py2.4-sqlite/build/django/utils/", line 37, in _decorator_from_middleware
    middleware = middleware_class(*args, **kwargs)
TypeError: default __new__ takes no parameters

Change History (4)

comment:1 by Karen Tracey, 14 years ago

(In [12776]) [1.1.X] Revert r12763 until we figure out what's wrong with it on 1.1.X. Refs #13111.

comment:2 by Karen Tracey, 14 years ago

Triage Stage: UnreviewedAccepted

For now I've reverted the revision, so I can see if the 3 failures being reported are due to it also or are some other problem.

comment:3 by Russell Keith-Magee, 14 years ago

Resolution: fixed
Status: newclosed

Digging into this a big more, I think this was an overenthusiastic backmerge on my part.

The original problem from #13093 only deals with decorated class-like views. [12399] made some pretty big changes to decorator_from_middleware, in turn fixing problems introduced by [11586], which was addressing problems decorating bound methods rather than functions.

Effectively, this means that there was no way to decorate a class-like view in Django 1.1 -- at least, not with the Django-provided utilities. Therefore, a backport of [12763] isn't required.

Apologies for the temporary instability on 1.1.X; I'm going to close this fixed, as the revert from [12776] is what was required.

comment:4 by Jacob, 13 years ago

milestone: 1.2

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top