From 6f2255689df225a389e9c700a7b3f7acc44b0efa Mon Sep 17 00:00:00 2001 From: ddkasa Date: Wed, 24 Jan 2024 15:06:21 +0000 Subject: [PATCH] chore: python 3.12 support (#319) --- .github/workflows/tests.yaml | 8 ++++---- requirements.txt | 3 ++- setup.cfg | 4 ++-- toggl/utils/migrations.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2387723..a302d74 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -3,10 +3,10 @@ name: Tests on: push: branches: - - 'master' + - "master" pull_request: branches: - - '**' + - "**" jobs: python: @@ -15,7 +15,7 @@ jobs: strategy: max-parallel: 1 matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout @@ -26,7 +26,7 @@ jobs: - name: Use Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: - cache: 'pip' + cache: "pip" python-version: ${{ matrix.python-version }} - name: Install requirements diff --git a/requirements.txt b/requirements.txt index 4c49beb..762e25a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ -pendulum==2.1.2 +setuptools==69.0.3 +pendulum==3.0.0 requests>=2.23.0 click==8.1.3 inquirer==2.9.1 diff --git a/setup.cfg b/setup.cfg index 35a6149..7305e2e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ author = D. Robert Adams & Adam Uhlir author_email = adam@uhlir.dev license = MIT home_page = https://toggl.uhlir.dev -python_requires = >=3.7.0 +python_requires = >=3.8.0 project_urls = Source = https://github.com/auhau/toggl-cli Documentation = https://toggl.uhlir.devg @@ -15,11 +15,11 @@ classifier = License :: OSI Approved :: MIT License Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 Programming Language :: Python :: Implementation :: CPython Development Status :: 5 - Production/Stable Topic :: Office/Business :: Scheduling diff --git a/toggl/utils/migrations.py b/toggl/utils/migrations.py index b5a125f..e011138 100644 --- a/toggl/utils/migrations.py +++ b/toggl/utils/migrations.py @@ -97,7 +97,7 @@ def migrate_datetime(parser): # type: (configparser.ConfigParser) -> None @staticmethod def migrate_timezone(parser): # type: (configparser.ConfigParser) -> None tz = parser.get('options', 'timezone') - if tz not in pendulum.timezones: + if tz not in pendulum.timezones(): click.echo('We have not recognized your timezone!') new_tz = inquirer.shortcuts.text( 'Please enter valid timezone. Default is your system\'s timezone.',