From 725510a443d5081f8da1e5fb398b471996bef260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Fri, 31 May 2019 14:18:40 +0200 Subject: [PATCH] Mark User.gravatar() as deprecated We're using self-hosted avatars instead. See `pillar.api.users.avatar.url()` in the Pillar source code instead. --- pillarsdk/users.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pillarsdk/users.py b/pillarsdk/users.py index c0fae5a..edfe297 100755 --- a/pillarsdk/users.py +++ b/pillarsdk/users.py @@ -14,7 +14,12 @@ class User(List, Find, Create, Post, Update, Delete): path = "users" def gravatar(self, size=64): - """Generate Gravatar link on the fly using the email value""" + """Deprecated: return the Gravatar URL. + + .. deprecated:: + Use of Gravatar is deprecated, in favour of our self-hosted avatars. + See pillar.api.users.avatar.url(user). + """ parameters = {'s':str(size), 'd':'mm'} return "https://www.gravatar.com/avatar/" + \ hashlib.md5(self.email.lower()).hexdigest() + \