Merge branch 'main' into update-versions

This commit is contained in:
Johannes Wilm 2026-01-07 21:48:12 +01:00 committed by GitHub
commit 7840c74122
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 10 deletions

View file

@ -6,19 +6,19 @@ jobs:
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
django-version: ['4.2', '5.2', '6.0']
django-version: ['4.2', '5.2', '6.0.*']
exclude:
- python-version: 3.10
django-version: 6.0
- python-version: 3.11
django-version: 6.0
- python-version: 3.13
django-version: 4.2
- python-version: 3.14
django-version: 4.2
- python-version: 3.10
django-version: 6.0.*
- python-version: 3.11
django-version: 6.0.*
fail-fast: false
steps:

View file

@ -68,7 +68,7 @@ class GravatarAvatarProvider(object):
class LibRAvatarProvider:
"""
Returns the url of an avatar by the Ravatar service.
Returns the url of an avatar by the LibRavatar service.
"""
@classmethod
@ -87,8 +87,17 @@ class LibRAvatarProvider:
baseurl = "http://" + hostname + ":" + port + "/avatar/"
except Exception:
baseurl = "https://seccdn.libravatar.org/avatar/"
hash = hashlib.md5(email.strip().lower()).hexdigest()
return baseurl + hash
params = {"s": str(width)}
if settings.AVATAR_GRAVATAR_DEFAULT:
params["d"] = settings.AVATAR_GRAVATAR_DEFAULT
if settings.AVATAR_GRAVATAR_FORCEDEFAULT:
params["f"] = "y"
path = "%s/?%s" % (
hashlib.md5(force_bytes(email.strip().lower())).hexdigest(),
urlencode(params),
)
return urljoin(baseurl, path)
class FacebookAvatarProvider(object):