Skip to content

Commit

Permalink
Fixed a bug in __new__ method where urlpatterns were not being deepco…
Browse files Browse the repository at this point in the history
…pyed, and therefore leaking changes across instances.
  • Loading branch information
nowells committed Sep 6, 2009
1 parent a2de4b1 commit b3b8a75
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pluggables/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
templatetags.pluggable
"""
import copy
from functools import wraps
import uuid

Expand Down Expand Up @@ -107,8 +108,7 @@ def __new__(cls, prefix=None):
obj.pluggable_prefix = prefix
view_prefix = cls.urlpatterns[0]
urlpatterns = []
for pattern in cls.urlpatterns[1:]:
pattern_type, pattern_args, pattern_kwargs = pattern
for pattern_type, pattern_args, pattern_kwargs in copy.deepcopy(cls.urlpatterns[1:]):
if pattern_type == 'url':
view = pattern_args[1]
if type(view) == list:
Expand Down

0 comments on commit b3b8a75

Please sign in to comment.