Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for Python 3.8 #207

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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