Skip to content

Commit

Permalink
Drop support for Python 3.8 (#207)
Browse files Browse the repository at this point in the history
* Bump GitHub Actions

* Drop support for Python 3.8

* Allow testing feature branches
  • Loading branch information
hugovk authored Oct 3, 2024
1 parent d290c72 commit c960199
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: Build

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
tox-jobs:
Expand Down Expand Up @@ -33,10 +31,6 @@ jobs:
python: 'pypy3.10'
- os: ubuntu-latest
python: 'pypy3.9'
- os: ubuntu-latest
python: 'pypy3.8'
- os: ubuntu-latest
python: '3.8'
- os: ubuntu-latest
python: '3.9'
- os: ubuntu-latest
Expand All @@ -57,7 +51,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Set up Python ${{ matrix.python }} using deadsnakes
uses: deadsnakes/action@v3.1.0
uses: deadsnakes/action@v3.2.0
if: ${{ matrix.build == 'free-threading' }}
with:
python-version: ${{ matrix.python }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
Expand Down
6 changes: 1 addition & 5 deletions pyperf/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,7 @@ def test_parse_run_list(self):
self.assertRaises(ValueError, parse_run_list, '1,')

def test_setup_version(self):
try:
from importlib.metadata import version
except ModuleNotFoundError:
# Workaround for Python 3.7
from importlib_metadata import version
from importlib.metadata import version

self.assertEqual(pyperf.__version__, version("pyperf"))

Expand Down
10 changes: 2 additions & 8 deletions pyperf/tests/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,7 @@ def time_func(loops):

try:
s = pstats.Stats(name)
if sys.version_info < (3, 9):
assert len(s.stats)
else:
assert len(s.get_stats_profile().func_profiles)
assert len(s.get_stats_profile().func_profiles)
finally:
if os.path.isfile(name):
os.unlink(name)
Expand All @@ -123,10 +120,7 @@ def func():
try:
import pstats
s = pstats.Stats(name)
if sys.version_info < (3, 9):
assert len(s.stats)
else:
assert len(s.get_stats_profile().func_profiles)
assert len(s.get_stats_profile().func_profiles)
finally:
if os.path.isfile(name):
os.unlink(name)
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,12 @@ classifiers = [
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Libraries :: Python Modules"
]
requires-python = ">=3.7"
requires-python = ">=3.9"
dependencies = ["psutil>=5.9.0"]

[project.optional-dependencies]
dev = [
'tox',
'importlib-metadata; python_version < "3.8"'
]

[project.scripts]
Expand Down

0 comments on commit c960199

Please sign in to comment.