Skip to content

Commit

Permalink
Drop Python 3.8 support (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored Oct 27, 2024
1 parent 3e14604 commit 3427802
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 254 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
strategy:
matrix:
python-version:
- 3.8
- 3.9
- '3.10'
- '3.11'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ repos:
rev: v3.17.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.10.0
hooks:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Changelog
=========

* Drop Python 3.8 support.

* Support Python 3.13.

2.13.0 (2023-07-10)
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Use **pip**:
python -m pip install ec2-metadata
Python 3.8 to 3.13 supported.
Python 3.9 to 3.13 supported.

Why?
====
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ keywords = [
authors = [
{ name = "Adam Johnson", email = "[email protected]" },
]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down
9 changes: 1 addition & 8 deletions src/ec2_metadata/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from __future__ import annotations

import datetime as dt
import sys
import time
from collections.abc import Iterator
from collections.abc import Mapping
Expand Down Expand Up @@ -289,13 +288,7 @@ def user_data(self) -> bytes | None:
return resp.content


if sys.version_info > (3, 9):
InstanceTagsBase = Mapping[str, str]
else:
InstanceTagsBase = Mapping


class InstanceTags(InstanceTagsBase):
class InstanceTags(Mapping[str, str]):
def __init__(self, names: list[str], parent: EC2Metadata) -> None:
self._map: dict[str, str | None] = dict.fromkeys(names)
self.parent = parent
Expand Down
1 change: 0 additions & 1 deletion tests/requirements/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*sys.argv[1:],
]
run = partial(subprocess.run, check=True)
run([*common_args, "--python", "3.8", "--output-file", "py38.txt"])
run([*common_args, "--python", "3.9", "--output-file", "py39.txt"])
run([*common_args, "--python", "3.10", "--output-file", "py310.txt"])
run([*common_args, "--python", "3.11", "--output-file", "py311.txt"])
Expand Down
238 changes: 0 additions & 238 deletions tests/requirements/py38.txt

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_ec2_metadata.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

import datetime as dt
from collections.abc import Generator
from typing import Any
from typing import Generator

import pytest
import requests
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires =
tox>=4.2
env_list =
py{313, 312, 311, 310, 39, 38}
py{313, 312, 311, 310, 39}

[testenv]
package = wheel
Expand Down

0 comments on commit 3427802

Please sign in to comment.