posthoganalytics 6.7.1__py3-none-any.whl → 6.7.3__py3-none-any.whl

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.
@@ -1814,7 +1814,7 @@ class Client(object):
1814
1814
  )
1815
1815
  )
1816
1816
 
1817
- response, fallback_to_decide = self._get_all_flags_and_payloads_locally(
1817
+ response, fallback_to_flags = self._get_all_flags_and_payloads_locally(
1818
1818
  distinct_id,
1819
1819
  groups=groups,
1820
1820
  person_properties=person_properties,
@@ -1822,7 +1822,7 @@ class Client(object):
1822
1822
  flag_keys_to_evaluate=flag_keys_to_evaluate,
1823
1823
  )
1824
1824
 
1825
- if fallback_to_decide and not only_evaluate_locally:
1825
+ if fallback_to_flags and not only_evaluate_locally:
1826
1826
  try:
1827
1827
  decide_response = self.get_flags_decision(
1828
1828
  distinct_id,
@@ -1858,7 +1858,7 @@ class Client(object):
1858
1858
 
1859
1859
  flags: dict[str, FlagValue] = {}
1860
1860
  payloads: dict[str, str] = {}
1861
- fallback_to_decide = False
1861
+ fallback_to_flags = False
1862
1862
  # If loading in previous line failed
1863
1863
  if self.feature_flags:
1864
1864
  # Filter flags based on flag_keys_to_evaluate if provided
@@ -1886,19 +1886,19 @@ class Client(object):
1886
1886
  payloads[flag["key"]] = matched_payload
1887
1887
  except InconclusiveMatchError:
1888
1888
  # No need to log this, since it's just telling us to fall back to `/flags`
1889
- fallback_to_decide = True
1889
+ fallback_to_flags = True
1890
1890
  except Exception as e:
1891
1891
  self.log.exception(
1892
1892
  f"[FEATURE FLAGS] Error while computing variant and payload: {e}"
1893
1893
  )
1894
- fallback_to_decide = True
1894
+ fallback_to_flags = True
1895
1895
  else:
1896
- fallback_to_decide = True
1896
+ fallback_to_flags = True
1897
1897
 
1898
1898
  return {
1899
1899
  "featureFlags": flags,
1900
1900
  "featureFlagPayloads": payloads,
1901
- }, fallback_to_decide
1901
+ }, fallback_to_flags
1902
1902
 
1903
1903
  def _initialize_flag_cache(self, cache_url):
1904
1904
  """Initialize feature flag cache for graceful degradation during service outages.
@@ -365,7 +365,7 @@ class TestLocalEvaluation(unittest.TestCase):
365
365
 
366
366
  @mock.patch("posthog.client.flags")
367
367
  @mock.patch("posthog.client.get")
368
- def test_feature_flags_fallback_to_decide(self, patch_get, patch_flags):
368
+ def test_feature_flags_fallback_to_flags(self, patch_get, patch_flags):
369
369
  patch_flags.return_value = {
370
370
  "featureFlags": {"beta-feature": "alakazam", "beta-feature2": "alakazam2"}
371
371
  }
@@ -431,7 +431,7 @@ class TestLocalEvaluation(unittest.TestCase):
431
431
 
432
432
  @mock.patch("posthog.client.flags")
433
433
  @mock.patch("posthog.client.get")
434
- def test_feature_flags_dont_fallback_to_decide_when_only_local_evaluation_is_true(
434
+ def test_feature_flags_dont_fallback_to_flags_when_only_local_evaluation_is_true(
435
435
  self, patch_get, patch_flags
436
436
  ):
437
437
  patch_flags.return_value = {
@@ -1,4 +1,4 @@
1
- VERSION = "6.7.1"
1
+ VERSION = "6.7.3"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  print(VERSION, end="") # noqa: T201
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: posthoganalytics
3
- Version: 6.7.1
3
+ Version: 6.7.3
4
4
  Summary: Integrate PostHog into any python application.
5
5
  Home-page: https://github.com/posthog/posthog-python
6
6
  Author: Posthog
@@ -1,6 +1,6 @@
1
1
  posthoganalytics/__init__.py,sha256=66HkeJ1fkzbKC2ggl3F164oajFeiGm8v84kJR0Yf5BI,25987
2
2
  posthoganalytics/args.py,sha256=iZ2JWeANiAREJKhS-Qls9tIngjJOSfAVR8C4xFT5sHw,3307
3
- posthoganalytics/client.py,sha256=1K38fDKzm9BVGoEEVj01rno9HjhsL-73uFiErOgUom8,71654
3
+ posthoganalytics/client.py,sha256=ETgNjM2Q9BakWfLDVlmKX6ud1RlJQEmpZ_CoaV-z6Yc,71647
4
4
  posthoganalytics/consumer.py,sha256=CiNbJBdyW9jER3ZYCKbX-JFmEDXlE1lbDy1MSl43-a0,4617
5
5
  posthoganalytics/contexts.py,sha256=LFSFIYpUFWKTBnGMjV9n1aYHWbAzz5zLJGr2qG34PoE,9405
6
6
  posthoganalytics/exception_capture.py,sha256=1VHBfffrXXrkK0PT8iVgKPpj_R1pGAzG5f3Qw0WF79w,1783
@@ -11,21 +11,25 @@ posthoganalytics/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  posthoganalytics/request.py,sha256=Bsl2c5WwONKPQzwWMmKPX5VgOlwSiIcSNfhXgoz62Y8,6186
12
12
  posthoganalytics/types.py,sha256=Dl3aFGX9XUR0wMmK12r2s5Hjan9jL4HpQ9GHpVcEq5U,10207
13
13
  posthoganalytics/utils.py,sha256=-0w-OLcCaoldkbBebPzQyBzLJSo9G9yBOg8NDVz7La8,16088
14
- posthoganalytics/version.py,sha256=pmATCTXxNwGuui3XSa7FxwrKYFujvZoE2W5rzfeS8KU,87
14
+ posthoganalytics/version.py,sha256=pd4U7G30qoIwQl2HZ9MpxMew8kahEVgR-yT4Kp42zcI,87
15
15
  posthoganalytics/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
16
  posthoganalytics/ai/sanitization.py,sha256=owipZ4eJYtd4JTI-CM_klatclXaeaIec3XJBOUfsOnQ,5770
17
- posthoganalytics/ai/utils.py,sha256=oYXRb304uAVeaMij5Caxcy1T--wdQ4Aq74ioXvPZwdU,21891
18
- posthoganalytics/ai/anthropic/__init__.py,sha256=fFhDOiRzTXzGQlgnrRDL-4yKC8EYIl8NW4a2QNR6xRU,368
19
- posthoganalytics/ai/anthropic/anthropic.py,sha256=GSrJBE56b68X13u6NAgWLHLLjDg3tDq0EIuvU5Zl_tk,7475
20
- posthoganalytics/ai/anthropic/anthropic_async.py,sha256=IdH2FPPyTFycsYX1Uu9dfgA9VEGcRBNAyeKTlKo9pWc,7595
17
+ posthoganalytics/ai/types.py,sha256=ceubs4K9xf8vQx7wokq1NL9hPtxyS7D7sUOuT7Lx1lM,3237
18
+ posthoganalytics/ai/utils.py,sha256=8qhlPZjUzUn3XnFE51TraMAEHLQ3bZ7eG1iuwr9Dre0,20052
19
+ posthoganalytics/ai/anthropic/__init__.py,sha256=8nTvETZzkfW-P3zBMmp06GOHs0N-xyOGu7Oa4di_lno,669
20
+ posthoganalytics/ai/anthropic/anthropic.py,sha256=njOoVb9vkCdnPWAQuVF0XB0BnT2y1ScIryrCGyt5ur8,8750
21
+ posthoganalytics/ai/anthropic/anthropic_async.py,sha256=nM3oFcNLw6meEtV6RfrvhFcuxD4aS-CXDuepRHycUjM,10169
22
+ posthoganalytics/ai/anthropic/anthropic_converter.py,sha256=LWIQ1kyK3vV3rLBmQIcd-98fet7isK3uhTRmBqBN0lk,11776
21
23
  posthoganalytics/ai/anthropic/anthropic_providers.py,sha256=y1_qc8Lbip-YDmpimPGg3DfTm5g-WZk5FrRCXzwF_Ow,2139
22
- posthoganalytics/ai/gemini/__init__.py,sha256=bMNBnJ6NO_PCQCwmxKIiw4adFuEQ06hFFBALt-aDW-0,174
23
- posthoganalytics/ai/gemini/gemini.py,sha256=yW4hMGwPlIvEptjJfMvpU_BGSSaLNWgH7FoenbAmgKI,15713
24
+ posthoganalytics/ai/gemini/__init__.py,sha256=JV_9-gBR87leHgZW4XAYZP7LSl4YaXeuhqDUpA8HygA,383
25
+ posthoganalytics/ai/gemini/gemini.py,sha256=mHW20mhFVmEwJfxz2HnjxCrEvvB09Jf7goWEmMNwPgw,14891
26
+ posthoganalytics/ai/gemini/gemini_converter.py,sha256=ylV-6JjzKB47liz2UyP5udRB9vtSS4eEe4rr-LpCtyo,14154
24
27
  posthoganalytics/ai/langchain/__init__.py,sha256=9CqAwLynTGj3ASAR80C3PmdTdrYGmu99tz0JL-HPFgI,70
25
28
  posthoganalytics/ai/langchain/callbacks.py,sha256=Otha0a6YLBwETfKjDDbdLzNi-RHRgKFJB69GwWCv9lg,29527
26
- posthoganalytics/ai/openai/__init__.py,sha256=_flZxkyaDZme9hxJsY31sMlq4nP1dtc75HmNgj-21Kg,197
27
- posthoganalytics/ai/openai/openai.py,sha256=qq-O6aNuN-TYXHBRASWz0KmR8XY1IHsSyPNuLlt-27Y,22431
28
- posthoganalytics/ai/openai/openai_async.py,sha256=Alxpqm6hnNHXJduyOaNxCxCtbOrG4CXrSlUIUgN1Ndg,22832
29
+ posthoganalytics/ai/openai/__init__.py,sha256=u4OuUT7k1NgFj0TrxjuyegOg7a_UA8nAU6a-Hszr0OM,490
30
+ posthoganalytics/ai/openai/openai.py,sha256=I05NruE9grWezM_EgOZBiG5Ej_gABsDcYKN0pRQWvzU,20235
31
+ posthoganalytics/ai/openai/openai_async.py,sha256=k6bo3LfJ_CAPBZCxAzyM2uLz4BpW2YWEFhNuzVcpJlM,21811
32
+ posthoganalytics/ai/openai/openai_converter.py,sha256=0H_ouclo97y19v9QFn-QC2qnj8HdE0lS4wTJljHcmkM,20484
29
33
  posthoganalytics/ai/openai/openai_providers.py,sha256=RPVmj2V0_lAdno_ax5Ul2kwhBA9_rRgAdl_sCqrQc6M,4004
30
34
  posthoganalytics/integrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
35
  posthoganalytics/integrations/django.py,sha256=KYtBr7CkiZQynRc2TCWWYHe-J3ie8iSUa42WPshYZdc,6795
@@ -37,14 +41,14 @@ posthoganalytics/test/test_contexts.py,sha256=c--hNUIEf6SHQ7H9vdPhU1oLCN0SnD4wDb
37
41
  posthoganalytics/test/test_exception_capture.py,sha256=al37Kg6wjzL_IBCFUUXRvkP6nVrqS6IZRCOKSo29Nh8,1063
38
42
  posthoganalytics/test/test_feature_flag.py,sha256=9RQwB5eCvVAGrrO7UnR3Z1OidP_YoL4iBl3A83fuAig,6824
39
43
  posthoganalytics/test/test_feature_flag_result.py,sha256=z2OgD97r85LKMqCnoCqAs74WjUMucayAtC3qWaITGCA,15898
40
- posthoganalytics/test/test_feature_flags.py,sha256=GH03a8eTFuSCUI-Sfwgo8J1HY5HvrlDC7RmKF-Qtkkg,213060
44
+ posthoganalytics/test/test_feature_flags.py,sha256=dJ8VEB7ZpVrqggAqGXlIkl2vyvWiJ9GDUKLg_L6-1zk,213058
41
45
  posthoganalytics/test/test_module.py,sha256=viqaAWA_uHt8r20fHIeME6IQkeXmQ8ZyrJTtPGQAb1E,1070
42
46
  posthoganalytics/test/test_request.py,sha256=Zc0VbkjpVmj8mKokQm9rzdgTr0b1U44vvMYSkB_IQLs,4467
43
47
  posthoganalytics/test/test_size_limited_dict.py,sha256=-5IQjIEr_-Dql24M0HusdR_XroOMrtgiT0v6ZQCRvzo,774
44
48
  posthoganalytics/test/test_types.py,sha256=bRPHdwVpP7hu7emsplU8UVyzSQptv6PaG5lAoOD_BtM,7595
45
49
  posthoganalytics/test/test_utils.py,sha256=sqUTbfweVcxxFRd3WDMFXqPMyU6DvzOBeAOc68Py9aw,9620
46
- posthoganalytics-6.7.1.dist-info/licenses/LICENSE,sha256=wGf9JBotDkSygFj43m49oiKlFnpMnn97keiZKF-40vE,2450
47
- posthoganalytics-6.7.1.dist-info/METADATA,sha256=192EARPdA80rxKZUOP30obmzvU8fFa37jkc92yXgVOE,6024
48
- posthoganalytics-6.7.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
49
- posthoganalytics-6.7.1.dist-info/top_level.txt,sha256=8QsNIqIkBh1p2TXvKp0Em9ZLZKwe3uIqCETyW4s1GOE,17
50
- posthoganalytics-6.7.1.dist-info/RECORD,,
50
+ posthoganalytics-6.7.3.dist-info/licenses/LICENSE,sha256=wGf9JBotDkSygFj43m49oiKlFnpMnn97keiZKF-40vE,2450
51
+ posthoganalytics-6.7.3.dist-info/METADATA,sha256=WJzq5FqyDiFj8cFU0tkAGZeLKF5-OOLVlH1nuBPGmLs,6024
52
+ posthoganalytics-6.7.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
53
+ posthoganalytics-6.7.3.dist-info/top_level.txt,sha256=8QsNIqIkBh1p2TXvKp0Em9ZLZKwe3uIqCETyW4s1GOE,17
54
+ posthoganalytics-6.7.3.dist-info/RECORD,,