diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d388b739..1c4300a2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ -# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3.9, 3.8, 3-bullseye, 3.10-bullseye, 3.9-bullseye, 3.8-bullseye, 3-buster, 3.10-buster, 3.9-buster, 3.8-buster -ARG VARIANT=3.8 +# [Choice] Python version (use -bullseye variants on local arm64/Apple Silicon): 3, 3.10, 3-bullseye, 3.10-bullseye, 3-buster, 3.10-buster +ARG VARIANT=3.10 FROM mcr.microsoft.com/vscode/devcontainers/python:${VARIANT} # [Choice] Node.js version: none, lts/*, 16, 14, 12, 10 @@ -21,8 +21,8 @@ RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv ENV PYENV_ROOT="/home/vscode/.pyenv" ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" -RUN pyenv install 3.8 3.9 3.10 3.11 3.12 3.13 -RUN pyenv local 3.8 3.9 3.10 3.11 3.12 3.13 +RUN pyenv install 3.10 3.11 3.12 3.13 +RUN pyenv local 3.10 3.11 3.12 3.13 RUN pyenv global ${VARIANT} # Set up pyenv-virtualenv diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2407beed..6aa35428 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,7 +4,7 @@ "dockerfile": "Dockerfile", "context": "..", "args": { - // Update 'VARIANT' to pick a Python version: 3, 3.13, 3.12, 3.11, 3.10, 3.9, 3.8 + // Update 'VARIANT' to pick a Python version: 3, 3.13, 3.12, 3.11, 3.10 // Append -bullseye or -buster to pin to an OS version. // Use -bullseye variants on local on arm64/Apple Silicon. "VARIANT": "3.10", diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aaf531c..a9d61359 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ - ## Unreleased (v7.0.0) * (Major): Python 3.10 or newer is required. Support for Python 3.8 and 3.9 has been dropped. * (Major): `UnleashClient` and `AsyncUnleashClient` take their settings as option groups: `identity=IdentityOptions(...)`, `http=HttpOptions(...)`, `mode=PollingOptions(...)` or `mode=StreamingOptions()`, and `metrics=MetricsOptions(...)`. Every argument after `url` and `app_name` is keyword-only. `ExperimentalMode` has been removed. See the [v7 migration guide](./v7_MIGRATION_GUIDE.md). * (Major): Settings can no longer be changed on an existing client. The `unleash_*` settings properties and the `strategy_mapping` and `connector_mode` properties have been removed, together with their setters. * (Major): The API token is passed as `api_key=""`. An `Authorization` header in `HttpOptions.headers` raises `ValueError`. * (Major): The deprecated `environment` setting has been removed. The `environment` field of the evaluation context and the impact metrics `environment` label come from the API token, or are `"default"` when the token doesn't name one. +* (Major): Upgraded to yggdrasil-engine 3, new engine built with PyO3 for better performance. * (Minor): New `FETCH_COMPLETED` event, emitted after every feature fetch with how it ended: `CHANGED`, `NOT_CHANGED`, `UNAUTHORIZED`, `RATE_LIMITED`, `UNAVAILABLE` or `INVALID_RESPONSE`. ## v6.9.1 diff --git a/UnleashClient/_payloads.py b/UnleashClient/_payloads.py index 3f9aa1a4..728b726e 100644 --- a/UnleashClient/_payloads.py +++ b/UnleashClient/_payloads.py @@ -4,7 +4,7 @@ from platform import python_implementation, python_version from typing import Any, Dict, Optional -import yggdrasil_engine +from yggdrasil_engine.engine import UnleashEngine from UnleashClient.config import UnleashConfig from UnleashClient.constants import CLIENT_SPEC_VERSION, SDK_NAME, SDK_VERSION @@ -17,7 +17,7 @@ def _client_metadata(config: UnleashConfig) -> Dict[str, Any]: "connectionId": config.connection_id, "platformName": python_implementation(), "platformVersion": python_version(), - "yggdrasilVersion": yggdrasil_engine.__yggdrasil_core_version__, + "yggdrasilVersion": UnleashEngine.get_core_version(), "specVersion": CLIENT_SPEC_VERSION, } if config.identity.sdk_flavor: diff --git a/pyproject.toml b/pyproject.toml index 4c8c53e2..f0a26c95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,7 @@ dependencies=[ "importlib_metadata", "python-dateutil", "semver < 4.0.0", - "yggdrasil-engine >= 2.0.0, < 3.0.0", + "yggdrasil-engine >= 3.0.0a1, < 4.0.0", "launchdarkly-eventsource", ] diff --git a/requirements.txt b/requirements.txt index c0d68be2..84384e59 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ mmhash3 python-dateutil requests semver -yggdrasil-engine==2.0.0 +yggdrasil-engine==3.0.0a1 launchdarkly-eventsource aiohttp