diff options
| author | Theron Luhn <theron@luhn.com> | 2019-12-16 11:37:45 -0800 |
|---|---|---|
| committer | Theron Luhn <theron@luhn.com> | 2019-12-16 11:37:45 -0800 |
| commit | 03069ff0845c1b85c21119985e8157d54e7ce71c (patch) | |
| tree | cc868c445c88076c6eb330ab1b0dd5bc98f0127e /src | |
| parent | 1b127af1412ce9ae24cc993c15162b48283d76e9 (diff) | |
| download | pyramid-03069ff0845c1b85c21119985e8157d54e7ce71c.tar.gz pyramid-03069ff0845c1b85c21119985e8157d54e7ce71c.tar.bz2 pyramid-03069ff0845c1b85c21119985e8157d54e7ce71c.zip | |
Fix EffectivePrincipalsPredicate deprecation warning.
Fired upon registering, not upon use.
Diffstat (limited to 'src')
| -rw-r--r-- | src/pyramid/predicates.py | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/pyramid/predicates.py b/src/pyramid/predicates.py index a09933253..83f7f3295 100644 --- a/src/pyramid/predicates.py +++ b/src/pyramid/predicates.py @@ -285,6 +285,14 @@ class EffectivePrincipalsPredicate(object): else: self.val = set((val,)) + __init__ = deprecated( + __init__, + 'The new security policy has removed the concept of principals. See ' + 'https://docs.pylonsproject.org/projects/pyramid/en/latest' + '/whatsnew-2.0.html#upgrading-authentication-authorization ' + 'for more information.', + ) + def text(self): return 'effective_principals = %s' % sorted(list(self.val)) @@ -299,15 +307,6 @@ class EffectivePrincipalsPredicate(object): return False -deprecated( - 'EffectivePrincipalsPredicate', - 'The new security policy has removed the concept of principals. See ' - 'https://docs.pylonsproject.org/projects/pyramid/en/latest' - '/whatsnew-2.0.html#upgrading-authentication-authorization ' - 'for more information.', -) - - class Notted(object): def __init__(self, predicate): self.predicate = predicate |
