flagsmith 6.2.0__tar.gz → 6.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flagsmith-6.2.0 → flagsmith-6.2.2}/PKG-INFO +2 -2
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/mappers.py +1 -1
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/models.py +9 -7
- {flagsmith-6.2.0 → flagsmith-6.2.2}/pyproject.toml +2 -2
- {flagsmith-6.2.0 → flagsmith-6.2.2}/LICENSE +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/README.md +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/__init__.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/analytics.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/api/__init__.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/api/types.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/exceptions.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/flagsmith.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/offline_handlers.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/polling_manager.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/py.typed +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/streaming_manager.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/types.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/utils/__init__.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/utils/datetime.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/utils/identities.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/version.py +0 -0
- {flagsmith-6.2.0 → flagsmith-6.2.2}/flagsmith/webhooks.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flagsmith
|
|
3
|
-
Version: 6.2.
|
|
3
|
+
Version: 6.2.2
|
|
4
4
|
Summary: Flagsmith Python SDK
|
|
5
5
|
License: BSD3
|
|
6
6
|
License-File: LICENSE
|
|
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
-
Requires-Dist: flagsmith-flag-engine (>=
|
|
18
|
+
Requires-Dist: flagsmith-flag-engine (>=11.0.0,<12.0.0)
|
|
19
19
|
Requires-Dist: iso8601 (>=2.1.0,<3.0.0) ; python_version < "3.11"
|
|
20
20
|
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
21
21
|
Requires-Dist: requests-futures (>=1.0.1,<2.0.0)
|
|
@@ -177,7 +177,7 @@ def _map_identity_overrides_to_segments(
|
|
|
177
177
|
# Generate a unique key to avoid collisions
|
|
178
178
|
segment_key = str(hash(overrides_key))
|
|
179
179
|
segment_contexts[segment_key] = SegmentContext(
|
|
180
|
-
key=
|
|
180
|
+
key=segment_key,
|
|
181
181
|
name="identity_overrides",
|
|
182
182
|
rules=[
|
|
183
183
|
{
|
|
@@ -17,7 +17,7 @@ from flagsmith.types import (
|
|
|
17
17
|
)
|
|
18
18
|
|
|
19
19
|
SegmentOverridesIndex = typing.Dict[
|
|
20
|
-
str, typing.
|
|
20
|
+
str, typing.Dict[str, SegmentContext[SegmentMetadata, FeatureMetadata]]
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
|
|
@@ -28,11 +28,16 @@ def build_segment_overrides_index(
|
|
|
28
28
|
|
|
29
29
|
Computed once per environment-document refresh so the lazy eval path
|
|
30
30
|
can walk only the segments actually relevant to a given flag.
|
|
31
|
+
|
|
32
|
+
Each entry keeps the context's own segment keys, so the trimmed
|
|
33
|
+
contexts built by `Flags._resolve_flag` stay a faithful subset of
|
|
34
|
+
the environment. Re-keying them by anything else risks collisions
|
|
35
|
+
silently dropping segments.
|
|
31
36
|
"""
|
|
32
37
|
index: SegmentOverridesIndex = {}
|
|
33
|
-
for segment_context in (context.get("segments") or {}).
|
|
38
|
+
for segment_key, segment_context in (context.get("segments") or {}).items():
|
|
34
39
|
for override in segment_context.get("overrides") or ():
|
|
35
|
-
index.setdefault(override["name"], []
|
|
40
|
+
index.setdefault(override["name"], {})[segment_key] = segment_context
|
|
36
41
|
return index
|
|
37
42
|
|
|
38
43
|
|
|
@@ -254,10 +259,7 @@ class Flags:
|
|
|
254
259
|
trimmed: SDKEvaluationContext = {
|
|
255
260
|
**context,
|
|
256
261
|
"features": {feature_name: context["features"][feature_name]},
|
|
257
|
-
"segments": {
|
|
258
|
-
segment_context["key"]: segment_context
|
|
259
|
-
for segment_context in overrides_index.get(feature_name, ())
|
|
260
|
-
},
|
|
262
|
+
"segments": overrides_index.get(feature_name, {}),
|
|
261
263
|
}
|
|
262
264
|
result = engine.get_evaluation_result(trimmed)
|
|
263
265
|
return Flag.from_evaluation_result(result["flags"][feature_name])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "flagsmith"
|
|
3
|
-
version = "6.2.
|
|
3
|
+
version = "6.2.2"
|
|
4
4
|
description = "Flagsmith Python SDK"
|
|
5
5
|
authors = ["Flagsmith <support@flagsmith.com>"]
|
|
6
6
|
license = "BSD3"
|
|
@@ -10,7 +10,7 @@ documentation = "https://docs.flagsmith.com"
|
|
|
10
10
|
packages = [{ include = "flagsmith" }]
|
|
11
11
|
|
|
12
12
|
[tool.poetry.dependencies]
|
|
13
|
-
flagsmith-flag-engine = "^
|
|
13
|
+
flagsmith-flag-engine = "^11.0.0"
|
|
14
14
|
iso8601 = { version = "^2.1.0", python = "<3.11" }
|
|
15
15
|
python = ">=3.10,<4"
|
|
16
16
|
requests = "^2.32.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|