Skip to content

Commit

Permalink
Merge pull request #2517 from liberapay/python3.12
Browse files Browse the repository at this point in the history
Liberapay is now running Python 3.12 in production instead of 3.11. The upgrade was a pleasantly smooth ride (`aws elasticbeanstalk update-environment --solution-stack-name "64bit Amazon Linux 2023 v4.3.1 running Python 3.12" --environment-name "liberapay" --region "eu-west-1"`).
  • Loading branch information
Changaco authored Dec 14, 2024
2 parents 51fb15f + c05f514 commit 78242e8
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions cli/check-python-version.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
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
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py311,py312
envlist = py312
skipsdist = True

[testenv]
Expand Down

0 comments on commit 78242e8

Please sign in to comment.