Skip to content

Commit 6ad6c0c

Browse files
authored
chore: support Python 3.14 (#302)
* support Python 3.14 Signed-off-by: gruebel <anton.gruebel@gmail.com> * exclude Python 3.14 for flagd Signed-off-by: gruebel <anton.gruebel@gmail.com> --------- Signed-off-by: gruebel <anton.gruebel@gmail.com>
1 parent 9590554 commit 6ad6c0c

File tree

3 files changed

+564
-537
lines changed

3 files changed

+564
-537
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,30 @@ jobs:
3535
filters: |
3636
hooks/openfeature-hooks-opentelemetry:
3737
- 'hooks/openfeature-hooks-opentelemetry/**'
38+
- 'uv.lock'
3839
providers/openfeature-provider-env-var:
3940
- 'providers/openfeature-provider-env-var/**'
41+
- 'uv.lock'
4042
providers/openfeature-provider-flagd:
4143
- 'providers/openfeature-provider-flagd/**'
44+
- 'uv.lock'
4245
providers/openfeature-provider-flipt:
4346
- 'providers/openfeature-provider-flipt/**'
47+
- 'uv.lock'
4448
providers/openfeature-provider-ofrep:
4549
- 'providers/openfeature-provider-ofrep/**'
50+
- 'uv.lock'
4651
4752
build:
4853
needs: changes
4954
runs-on: ubuntu-latest
5055
strategy:
5156
matrix:
52-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
57+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
5358
package: ${{ fromJSON(needs.changes.outputs.packages) }}
59+
exclude: # enable when `grpcio` has Python 3.14 wheels
60+
- python-version: "3.14"
61+
package: "providers/openfeature-provider-flagd"
5462
steps:
5563
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
5664
with:

providers/openfeature-provider-flagd/tests/e2e/flagd_container.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import grpc
77
from grpc_health.v1 import health_pb2, health_pb2_grpc
88
from testcontainers.core.container import DockerContainer
9-
from testcontainers.core.waiting_utils import wait_container_is_ready, wait_for_logs
9+
from testcontainers.core.wait_strategies import LogMessageWaitStrategy
1010

1111
from openfeature.contrib.provider.flagd.config import ResolverType
1212

@@ -32,6 +32,7 @@ def __init__(
3232
self.flagDir.mkdir(parents=True, exist_ok=True)
3333
self.with_exposed_ports(self.rpc, self.ipr, HEALTH_CHECK, LAUNCHPAD)
3434
self.with_volume_mapping(os.path.abspath(self.flagDir.name), "/flags", "rw")
35+
self.waiting_for(LogMessageWaitStrategy("listening").with_startup_timeout(5))
3536

3637
def get_port(self, resolver_type: ResolverType):
3738
if resolver_type == ResolverType.RPC:
@@ -47,15 +48,8 @@ def start(self) -> "FlagdContainer":
4748
self._checker(self.get_container_host_ip(), self.get_exposed_port(HEALTH_CHECK))
4849
return self
4950

50-
@wait_container_is_ready(ConnectionError)
5151
def _checker(self, host: str, port: int) -> None:
52-
# First we wait for Flagd to say it's listening
53-
wait_for_logs(
54-
self,
55-
"listening",
56-
5,
57-
)
58-
52+
# Give an extra second before continuing
5953
time.sleep(1)
6054
# Second we use the GRPC health check endpoint
6155
with grpc.insecure_channel(host + ":" + str(port)) as channel:

0 commit comments

Comments
 (0)