From e211deb7ce642fad157273ccaacc29f0e2e6f482 Mon Sep 17 00:00:00 2001 From: Hong Minhee Date: Wed, 24 Jul 2024 10:54:50 +0900 Subject: [PATCH] Drop Python 2.7 support --- .github/workflows/main.yaml | 31 +++++++++++++++++-------------- README.rst | 3 +-- iso4217/__init__.py | 2 +- setup.cfg | 5 ++--- tox.ini | 4 ++-- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6ae54cb..6414d15 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,11 +5,11 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: pip3 install flake8 wheel - run: python3 setup.py sdist bdist_wheel - run: flake8 . - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: dist path: dist @@ -19,21 +19,22 @@ jobs: strategy: matrix: python-version: - - 3.10.1 - - 3.9.9 - - 3.8.12 - - 3.7.12 + - 3.12.4 + - 3.11.9 + - 3.10.14 + - 3.9.19 + - 3.8.18 + - 3.7.17 - 3.6.15 - - 2.7.18 - - pypy-3.8 - - pypy-2.7 + - pypy-3.9 + - pypy-3.10 fail-fast: false runs-on: ubuntu-20.04 steps: - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: dist path: dist @@ -48,8 +49,10 @@ jobs: if: "github.event_name == 'push'" needs: [build] runs-on: ubuntu-latest + permissions: + contents: write steps: - - uses: actions/download-artifact@v2 + - uses: actions/download-artifact@v4 with: name: dist path: dist @@ -57,8 +60,8 @@ jobs: - run: mkdir -p /tmp/fakeinv/ - run: sphinx-fakeinv iso4217 > /tmp/fakeinv/objects.inv - run: touch /tmp/fakeinv/.nojekyll - - uses: peaceiris/actions-gh-pages@v3 + - uses: peaceiris/actions-gh-pages@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ github.token }} publish_dir: /tmp/fakeinv force_orphan: true diff --git a/README.rst b/README.rst index ccd9c83..e0f77e9 100644 --- a/README.rst +++ b/README.rst @@ -7,8 +7,7 @@ :target: https://github.com/dahlia/iso4217/actions/workflows/main.yaml This Python package contains `ISO 4217`_ currency data, represented as -enum_ module which was introduced in 3.4. Note that this works on Python 2.7 -as well as 3.10, the latest version of Python, through enum34_ package. +enum_ module which was introduced in 3.4. >>> from iso4217 import Currency >>> Currency.usd diff --git a/iso4217/__init__.py b/iso4217/__init__.py index 53cb434..7a9614c 100644 --- a/iso4217/__init__.py +++ b/iso4217/__init__.py @@ -32,7 +32,7 @@ def parse_published(pblshd): raw_xml = etree.fromstring(files(__name__).joinpath('table.xml').read_bytes()) __published__ = parse_published(raw_xml.attrib['Pblshd']) -__version_prefix__ = (1, 11) +__version_prefix__ = (1, 12) __version_info__ = (__version_prefix__ + (int(__published__.strftime('%Y%m%d')),)) __version__ = '.'.join(map(str, __version_info__)) diff --git a/setup.cfg b/setup.cfg index 2d1dd9f..60b185b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -14,13 +14,14 @@ classifiers = Intended Audience :: Developers License :: Public Domain Operating System :: OS Independent - Programming Language :: Python :: 2.7 Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 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 Programming Language :: Python :: Implementation :: PyPy Programming Language :: Python :: Implementation :: Stackless @@ -34,8 +35,6 @@ python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* install_requires = importlib-resources; python_version >"3.5" and python_version <"3.9" importlib-resources<3.3; python_version =="3.5" - importlib-resources<4.0; python_version =="2.7" - enum34; python_version =="2.7" [options.package_data] iso4217 = diff --git a/tox.ini b/tox.ini index 4ab92b3..c80b81c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] -envlist = pypy, py27, pypy3, py35, py36, py37, py38, py39, py310 -minversion = 1.6.0 +envlist = pypy3, py35, py36, py37, py38, py39, py310, py311, py312 +minversion = 4.14.0 [testenv] deps =