Skip to content

Commit

Permalink
Remove support for Python 3.7 (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann authored Jun 3, 2023
1 parent 48cf774 commit 5257aa9
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pytest-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.7.13'
python-version: '3.8'

- name: Install specific out-dated version of dependencies
# Update the package requirements when changing minimum dependency versions
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
- '3.10'
- '3.9'
- '3.8'
# Remove dependency `importlib_metadata` when dropping support for Python 3.7
- '3.7'

fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pyam: analysis & visualization <br /> of integrated-assessment and macro-energy

<!-- replace python version by dynamic reference to pypi once Python versions are configured there -->
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![python](https://img.shields.io/badge/python-≥3.7,<3.12-blue?logo=python&logoColor=white)](https://github.com/IAMconsortium/pyam)
[![python](https://img.shields.io/badge/python-≥3.8,<3.12-blue?logo=python&logoColor=white)](https://github.com/IAMconsortium/pyam)
[![pytest](https://github.com/IAMconsortium/pyam/actions/workflows/pytest.yml/badge.svg)](https://github.com/IAMconsortium/pyam/actions/workflows/pytest.yml)
[![ReadTheDocs](https://readthedocs.org/projects/pyam-iamc/badge/?version=latest)](https://pyam-iamc.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/IAMconsortium/pyam/branch/main/graph/badge.svg)](https://codecov.io/gh/IAMconsortium/pyam)
Expand Down
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Next Release

- [#747](https://github.com/IAMconsortium/pyam/pull/747) Drop support for Python 3.7 #747

# Release v1.9.0

## Highlights
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Release v\ |version|.
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black

.. |python| image:: https://img.shields.io/badge/python-≥3.7,<3.12-blue?logo=python&logoColor=white
.. |python| image:: https://img.shields.io/badge/python-≥3.8,<3.12-blue?logo=python&logoColor=white
:target: https://github.com/IAMconsortium/pyam

.. |pytest| image:: https://github.com/IAMconsortium/pyam/actions/workflows/pytest.yml/badge.svg
Expand Down
Binary file modified docs/logos/pyam-header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/logos/pyam-social-media.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions pyam/__init__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
from importlib.metadata import version, PackageNotFoundError
import logging
from pathlib import Path
from setuptools_scm import get_version

# use standard library for Python >=3.8
try:
from importlib.metadata import version, PackageNotFoundError
# use dedicated package for Python 3.7
except ModuleNotFoundError:
from importlib_metadata import version, PackageNotFoundError

from pyam.core import *
from pyam.slice import IamSlice # noqa: F401
from pyam.utils import *
Expand Down
5 changes: 2 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ classifiers =
[options]
packages = pyam
include_package_data = True
python_requires = >=3.7.1, <3.12
python_requires = >=3.8, <3.12

# NOTE TO DEVS
# If you change a minimum version below, please explicitly implement the change
Expand All @@ -32,6 +32,7 @@ install_requires =
pyjwt
httpx[http2]
openpyxl
# remove exception in test_io.py when changing requirement to pandas ≥ 1.5
pandas >= 1.2.0
scipy
pint >= 0.13
Expand All @@ -42,8 +43,6 @@ install_requires =
setuptools >= 41
setuptools_scm
wquantiles
# required explicitly for Python 3.7
importlib_metadata
xlsxwriter
setup_requires =
setuptools >= 41
Expand Down
2 changes: 1 addition & 1 deletion tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def test_io_csv_none(test_df_year):
)
try:
assert test_df_year.to_csv(lineterminator="\n") == exp
# special treatment for Python 3.7 and pandas < 1.5
# special treatment for pandas < 1.5 (used in the legacy tests)
except TypeError:
assert test_df_year.to_csv(line_terminator="\n") == exp

Expand Down

0 comments on commit 5257aa9

Please sign in to comment.