- Add patch no-more-monotonic.patch:
* Just use time.monotonic OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-posthog?expand=0&rev=3
This commit is contained in:
42
no-more-monotonic.patch
Normal file
42
no-more-monotonic.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
Index: posthog-3.6.0/posthog/consumer.py
|
||||
===================================================================
|
||||
--- posthog-3.6.0.orig/posthog/consumer.py
|
||||
+++ posthog-3.6.0/posthog/consumer.py
|
||||
@@ -1,9 +1,9 @@
|
||||
import json
|
||||
import logging
|
||||
+import time
|
||||
from threading import Thread
|
||||
|
||||
import backoff
|
||||
-import monotonic
|
||||
|
||||
from posthog.request import APIError, DatetimeSerializer, batch_post
|
||||
|
||||
@@ -96,11 +96,11 @@ class Consumer(Thread):
|
||||
queue = self.queue
|
||||
items = []
|
||||
|
||||
- start_time = monotonic.monotonic()
|
||||
+ start_time = time.monotonic()
|
||||
total_size = 0
|
||||
|
||||
while len(items) < self.flush_at:
|
||||
- elapsed = monotonic.monotonic() - start_time
|
||||
+ elapsed = time.monotonic() - start_time
|
||||
if elapsed >= self.flush_interval:
|
||||
break
|
||||
try:
|
||||
Index: posthog-3.6.0/setup.py
|
||||
===================================================================
|
||||
--- posthog-3.6.0.orig/setup.py
|
||||
+++ posthog-3.6.0/setup.py
|
||||
@@ -14,7 +14,7 @@ long_description = """
|
||||
PostHog is developer-friendly, self-hosted product analytics. posthog-python is the python package.
|
||||
"""
|
||||
|
||||
-install_requires = ["requests>=2.7,<3.0", "monotonic>=1.5", "backoff>=1.10.0", "python-dateutil>2.1"]
|
||||
+install_requires = ["requests>=2.7,<3.0", "backoff>=1.10.0", "python-dateutil>2.1"]
|
||||
|
||||
extras_require = {
|
||||
"dev": [
|
||||
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 27 07:03:56 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch no-more-monotonic.patch:
|
||||
* Just use time.monotonic
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 5 17:07:16 UTC 2024 - Meera Belur <mbelur@suse.com>
|
||||
|
||||
|
||||
@@ -23,20 +23,19 @@ Release: 0
|
||||
Summary: PostHog is developer-friendly, self-hosted product analytics
|
||||
License: MIT
|
||||
URL: https://github.com/posthog/posthog-python
|
||||
Group: Development/Libraries/Python
|
||||
Source: https://files.pythonhosted.org/packages/source/p/posthog/posthog-%{version}.tar.gz
|
||||
Patch1: python-posthog-no-mock.patch
|
||||
Patch2: python-posthog-no-six.patch
|
||||
BuildRequires: python-rpm-macros
|
||||
Patch3: no-more-monotonic.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: python-rpm-macros
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module freezegun}
|
||||
BuildRequires: %{python_module backoff >= 1.10.0}
|
||||
BuildRequires: %{python_module monotonic >= 1.5}
|
||||
BuildRequires: %{python_module freezegun}
|
||||
BuildRequires: %{python_module pytest-timeout}
|
||||
BuildRequires: %{python_module python-dateutil > 2.1}
|
||||
BuildRequires: %{python_module requests >= 2.7}
|
||||
# /SECTION
|
||||
|
||||
Reference in New Issue
Block a user