Accepting request 885694 from home:bnavigator:branches:devel:languages:python
- Skip python36: Extensive use of pandas in the test suite - Add influxdb-pr845-pandas-future.patch gh#influxdb/influxdb-python#845 - Skip tests failing with pandas -- #influxdb/influxdb-python#884 - Don't use extra mock OBS-URL: https://build.opensuse.org/request/show/885694 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-influxdb?expand=0&rev=27
This commit is contained in:
parent
e5454d29ba
commit
fbc03e747c
22
influxdb-pr845-pandas-future.patch
Normal file
22
influxdb-pr845-pandas-future.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From db0714de2350493a1776ca4d4d9b743695d68576 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christopher Head <chead@chead.ca>
|
||||||
|
Date: Sat, 22 Aug 2020 11:15:33 -0700
|
||||||
|
Subject: [PATCH] Fix FutureWarning from pandas
|
||||||
|
|
||||||
|
---
|
||||||
|
influxdb/_dataframe_client.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/influxdb/_dataframe_client.py b/influxdb/_dataframe_client.py
|
||||||
|
index e7ae9c17..1363cbf0 100644
|
||||||
|
--- a/influxdb/_dataframe_client.py
|
||||||
|
+++ b/influxdb/_dataframe_client.py
|
||||||
|
@@ -305,7 +305,7 @@ def _convert_dataframe_to_json(dataframe,
|
||||||
|
'time': np.int64(ts.value / precision_factor)}
|
||||||
|
for ts, tag, (_, rec) in zip(
|
||||||
|
dataframe.index,
|
||||||
|
- dataframe[tag_columns].to_dict('record'),
|
||||||
|
+ dataframe[tag_columns].to_dict('records'),
|
||||||
|
dataframe[field_columns].iterrows()
|
||||||
|
)
|
||||||
|
]
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 15 14:29:34 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Skip python36: Extensive use of pandas in the test suite
|
||||||
|
- Add influxdb-pr845-pandas-future.patch
|
||||||
|
gh#influxdb/influxdb-python#845
|
||||||
|
- Skip tests failing with pandas -- #influxdb/influxdb-python#884
|
||||||
|
- Don't use extra mock
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 2 00:19:18 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Tue Feb 2 00:19:18 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -16,8 +16,9 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
%global skip_python2 1
|
%define skip_python2 1
|
||||||
|
%define skip_python36 1
|
||||||
Name: python-influxdb
|
Name: python-influxdb
|
||||||
Version: 5.3.1
|
Version: 5.3.1
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -28,6 +29,8 @@ URL: https://github.com/influxdb/influxdb-python
|
|||||||
Source: https://files.pythonhosted.org/packages/source/i/influxdb/influxdb-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/i/influxdb/influxdb-%{version}.tar.gz
|
||||||
# https://github.com/influxdata/influxdb-python/pull/835
|
# https://github.com/influxdata/influxdb-python/pull/835
|
||||||
Patch0: python-influxdb-remove-nose.patch
|
Patch0: python-influxdb-remove-nose.patch
|
||||||
|
# PATCH-FIX-UPSTREAM influxdb-pr845-pandas-future.patch -- gh#influxdb/influxdb-python#845
|
||||||
|
Patch1: https://github.com/influxdata/influxdb-python/pull/845.patch#/influxdb-pr845-pandas-future.patch
|
||||||
BuildRequires: %{python_module python-dateutil >= 2.6.0}
|
BuildRequires: %{python_module python-dateutil >= 2.6.0}
|
||||||
BuildRequires: %{python_module pytz}
|
BuildRequires: %{python_module pytz}
|
||||||
BuildRequires: %{python_module requests >= 2.17.0}
|
BuildRequires: %{python_module requests >= 2.17.0}
|
||||||
@ -42,7 +45,6 @@ Requires: python-requests >= 2.17.0
|
|||||||
Requires: python-six >= 1.10.0
|
Requires: python-six >= 1.10.0
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module mock}
|
|
||||||
BuildRequires: %{python_module msgpack}
|
BuildRequires: %{python_module msgpack}
|
||||||
BuildRequires: %{python_module pandas}
|
BuildRequires: %{python_module pandas}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
@ -55,25 +57,31 @@ BuildRequires: hostname
|
|||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
InfluxDB-Python is a client for interacting with InfluxDB_. Maintained by @aviau (https://github.com/aviau).
|
InfluxDB-Python is a client for interacting with InfluxDB 1.x
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n influxdb-%{version}
|
%autosetup -p1 -n influxdb-%{version}
|
||||||
%patch0 -p1
|
# remove extra mock
|
||||||
|
sed -e 's/^import mock/from unittest import mock/' \
|
||||||
|
-e 's/^from mock import/from unittest.mock import/' \
|
||||||
|
-i influxdb/tests/*.py influxdb/tests/*/*.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%check
|
|
||||||
%pytest influxdb
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
|
%check
|
||||||
|
# https://github.com/influxdata/influxdb-python/issues/884
|
||||||
|
donttest="test_write_points_from_dataframe_with_nan_json or test_write_points_from_dataframe_with_tags_and_nan_json"
|
||||||
|
%pytest influxdb -k "not ($donttest)"
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst
|
%doc README.rst
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/influxdb
|
||||||
|
%{python_sitelib}/influxdb-%{version}*-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user