Skip to content

feat: use the PyO3 engine (3.x) - #449

Merged
alexanto merged 3 commits into
mainfrom
chore/yggdrasil-engine-3
Oct 29, 2026
Merged

alexanto merged 3 commits into
mainfrom
chore/yggdrasil-engine-3

Conversation

@alexanto

@alexanto alexanto commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Upgrades the python SDK to the new yggdrasil engine 3 (pyo3). Breaking change because python 3.8 and 3.9 are dropped.

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

  • Unit tests
  • Spec Tests
  • Integration tests / Manual Tests

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation - not yet but have a PR that should be merged with the release
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes

@gastonfournier gastonfournier moved this from New to In Progress in Issues and PRs Oct 21, 2026
@alexanto
alexanto changed the base branch from main to fix/flaky-callback-exception-test October 21, 2026 06:26
@alexanto
alexanto added this pull request to stack #451 October 21, 2026 06:26
@alexanto
alexanto force-pushed the chore/yggdrasil-engine-3 branch from 9af45ca to 7ad00c3 Compare October 21, 2026 06:48
@alexanto
alexanto marked this pull request as ready for review October 21, 2026 06:48
Base automatically changed from fix/flaky-callback-exception-test to main October 21, 2026 07:15
@alexanto
alexanto force-pushed the chore/yggdrasil-engine-3 branch from 38e8fed to 840bde2 Compare October 21, 2026 07:15
@alexanto
alexanto requested review from ppicom and sighphyre and removed request for ppicom October 21, 2026 07:23
@Elyahou

Elyahou commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Hi @alexanto Can you take a look at Unleash/yggdrasil-bindings#171 that add a little optimization to the new take_state function ? Thanks

@alexanto

alexanto commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Hi @alexanto Can you take a look at Unleash/yggdrasil-bindings#171 that add a little optimization to the new take_state function ? Thanks

@sighphyre was faster with the review, but thank you for the optimization anyway!

@ppicom ppicom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice to see that the pyro3 engine is ready! I don't see a reason why we should not merge this :)

Comment thread requirements.txt Outdated
requests
semver
yggdrasil-engine==2.0.0
yggdrasil-engine==3.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we considered leaving room for minor and patch upgrades? Like >=3.0.0, <4.0.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, will change this when the 3.0.0 is on pypi

Comment thread CHANGELOG.md
* (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="<API token>"`. An `Authorization` header in `HttpOptions.headers` raises `ValueError`.
* (Major): Upgraded to yggdrasil-engine 3, new engine built with PyO3 for better performance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Comment thread pyproject.toml
"python-dateutil",
"semver < 4.0.0",
"yggdrasil-engine >= 2.0.0, < 3.0.0",
"yggdrasil-engine >= 3.0.0a1, < 4.0.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"yggdrasil-engine >= 3.0.0a1, < 4.0.0",
"yggdrasil-engine >= 3.0.0, < 4.0.0",

Is it necessary to make the alpha the limit of the set?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far yes, because i have not published the 3.0.0 yet, will bump the version when it is on pypi

@github-project-automation github-project-automation Bot moved this from In Progress to Approved PRs in Issues and PRs Oct 28, 2026
@alexanto
alexanto force-pushed the chore/yggdrasil-engine-3 branch from a21de8c to 3f5e100 Compare October 29, 2026 07:38
@alexanto
alexanto merged commit b766eb9 into main Oct 29, 2026
8 checks passed
@alexanto
alexanto deleted the chore/yggdrasil-engine-3 branch October 29, 2026 07:44
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Issues and PRs Oct 29, 2026
@Elyahou

Elyahou commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Looks like #454 and #455 didn't make it to main. They were merged into chore/yggdrasil-engine-3, but the branch was rebased before this merge and only kept the 3 engine commits, so main has no evaluate_all_toggles() and feature_definitions() doesn't report enabled.

Was it on purpose ? If not, I can open them again against main, adapted to #461 and #462.

@alexanto

Copy link
Copy Markdown
Contributor Author

Looks like #454 and #455 didn't make it to main. They were merged into chore/yggdrasil-engine-3, but the branch was rebased before this merge and only kept the 3 engine commits, so main has no evaluate_all_toggles() and feature_definitions() doesn't report enabled.

Was it on purpose ? If not, I can open them again against main, adapted to #461 and #462.

damn, this is my mess, totally not intentional
if you reopen them i will take a quick look and merge since i removed them by mistake
sorry about this 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants