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, which is at end of life #48

Merged
merged 1 commit into from
Dec 4, 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
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
Loading