Skip to content

Commit

Permalink
Drop support for Python 3.8, which is at end of life
Browse files Browse the repository at this point in the history
Also add tests for Python 3.13.
  • Loading branch information
lpsinger committed Dec 4, 2024
1 parent e889e7b commit 110db61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ jobs:
with:
coverage: 'codecov'
envs: |
- linux: py38
- linux: py39
- linux: py310
- linux: py311
- linux: py312
- macos: py38
- linux: py313
- macos: py39
- macos: py310
- macos: py311
- macos: py312
- windows: py38
- macos: py313
- windows: py39
- windows: py310
- windows: py311
- windows: py312
- windows: py313
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
11 changes: 1 addition & 10 deletions gcn_kafka/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,6 @@
replacement_dict = {"_": ".", "__": "-", "___": "_"}


# Adapted from https://peps.python.org/pep-0616/
# # FIXME: Remove after dropping support for Python 3.8
def removeprefix(self: str, prefix: str) -> str:
if self.startswith(prefix):
return self[len(prefix) :]
else:
return self[:]


def replacement(match: re.Match) -> str:
text = match[0]
return replacement_dict.get(text) or text
Expand All @@ -40,6 +31,6 @@ def config_from_env(
config = {}
for key, value in env.items():
if key.startswith(prefix):
key = env_key_splitter.sub(replacement, removeprefix(key, prefix))
key = env_key_splitter.sub(replacement, key.removeprefix(prefix))
config[key.lower()] = value
return config
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies = [
"confluent-kafka >= 2.2.0",
"requests",
]
requires-python = ">=3.8"
requires-python = ">=3.9"
dynamic = [ "version" ]

[project.urls]
Expand Down

0 comments on commit 110db61

Please sign in to comment.