From e608a4809b0d84f830203912080c9f8559b73fa4 Mon Sep 17 00:00:00 2001 From: "Kristijan \"Fremen\" Velkovski" Date: Sun, 23 Jun 2024 01:14:07 -0500 Subject: [PATCH 1/2] bump pre-commit deps, add build313, add 3.13 in pyproject.toml and tox.ini, bump Python 3.8 in README. --- .github/workflows/continuous_integration.yml | 2 +- .pre-commit-config.yaml | 8 +-- Makefile | 3 +- README.rst | 2 +- arrow/arrow.py | 1 - arrow/factory.py | 1 - arrow/locales.py | 58 ++++++++++++++++++-- pyproject.toml | 1 + tox.ini | 5 +- 9 files changed, 64 insertions(+), 17 deletions(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 588bff25..241e2220 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["pypy-3.9", "3.8", "3.9", "3.10", "3.11", "3.12-dev"] + python-version: ["pypy-3.9", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] os: [ubuntu-latest, macos-latest, windows-latest] exclude: # pypy3 randomly fails on Windows builds diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b99f4c48..942ff760 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-ast - id: check-yaml @@ -18,11 +18,11 @@ repos: args: [requirements/requirements.txt, requirements/requirements-docs.txt, requirements/requirements-tests.txt] - id: trailing-whitespace - repo: https://github.com/timothycrosley/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.13.0 + rev: v3.16.0 hooks: - id: pyupgrade args: [--py36-plus] @@ -48,7 +48,7 @@ repos: - id: flake8 additional_dependencies: [flake8-bugbear,flake8-annotations] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.5.1 + rev: v1.10.0 hooks: - id: mypy additional_dependencies: [types-python-dateutil] diff --git a/Makefile b/Makefile index 9db6fba0..b1b9f53b 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,9 @@ build39: PYTHON_VER = python3.9 build310: PYTHON_VER = python3.10 build311: PYTHON_VER = python3.11 build312: PYTHON_VER = python3.12 +build313: PYTHON_VER = python3.13 -build36 build37 build38 build39 build310 build311 build312: clean +build36 build37 build38 build39 build310 build311 build312 build313: clean $(PYTHON_VER) -m venv venv . venv/bin/activate; \ pip install -U pip setuptools wheel; \ diff --git a/README.rst b/README.rst index 69f91fe5..11c44155 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,7 @@ Features -------- - Fully-implemented, drop-in replacement for datetime -- Support for Python 3.6+ +- Support for Python 3.8+ - Timezone-aware and UTC by default - Super-simple creation options for many common input scenarios - ``shift`` method with support for relative offsets, including weeks diff --git a/arrow/arrow.py b/arrow/arrow.py index 6e9c3cf7..9d1f5e30 100644 --- a/arrow/arrow.py +++ b/arrow/arrow.py @@ -4,7 +4,6 @@ """ - import calendar import re import sys diff --git a/arrow/factory.py b/arrow/factory.py index f35085f1..53eb8d12 100644 --- a/arrow/factory.py +++ b/arrow/factory.py @@ -5,7 +5,6 @@ """ - import calendar from datetime import date, datetime from datetime import tzinfo as dt_tzinfo diff --git a/arrow/locales.py b/arrow/locales.py index 7f91b565..7372752c 100644 --- a/arrow/locales.py +++ b/arrow/locales.py @@ -776,7 +776,16 @@ class JapaneseLocale(Locale): "12", ] - day_names = ["", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日", "日曜日"] + day_names = [ + "", + "月曜日", + "火曜日", + "水曜日", + "木曜日", + "金曜日", + "土曜日", + "日曜日", + ] day_abbreviations = ["", "月", "火", "水", "木", "金", "土", "日"] @@ -992,7 +1001,16 @@ class ChineseCNLocale(Locale): "12", ] - day_names = ["", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"] + day_names = [ + "", + "星期一", + "星期二", + "星期三", + "星期四", + "星期五", + "星期六", + "星期日", + ] day_abbreviations = ["", "一", "二", "三", "四", "五", "六", "日"] @@ -1111,7 +1129,16 @@ class HongKongLocale(Locale): "12", ] - day_names = ["", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"] + day_names = [ + "", + "星期一", + "星期二", + "星期三", + "星期四", + "星期五", + "星期六", + "星期日", + ] day_abbreviations = ["", "一", "二", "三", "四", "五", "六", "日"] @@ -1181,11 +1208,32 @@ class KoreanLocale(Locale): "12", ] - day_names = ["", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"] + day_names = [ + "", + "월요일", + "화요일", + "수요일", + "목요일", + "금요일", + "토요일", + "일요일", + ] day_abbreviations = ["", "월", "화", "수", "목", "금", "토", "일"] def _ordinal_number(self, n: int) -> str: - ordinals = ["0", "첫", "두", "세", "네", "다섯", "여섯", "일곱", "여덟", "아홉", "열"] + ordinals = [ + "0", + "첫", + "두", + "세", + "네", + "다섯", + "여섯", + "일곱", + "여덟", + "아홉", + "열", + ] if n < len(ordinals): return f"{ordinals[n]}번째" return f"{n}번째" diff --git a/pyproject.toml b/pyproject.toml index 89609bd1..68e0d6c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", ] dependencies = [ diff --git a/tox.ini b/tox.ini index c410a8e5..51c2c6a6 100644 --- a/tox.ini +++ b/tox.ini @@ -1,18 +1,17 @@ [tox] minversion = 3.18.0 -envlist = py{py3,38,39,310,311,312} +envlist = py{py3,38,39,310,311,312,313} skip_missing_interpreters = true [gh-actions] python = pypy-3.7: pypy3 - 3.6: py36 - 3.7: py37 3.8: py38 3.9: py39 3.10: py310 3.11: py311 3.12: py312 + 3.13: py313 [testenv] deps = -r requirements/requirements-tests.txt From 4df28fd9b739aafef3962921105f8e67464d88f4 Mon Sep 17 00:00:00 2001 From: "Kristijan \"Fremen\" Velkovski" Date: Tue, 22 Oct 2024 01:08:12 -0500 Subject: [PATCH 2/2] drop dev for 3.13. --- .github/workflows/continuous_integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 241e2220..0f573850 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["pypy-3.9", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13-dev"] + python-version: ["pypy-3.9", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] os: [ubuntu-latest, macos-latest, windows-latest] exclude: # pypy3 randomly fails on Windows builds