Skip to content

Commit

Permalink
switch to the stdlib's cached_property
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed Dec 14, 2024
1 parent f99e19d commit c05f514
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion liberapay/elsewhere/_base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from dataclasses import dataclass
from datetime import datetime, timezone
from functools import cached_property
import hashlib
import json
import logging
Expand All @@ -9,7 +10,6 @@
import xml.etree.ElementTree as ET

from babel.dates import format_timedelta
from cached_property import cached_property
from dateutil.parser import parse as parse_date
from pando.utils import utc
from oauthlib.oauth2 import BackendApplicationClient, InvalidGrantError, TokenExpiredError
Expand Down
2 changes: 1 addition & 1 deletion liberapay/i18n/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from collections import namedtuple
from datetime import date, datetime, timedelta
from decimal import Decimal, InvalidOperation
from functools import cached_property
from sys import intern
from unicodedata import combining, normalize
import warnings
Expand All @@ -9,7 +10,6 @@
from babel.dates import format_date, format_datetime, format_time, format_timedelta
from babel.messages.pofile import Catalog
from babel.numbers import parse_pattern
from cached_property import cached_property
from markupsafe import Markup
import opencc
from pando.utils import utcnow
Expand Down
2 changes: 1 addition & 1 deletion liberapay/models/exchange_route.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from calendar import monthrange
from datetime import date
from functools import cached_property

from cached_property import cached_property
from postgres.orm import Model
import stripe

Expand Down
2 changes: 1 addition & 1 deletion liberapay/models/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from datetime import date, timedelta
from decimal import Decimal
from email.utils import formataddr
from functools import cached_property
from hashlib import pbkdf2_hmac, md5, sha1
from operator import attrgetter, itemgetter
from os import urandom
Expand All @@ -15,7 +16,6 @@
import uuid

import aspen_jinja2_renderer
from cached_property import cached_property
from dateutil.parser import parse as parse_date
from dns.exception import DNSException
from dns.resolver import Cache as DNSCache, Resolver as DNSResolver
Expand Down
2 changes: 1 addition & 1 deletion liberapay/models/tip.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import timedelta
from functools import cached_property

from cached_property import cached_property
from postgres.orm import Model


Expand Down
2 changes: 1 addition & 1 deletion liberapay/website.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

from contextvars import ContextVar, copy_context
from datetime import timedelta
from functools import cached_property
import logging
import os

from cached_property import cached_property
from environment import Environment, is_yesish
from markupsafe import Markup
from pando.utils import utcnow
Expand Down
4 changes: 0 additions & 4 deletions requirements_base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,6 @@ boto3==1.35.13 \
--hash=sha256:244a76a24355363a68164241438de1b72f8781664920260c48465896b712a41e \
--hash=sha256:29edc09801743c21eb5ecbc617a152df41d3c287f67b615f73e5f750583666a7

cached-property==1.5.2 \
--hash=sha256:9fa5755838eecbb2d234c3aa390bd80fbd3ac6b6869109bfc1b499f7bd89a130 \
--hash=sha256:df4f613cf7ad9a588cc381aaf4a512d26265ecebd5eb9e1ba12f1319eb85a6a0

stripe==11.3.0 \
--hash=sha256:98e625d9ddbabcecf02666867169696e113d9eaba27979fb310a7a8dfd44097c \
--hash=sha256:9d2e86943e1e4f325835d3860c4f58aa98d49229c9caf67588f9f9b2451e8e56
Expand Down

0 comments on commit c05f514

Please sign in to comment.