mirror of
https://github.com/pretix/pretix.git
synced 2026-07-27 08:35:08 +00:00
Update redis requirement from ==7.4.* to ==8.0.* (#6226)
* Update redis requirement from ==7.4.* to ==8.0.* Updates the requirements on [redis](https://github.com/redis/redis-py) to permit the latest version. - [Release notes](https://github.com/redis/redis-py/releases) - [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES) - [Commits](https://github.com/redis/redis-py/compare/v7.4.0...v8.0.0) --- updated-dependencies: - dependency-name: redis dependency-version: 8.0.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * Remove setex calls * Update src/pretix/presale/views/user.py Co-authored-by: luelista <weller@rami.io> * Fix tests --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Raphael Michel <michel@pretix.eu> Co-authored-by: Raphael Michel <michel@rami.io> Co-authored-by: luelista <weller@rami.io>
This commit is contained in:
co-authored by
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Raphael Michel
Raphael Michel
luelista
parent
1ee1c604cf
commit
005b3864b1
+1
-1
@@ -91,7 +91,7 @@ dependencies = [
|
||||
"pytz-deprecation-shim==0.1.*",
|
||||
"pyuca",
|
||||
"qrcode==8.2",
|
||||
"redis==7.4.*",
|
||||
"redis==8.0.*",
|
||||
"reportlab==5.0.*",
|
||||
"requests==2.34.*",
|
||||
"sentry-sdk==2.64.*",
|
||||
|
||||
@@ -193,7 +193,7 @@ class QuotaAvailability:
|
||||
lock_name = '_'.join([str(p) for p in sorted([q.pk for q in quotas])])
|
||||
if rc.exists(f'quotas:availabilitycachewrite:{lock_name}{self._cache_key_suffix}'):
|
||||
return
|
||||
rc.setex(f'quotas:availabilitycachewrite:{lock_name}{self._cache_key_suffix}', '1', 10)
|
||||
rc.set(f'quotas:availabilitycachewrite:{lock_name}{self._cache_key_suffix}', '1', ex=10)
|
||||
|
||||
update = defaultdict(list)
|
||||
for q in quotas:
|
||||
|
||||
@@ -330,7 +330,7 @@ class Forgot(TemplateView):
|
||||
user.log_action('pretix.control.auth.user.forgot_password.denied.repeated')
|
||||
raise RepeatedResetDenied()
|
||||
else:
|
||||
rc.setex('pretix_pwreset_%s' % (user.id), 3600 * 24, '1')
|
||||
rc.set('pretix_pwreset_%s' % (user.id), '1', ex=3600 * 24)
|
||||
|
||||
except User.DoesNotExist:
|
||||
logger.warning('Backend password reset for unregistered e-mail \"' + email + '\" requested.')
|
||||
|
||||
@@ -71,7 +71,7 @@ class ResendLinkView(EventViewMixin, TemplateView):
|
||||
'that you used the correct email address.').format(number=24))
|
||||
return redirect_to_url(eventreverse(self.request.event, 'presale:event.resend_link'))
|
||||
else:
|
||||
rc.setex('pretix_resend_{}_{}'.format(request.event.pk, user), 3600 * 24, '1')
|
||||
rc.set('pretix_resend_{}_{}'.format(request.event.pk, user), '1', ex=3600 * 24)
|
||||
|
||||
orders = self.request.event.orders.filter(email__iexact=user)
|
||||
|
||||
|
||||
@@ -523,7 +523,7 @@ class FakeRedis(object):
|
||||
def exists(self, rkey):
|
||||
return rkey in self.storage
|
||||
|
||||
def setex(self, rkey, value, expiration):
|
||||
def set(self, rkey, value, **kwargs):
|
||||
self.storage[rkey] = value
|
||||
|
||||
def execute(self):
|
||||
|
||||
Reference in New Issue
Block a user