diff --git a/Makefile b/Makefile index 57bbef2e5..3ab97686e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -python := "$(shell { command -v python3.11 || command -v python3 || command -v python || echo false; } 2>/dev/null)" +python := "$(shell { command -v python3.12 || command -v python3 || command -v python || echo false; } 2>/dev/null)" # Set the relative path to installed binaries under the project virtualenv. # NOTE: Creating a virtualenv on Windows places binaries in the 'Scripts' directory. diff --git a/README.md b/README.md index fbba66092..ed883d2e1 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ The python code inside simplates is only for request-specific logic, common back Make sure you have the following dependencies installed first: -- python ≥ 3.11 +- python ≥ 3.12 - including the C headers of python and libffi, which are packaged separately in many Linux distributions - postgresql 16 (see [the official download & install docs](https://www.postgresql.org/download/)) - make diff --git a/cli/check-python-version.py b/cli/check-python-version.py index abba54df3..846034bf8 100644 --- a/cli/check-python-version.py +++ b/cli/check-python-version.py @@ -1,7 +1,7 @@ import sys -if sys.version_info < (3, 11, 0): - print("Liberapay requires Python >= 3.11, but %s is version %s.%s" % +if sys.version_info < (3, 12, 0): + print("Liberapay requires Python >= 3.12, but %s is version %s.%s" % (sys.executable, sys.version_info[0], sys.version_info[1])) sys.exit(1) if sys.version_info >= (3, 13, 0): diff --git a/liberapay/elsewhere/_base.py b/liberapay/elsewhere/_base.py index 9a3b2fe4c..93dfd5f18 100644 --- a/liberapay/elsewhere/_base.py +++ b/liberapay/elsewhere/_base.py @@ -1,5 +1,6 @@ from dataclasses import dataclass from datetime import datetime, timezone +from functools import cached_property import hashlib import json import logging @@ -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 diff --git a/liberapay/i18n/base.py b/liberapay/i18n/base.py index 7aa2e6ca9..8770df1c1 100644 --- a/liberapay/i18n/base.py +++ b/liberapay/i18n/base.py @@ -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 @@ -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 diff --git a/liberapay/models/exchange_route.py b/liberapay/models/exchange_route.py index d1df9bf7d..43f14e777 100644 --- a/liberapay/models/exchange_route.py +++ b/liberapay/models/exchange_route.py @@ -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 diff --git a/liberapay/models/participant.py b/liberapay/models/participant.py index e28d7f561..5d99bfb76 100644 --- a/liberapay/models/participant.py +++ b/liberapay/models/participant.py @@ -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 @@ -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 diff --git a/liberapay/models/tip.py b/liberapay/models/tip.py index 75dabc480..0c62ebf08 100644 --- a/liberapay/models/tip.py +++ b/liberapay/models/tip.py @@ -1,6 +1,6 @@ from datetime import timedelta +from functools import cached_property -from cached_property import cached_property from postgres.orm import Model diff --git a/liberapay/website.py b/liberapay/website.py index a97a699bc..9b16b44b8 100644 --- a/liberapay/website.py +++ b/liberapay/website.py @@ -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 diff --git a/requirements_base.txt b/requirements_base.txt index cbd7fb3e7..5e28ab574 100644 --- a/requirements_base.txt +++ b/requirements_base.txt @@ -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 diff --git a/tox.ini b/tox.ini index 19f013500..171c7e781 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py311,py312 +envlist = py312 skipsdist = True [testenv]