Skip to content

Commit cba0fdc

Browse files
authored
chore: Drop Python 3.9 support (#322)
Signed-off-by: Sreekanth <prsreekanth920@gmail.com>
1 parent a83067c commit cba0fdc

34 files changed

Lines changed: 220 additions & 364 deletions

File tree

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9"]
19+
python-version: ["3.10"]
2020

2121
steps:
2222
- uses: actions/checkout@v3

.github/workflows/pypi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: [ "3.9" ]
18+
python-version: [ "3.10" ]
1919

2020
name: Publish to PyPi
2121
steps:

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
19+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
2020

2121
steps:
2222
- uses: actions/checkout@v3

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
default_language_version:
2-
python: python3.9
2+
python: python3.10
33
repos:
44
- repo: https://github.com/psf/black
55
rev: 23.3.0
66
hooks:
77
- id: black
8-
language_version: python3.9
8+
language_version: python3.10
99
args: [--config=pyproject.toml, --diff, --color ]
1010
- repo: https://github.com/charliermarsh/ruff-pre-commit
1111
rev: 'v0.0.264'

packages/pynumaflow/docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Thank you for your interest in contributing to pynumaflow! This guide will help
66

77
### Prerequisites
88

9-
- Python 3.9 or higher
9+
- Python 3.10 or higher
1010
- [Poetry](https://python-poetry.org/) for dependency management
1111
- Git
1212

packages/pynumaflow/examples/sourcetransform/async_event_time_filter/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ readme = "README.md"
77
packages = [{include = "mapt_event_time_filter"}]
88

99
[tool.poetry.dependencies]
10-
python = ">=3.9, <3.12"
10+
python = ">=3.10, <3.12"
1111
pynumaflow = { path = "../../../"}
1212

1313
[build-system]

packages/pynumaflow/examples/sourcetransform/event_time_filter/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ readme = "README.md"
77
packages = [{include = "mapt_event_time_filter"}]
88

99
[tool.poetry.dependencies]
10-
python = ">=3.9, <3.12"
10+
python = ">=3.10, <3.12"
1111
pynumaflow = { path = "../../../"}
1212

1313
[build-system]

packages/pynumaflow/poetry.lock

Lines changed: 4 additions & 71 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/pynumaflow/pynumaflow/_metadata.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from dataclasses import dataclass, field
2-
from typing import Optional
2+
33
from pynumaflow.proto.common import metadata_pb2
44

55
"""
@@ -48,7 +48,7 @@ def keys(self, group: str) -> list[str]:
4848
"""
4949
return list(self._data.get(group, {}).keys())
5050

51-
def value(self, group: str, key: str) -> Optional[bytes]:
51+
def value(self, group: str, key: str) -> bytes | None:
5252
"""
5353
Returns the value for a given group and key.
5454
"""
@@ -108,7 +108,7 @@ def __len__(self) -> int:
108108
"""
109109
return len(self._data)
110110

111-
def value(self, group: str, key: str) -> Optional[bytes]:
111+
def value(self, group: str, key: str) -> bytes | None:
112112
"""
113113
Returns the value for a given group and key.
114114
If the group or key does not exist, returns None.
@@ -124,7 +124,7 @@ def add_key(self, group: str, key: str, value: bytes):
124124
"""
125125
self._data.setdefault(group, {})[key] = value
126126

127-
def remove_key(self, group: str, key: str) -> Optional[bytes]:
127+
def remove_key(self, group: str, key: str) -> bytes | None:
128128
"""
129129
Removes the key and its value for a given group and returns the value.
130130
If this key is the only key in the group, the group will be removed.
@@ -138,7 +138,7 @@ def remove_key(self, group: str, key: str) -> Optional[bytes]:
138138
self._data[group] = group_data
139139
return value
140140

141-
def remove_group(self, group: str) -> Optional[dict[str, bytes]]:
141+
def remove_group(self, group: str) -> dict[str, bytes] | None:
142142
"""
143143
Removes the group and all its keys and values and returns the data.
144144
Returns None if the group does not exist.

0 commit comments

Comments
 (0)