Skip to content

Commit 71d5233

Browse files
committed
Merge remote-tracking branch 'upstream/master' into 1014/all-granularity
2 parents 804eece + 87a1a77 commit 71d5233

34 files changed

+2292
-1346
lines changed

.github/workflows/continuous_integration.yml

Lines changed: 31 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -9,115 +9,72 @@ on:
99
- cron: "0 0 1 * *"
1010

1111
jobs:
12-
test:
12+
unit-tests:
1313
name: ${{ matrix.os }} (${{ matrix.python-version }})
1414
runs-on: ${{ matrix.os }}
15-
1615
strategy:
1716
fail-fast: false
1817
matrix:
19-
python-version: ["pypy-3.7", "3.6", "3.7", "3.8", "3.9", "3.10"]
18+
python-version: ["pypy-3.9", "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
2019
os: [ubuntu-latest, macos-latest, windows-latest]
2120
exclude:
2221
# pypy3 randomly fails on Windows builds
2322
- os: windows-latest
24-
python-version: "pypy-3.7"
25-
23+
python-version: "pypy-3.9"
24+
include:
25+
- os: ubuntu-latest
26+
path: ~/.cache/pip
27+
- os: macos-latest
28+
path: ~/Library/Caches/pip
29+
- os: windows-latest
30+
path: ~\AppData\Local\pip\Cache
2631
steps:
27-
# Check out latest code
28-
- uses: actions/checkout@v2
29-
30-
# Configure pip cache
31-
- name: Cache pip (Linux)
32-
uses: actions/cache@v2
33-
if: startsWith(runner.os, 'Linux')
34-
with:
35-
path: ~/.cache/pip
36-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
37-
restore-keys: |
38-
${{ runner.os }}-pip-
39-
40-
- name: Cache pip (macOS)
41-
uses: actions/cache@v2
42-
if: startsWith(runner.os, 'macOS')
43-
with:
44-
path: ~/Library/Caches/pip
45-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
46-
restore-keys: |
47-
${{ runner.os }}-pip-
48-
49-
- name: Cache pip (Windows)
50-
uses: actions/cache@v2
51-
if: startsWith(runner.os, 'Windows')
32+
- uses: actions/checkout@v3
33+
- name: Cache pip
34+
uses: actions/cache@v3
5235
with:
53-
path: ~\AppData\Local\pip\Cache
54-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
55-
restore-keys: |
56-
${{ runner.os }}-pip-
57-
58-
# Set up Python
36+
path: ${{ matrix.path }}
37+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
38+
restore-keys: ${{ runner.os }}-pip-
5939
- name: Set up Python ${{ matrix.python-version }}
60-
uses: actions/setup-python@v2
40+
uses: actions/setup-python@v4
6141
with:
6242
python-version: ${{ matrix.python-version }}
63-
64-
# Install dependencies
6543
- name: Install dependencies
6644
run: |
6745
pip install -U pip setuptools wheel
6846
pip install -U tox tox-gh-actions
69-
70-
# Run tests
7147
- name: Test with tox
7248
run: tox
73-
74-
# Upload coverage report
7549
- name: Upload coverage to Codecov
76-
uses: codecov/codecov-action@v2
50+
uses: codecov/codecov-action@v3
7751
with:
7852
file: coverage.xml
7953

80-
lint:
54+
linting:
55+
name: Linting
8156
runs-on: ubuntu-latest
82-
8357
steps:
84-
# Check out latest code
85-
- uses: actions/checkout@v2
86-
87-
# Set up Python
88-
- name: Set up Python 3.10
89-
uses: actions/setup-python@v2
90-
with:
91-
python-version: "3.10"
92-
93-
# Configure pip cache
94-
- name: Cache pip
95-
uses: actions/cache@v2
58+
- uses: actions/checkout@v3
59+
- uses: actions/cache@v3
9660
with:
9761
path: ~/.cache/pip
98-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
99-
restore-keys: |
100-
${{ runner.os }}-pip-
101-
102-
# Configure pre-commit cache
103-
- name: Cache pre-commit
104-
uses: actions/cache@v2
62+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
63+
restore-keys: ${{ runner.os }}-pip-
64+
- uses: actions/cache@v3
10565
with:
10666
path: ~/.cache/pre-commit
10767
key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
108-
restore-keys: |
109-
${{ runner.os }}-pre-commit-
110-
111-
# Install dependencies
68+
restore-keys: ${{ runner.os }}-pre-commit-
69+
- name: Set up Python ${{ runner.python-version }}
70+
uses: actions/setup-python@v4
71+
with:
72+
python-version: "3.11"
11273
- name: Install dependencies
11374
run: |
11475
pip install -U pip setuptools wheel
11576
pip install -U tox
116-
117-
# Lint code
11877
- name: Lint code
119-
run: tox -e lint
120-
121-
# Lint docs
78+
run: tox -e lint -- --show-diff-on-failure
12279
- name: Lint docs
12380
run: tox -e docs

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch: # run manually
5+
push: # run on matching tags
6+
tags:
7+
- '*.*.*'
8+
9+
jobs:
10+
release-to-pypi:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/cache@v3
15+
with:
16+
path: ~/.cache/pip
17+
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
18+
restore-keys: ${{ runner.os }}-pip-
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.11"
22+
- name: Install dependencies
23+
run: |
24+
pip install -U pip setuptools wheel
25+
pip install -U tox
26+
- name: Publish package to PyPI
27+
env:
28+
FLIT_USERNAME: __token__
29+
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
30+
run: tox -e publish

.pre-commit-config.yaml

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,53 @@ default_language_version:
22
python: python3
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.0.1
5+
rev: v4.4.0
66
hooks:
7-
- id: trailing-whitespace
8-
- id: end-of-file-fixer
9-
- id: fix-encoding-pragma
10-
args: [--remove]
11-
- id: requirements-txt-fixer
127
- id: check-ast
138
- id: check-yaml
149
- id: check-case-conflict
1510
- id: check-docstring-first
1611
- id: check-merge-conflict
12+
- id: check-builtin-literals
1713
- id: debug-statements
14+
- id: end-of-file-fixer
15+
- id: fix-encoding-pragma
16+
args: [--remove]
17+
- id: requirements-txt-fixer
18+
args: [requirements/requirements.txt, requirements/requirements-docs.txt, requirements/requirements-tests.txt]
19+
- id: trailing-whitespace
1820
- repo: https://github.com/timothycrosley/isort
19-
rev: 5.9.3
21+
rev: 5.12.0
2022
hooks:
2123
- id: isort
2224
- repo: https://github.com/asottile/pyupgrade
23-
rev: v2.29.0
25+
rev: v3.13.0
2426
hooks:
2527
- id: pyupgrade
2628
args: [--py36-plus]
2729
- repo: https://github.com/pre-commit/pygrep-hooks
28-
rev: v1.9.0
30+
rev: v1.10.0
2931
hooks:
3032
- id: python-no-eval
3133
- id: python-check-blanket-noqa
34+
- id: python-check-mock-methods
3235
- id: python-use-type-annotations
3336
- id: rst-backticks
3437
- id: rst-directive-colons
3538
- id: rst-inline-touching-normal
39+
- id: text-unicode-replacement-char
3640
- repo: https://github.com/psf/black
37-
rev: 21.9b0
41+
rev: 23.9.1
3842
hooks:
3943
- id: black
4044
args: [--safe, --quiet, --target-version=py36]
4145
- repo: https://github.com/pycqa/flake8
42-
rev: 4.0.1
46+
rev: 6.1.0
4347
hooks:
4448
- id: flake8
4549
additional_dependencies: [flake8-bugbear,flake8-annotations]
4650
- repo: https://github.com/pre-commit/mirrors-mypy
47-
rev: 'v0.910-1'
51+
rev: v1.5.1
4852
hooks:
4953
- id: mypy
5054
additional_dependencies: [types-python-dateutil]

.readthedocs.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.11"
10+
11+
# Build documentation in the "docs/" directory with Sphinx
12+
sphinx:
13+
configuration: docs/conf.py
14+
# You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs
15+
# builder: "dirhtml"
16+
# Fail on all warnings to avoid broken references
17+
# fail_on_warning: true
18+
19+
# Optionally build your docs in additional formats such as PDF and ePub
20+
# formats:
21+
# - pdf
22+
# - epub
23+
24+
# Optional but recommended, declare the Python requirements required
25+
# to build your documentation
26+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
27+
python:
28+
install:
29+
- requirements: requirements/requirements-docs.txt

CHANGELOG.rst

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
Changelog
22
=========
33

4+
1.3.0 (2023-09-30)
5+
------------------
6+
7+
- [ADDED] Added official support for Python 3.11 and 3.12.
8+
- [ADDED] Added dependency on ``types-python-dateutil`` to improve Arrow mypy compatibility. `PR #1102 <https://github.com/arrow-py/arrow/pull/1102>`_
9+
- [FIX] Updates to Italian, Romansh, Hungarian, Finish and Arabic locales.
10+
- [FIX] Handling parsing of UTC prefix in timezone strings.
11+
- [CHANGED] Update documentation to improve readability.
12+
- [CHANGED] Dropped support for Python 3.6 and 3.7, which are end-of-life.
13+
- [INTERNAL] Migrate from ``setup.py``/Twine to ``pyproject.toml``/Flit for packaging and distribution.
14+
- [INTERNAL] Adopt ``.readthedocs.yaml`` configuration file for continued ReadTheDocs support.
15+
16+
1.2.3 (2022-06-25)
17+
------------------
18+
19+
- [NEW] Added Amharic, Armenian, Georgian, Laotian and Uzbek locales.
20+
- [FIX] Updated Danish locale and associated tests.
21+
- [INTERNAL] Small fixes to CI.
22+
23+
1.2.2 (2022-01-19)
24+
------------------
25+
26+
- [NEW] Added Kazakh locale.
27+
- [FIX] The Belarusian, Bulgarian, Czech, Macedonian, Polish, Russian, Slovak and Ukrainian locales now support ``dehumanize``.
28+
- [FIX] Minor bug fixes and improvements to ChineseCN, Indonesian, Norwegian, and Russian locales.
29+
- [FIX] Expanded testing for multiple locales.
30+
- [INTERNAL] Started using ``xelatex`` for pdf generation in documentation.
31+
- [INTERNAL] Split requirements file into ``requirements.txt``, ``requirements-docs.txt`` and ``requirements-tests.txt``.
32+
- [INTERNAL] Added ``flake8-annotations`` package for type linting in ``pre-commit``.
33+
434
1.2.1 (2021-10-24)
535
------------------
636

@@ -267,7 +297,7 @@ After 8 years we're pleased to announce Arrow v1.0. Thanks to the entire Python
267297
- [FIX] Consolidated and simplified German locales.
268298
- [INTERNAL] Moved testing suite from nosetest/Chai to pytest/pytest-mock.
269299
- [INTERNAL] Converted xunit-style setup and teardown functions in tests to pytest fixtures.
270-
- [INTERNAL] Setup Github Actions for CI alongside Travis.
300+
- [INTERNAL] Setup GitHub Actions for CI alongside Travis.
271301
- [INTERNAL] Help support Arrow's future development by donating to the project on `Open Collective <https://opencollective.com/arrow>`_.
272302

273303
0.15.5 (2020-01-03)
@@ -641,7 +671,7 @@ The following will work in v0.15.0:
641671
- [NEW] Brazilian locale (Augusto2112)
642672
- [NEW] Dutch locale (OrangeTux)
643673
- [NEW] Italian locale (Pertux)
644-
- [NEW] Austrain locale (LeChewbacca)
674+
- [NEW] Austrian locale (LeChewbacca)
645675
- [NEW] Tagalog locale (Marksteve)
646676
- [FIX] Corrected spelling and day numbers in German locale (LeChewbacca)
647677
- [FIX] Factory ``get`` method should now handle unicode strings correctly (Bwells)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2021 Chris Smith
189+
Copyright 2023 Chris Smith
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

MANIFEST.in

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)