Skip to content

Commit

Permalink
Drop Python 2.7 support
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Jul 24, 2024
1 parent 2ea8c73 commit e211deb
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -48,17 +49,19 @@ 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
- run: pip3 install dist/iso4217-*.whl sphinx-fakeinv
- 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
3 changes: 1 addition & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion iso4217/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__))
Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down

0 comments on commit e211deb

Please sign in to comment.