From eb9cdc70be731e458d9063e914fd23695959bc2c Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 13 Dec 2021 00:59:49 +0200 Subject: Drop support for Python <= 3.6 --- .pre-commit-config.yaml | 5 +++++ setup.cfg | 2 -- setup.py | 2 +- src/isodate/duration.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 setup.cfg diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c00dfd9..05cc6be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,9 @@ repos: + - repo: https://github.com/asottile/pyupgrade + rev: v2.10.0 + hooks: + - id: pyupgrade + args: ["--py37-plus"] - repo: https://github.com/pycqa/flake8 rev: 3.9.1 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2a9acf1..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal = 1 diff --git a/setup.py b/setup.py index d5a3427..b569eab 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ setup( "Programming Language :: Python :: 3.10", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet", - ("Topic :: Software Development :" ": Libraries :: Python Modules"), + "Topic :: Software Development :" ": Libraries :: Python Modules", ], test_suite="isodate.tests.test_suite", ) diff --git a/src/isodate/duration.py b/src/isodate/duration.py index 3803d1c..f771b54 100644 --- a/src/isodate/duration.py +++ b/src/isodate/duration.py @@ -38,7 +38,7 @@ def max_days_in_month(year, month): return 28 -class Duration(object): +class Duration: """ A class which represents a duration. -- cgit v1.2.1 From 8431ea97a43be74889121b3f1df6a11b968c5bf7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 13 Dec 2021 01:00:55 +0200 Subject: Simplify cache config --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 17 ++--------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6f8c677..5b01bde 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,4 +9,4 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.2 + - uses: pre-commit/action@v2.0.3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 098d327..4ebcf46 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,21 +26,8 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - - name: Get pip cache dir - id: pip-cache - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache - uses: actions/cache@v2 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: - ${{ matrix.os }}-${{ matrix.python-version }}-v1-${{ - hashFiles('**/setup.py') }} - restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}-v1- + cache: pip + cache-dependency-path: "setup.py" - name: Install dependencies run: | -- cgit v1.2.1 From 7f1a6b48ac1343c46cab7a84d15883f80e566e3a Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 13 Dec 2021 08:19:21 +0200 Subject: Add python_requires to help pip --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index b569eab..fa48885 100644 --- a/setup.py +++ b/setup.py @@ -22,6 +22,7 @@ setup( # keywords = '', url="https://github.com/gweis/isodate/", long_description=(read("README.rst") + read("CHANGES.txt") + read("TODO.txt")), + python_requires=">=3.7", classifiers=[ "Development Status :: 4 - Beta", # 'Environment :: Web Environment', -- cgit v1.2.1 From 4a74ce214ba23ab6c0404a2ec31ab7429e8f42c6 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 13 Dec 2021 08:24:13 +0200 Subject: Update pre-commit --- .pre-commit-config.yaml | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 05cc6be..30b419f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,38 @@ repos: - repo: https://github.com/asottile/pyupgrade - rev: v2.10.0 + rev: v2.29.1 hooks: - id: pyupgrade - args: ["--py37-plus"] + args: [--py37-plus] + + - repo: https://github.com/psf/black + rev: 21.12b0 + hooks: + - id: black + args: [--target-version=py36] + + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 + hooks: + - id: isort - repo: https://github.com/pycqa/flake8 - rev: 3.9.1 + rev: 4.0.1 hooks: - id: flake8 + additional_dependencies: [flake8-2020, flake8-implicit-str-concat] args: - "--max-line-length=88" + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.9.0 + hooks: + - id: python-check-blanket-noqa + - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.0.1 hooks: - id: check-merge-conflict - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace -- cgit v1.2.1 From c19e4c3ab2cb3adf10e278f4abce14d15ee66745 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 13 Dec 2021 08:29:42 +0200 Subject: Fix CI --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 6 +++--- .pre-commit-config.yaml | 12 ------------ README.rst | 4 ++-- 4 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5b01bde..769ea4e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,6 +1,6 @@ name: Lint -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: lint: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ebcf46..edf58a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,17 +1,17 @@ name: Test -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] env: FORCE_COLOR: 1 jobs: - build: + test: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "pypy3"] + python-version: ["pypy-3.8", "3.7", "3.8", "3.9", "3.10"] os: [ubuntu-latest, macos-latest, windows-latest] include: # Include new variables for Codecov diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 30b419f..1f04e3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,22 +5,10 @@ repos: - id: pyupgrade args: [--py37-plus] - - repo: https://github.com/psf/black - rev: 21.12b0 - hooks: - - id: black - args: [--target-version=py36] - - - repo: https://github.com/PyCQA/isort - rev: 5.10.1 - hooks: - - id: isort - - repo: https://github.com/pycqa/flake8 rev: 4.0.1 hooks: - id: flake8 - additional_dependencies: [flake8-2020, flake8-implicit-str-concat] args: - "--max-line-length=88" diff --git a/README.rst b/README.rst index 63a56d5..d030a4a 100644 --- a/README.rst +++ b/README.rst @@ -9,10 +9,10 @@ ISO 8601 date/time parser :target: https://coveralls.io/r/gweis/isodate?branch=master :alt: Coveralls .. image:: https://img.shields.io/pypi/v/isodate.svg - :target: https://pypi.python.org/pypi/isodate/ + :target: https://pypi.python.org/pypi/isodate/ :alt: Latest Version .. image:: https://img.shields.io/pypi/l/isodate.svg - :target: https://pypi.python.org/pypi/isodate/ + :target: https://pypi.python.org/pypi/isodate/ :alt: License -- cgit v1.2.1 From 68a4bbe0a460dc7a8f038fe0f3714851558c379d Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 12 Mar 2022 12:12:16 +0200 Subject: Join classifier string --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index fa48885..f95e8c2 100644 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ setup( "Programming Language :: Python :: 3.10", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet", - "Topic :: Software Development :" ": Libraries :: Python Modules", + "Topic :: Software Development :: Libraries :: Python Modules", ], test_suite="isodate.tests.test_suite", ) -- cgit v1.2.1