diff options
| author | Carl Meyer <carl@oddbird.net> | 2014-11-22 22:29:23 -0700 |
|---|---|---|
| committer | Carl Meyer <carl@oddbird.net> | 2014-11-22 22:29:23 -0700 |
| commit | bcb693ebd4d3743cb194c6fd05b2d70fb9696a4c (patch) | |
| tree | f32e2fd8c6152f9c5ad2b198f18f77b0fdac59c5 /django/core | |
| parent | f36151ed169813f2873e13ca9de616cfa4095321 (diff) | |
Revert "Fixed #23892 -- Made deconstructible classes forwards compatible"
This reverts commit f36151ed169813f2873e13ca9de616cfa4095321.
Adding kwargs to deconstructed objects does not achieve useful
forward-compatibility in general, since additional arguments are silently
dropped rather than having their intended effect. In fact, it can make the
failure more difficult to diagnose. Thanks Shai Berger for discussion.
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/files/storage.py | 2 | ||||
| -rw-r--r-- | django/core/validators.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/django/core/files/storage.py b/django/core/files/storage.py index c6146fcdb7..2d7c0c78e9 100644 --- a/django/core/files/storage.py +++ b/django/core/files/storage.py @@ -150,7 +150,7 @@ class FileSystemStorage(Storage): """ def __init__(self, location=None, base_url=None, file_permissions_mode=None, - directory_permissions_mode=None, **kwargs): + directory_permissions_mode=None): if location is None: location = settings.MEDIA_ROOT self.base_location = location diff --git a/django/core/validators.py b/django/core/validators.py index 846efe7ac8..e0fd995227 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -23,7 +23,7 @@ class RegexValidator(object): inverse_match = False flags = 0 - def __init__(self, regex=None, message=None, code=None, inverse_match=None, flags=None, **kwargs): + def __init__(self, regex=None, message=None, code=None, inverse_match=None, flags=None): if regex is not None: self.regex = regex if message is not None: @@ -134,7 +134,7 @@ class EmailValidator(object): re.IGNORECASE) domain_whitelist = ['localhost'] - def __init__(self, message=None, code=None, whitelist=None, **kwargs): + def __init__(self, message=None, code=None, whitelist=None): if message is not None: self.message = message if code is not None: @@ -251,7 +251,7 @@ class BaseValidator(object): message = _('Ensure this value is %(limit_value)s (it is %(show_value)s).') code = 'limit_value' - def __init__(self, limit_value, message=None, **kwargs): + def __init__(self, limit_value, message=None): self.limit_value = limit_value if message: self.message = message |
