Commit Graph

5 Commits

Author SHA1 Message Date
renovate[bot] d21d9db90a
chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.0 (#510)
* chore(deps): update pre-commit hook astral-sh/ruff-pre-commit to v0.12.0

* skip PLC0415

Signed-off-by: gruebel <anton.gruebel@gmail.com>

---------

Signed-off-by: gruebel <anton.gruebel@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: gruebel <anton.gruebel@gmail.com>
2025-06-19 17:32:18 +00:00
Anton Grübel bcd1a3807e
chore!: drop Python 3.8 support (#441)
* drop Python 3.8 support

Signed-off-by: gruebel <anton.gruebel@gmail.com>

* pin mypy python version to 3.9

Signed-off-by: gruebel <anton.gruebel@gmail.com>

---------

Signed-off-by: gruebel <anton.gruebel@gmail.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
2025-02-11 22:17:37 +01:00
Federico Bond 3217575f4f
fix: event handler methods are not thread-safe (#329)
The _client_handlers dictionary allowed modifications during iteration
without proper concurrency control. I added some reentrant locks to manage
concurrent access to the _global_handlers and _client_handlers data
structures.

See #326

Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-05-03 00:42:43 +10:00
Federico Bond 96ba7938de
refactor!: move AbstractProvider to openfeature.provider (#314)
Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-04-12 11:19:21 +10:00
Federico Bond 679409fad2
feat: implement provider events (#278)
* feat: implement provider events

Signed-off-by: Federico Bond <federicobond@gmail.com>

* feat: add error_code field to EventDetails and ProviderEventDetails

Signed-off-by: Federico Bond <federicobond@gmail.com>

* fix: replace strings with postponed evaluation of annotations

Signed-off-by: Federico Bond <federicobond@gmail.com>

* feat: run handlers immediately if provider already in associated state

Signed-off-by: Federico Bond <federicobond@gmail.com>

* feat: remove unused _provider from openfeature.api

Signed-off-by: Federico Bond <federicobond@gmail.com>

* test: add some comments to test cases

Signed-off-by: Federico Bond <federicobond@gmail.com>

* test: add provider event late binding test cases

Signed-off-by: Federico Bond <federicobond@gmail.com>

* fix: fix status handlers running immediately if provider already in associated state

Signed-off-by: Federico Bond <federicobond@gmail.com>

* refactor: reuse provider property in OpenFeatureClient

Signed-off-by: Federico Bond <federicobond@gmail.com>

* refactor: move _provider_status_to_event to ProviderEvent.from_provider_status

Signed-off-by: Federico Bond <federicobond@gmail.com>

* refactor: move EventSupport class to an internal module

Signed-off-by: Federico Bond <federicobond@gmail.com>

* refactor: replace EventSupport class with module-level functions

Signed-off-by: Federico Bond <federicobond@gmail.com>

* style: fix code style

---------

Signed-off-by: Federico Bond <federicobond@gmail.com>
2024-03-22 07:45:00 +11:00