Accepting request 1130190 from devel:languages:python
- Update python-influxdb-new-pandas.patch in order to avoid FutureWarning: does not work with pandas < 2.1 - Make pure python a noarch package - PEP 517 - Upstream is archived, but still required by openSUSE-release-tools gh#openSUSE/openSUSE-release-tools#3034 OBS-URL: https://build.opensuse.org/request/show/1130190 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-influxdb?expand=0&rev=13
This commit is contained in:
commit
cb0520b968
@ -86,3 +86,21 @@ Index: influxdb-5.3.1/influxdb/_dataframe_client.py
|
||||
|
||||
if data_frame_index:
|
||||
df.set_index(data_frame_index, inplace=True)
|
||||
@@ -449,7 +449,7 @@ class DataFrameClient(InfluxDBClient):
|
||||
include=['floating']).columns)
|
||||
nonfloat_columns = dframe.columns[~dframe.columns.isin(
|
||||
float_columns)]
|
||||
- dframe[float_columns] = dframe[float_columns].applymap(repr)
|
||||
+ dframe[float_columns] = dframe[float_columns].map(repr)
|
||||
dframe[nonfloat_columns] = (dframe[nonfloat_columns].astype(str))
|
||||
elif isinstance(numeric_precision, int):
|
||||
# If precision is specified, round to appropriate precision
|
||||
@@ -462,7 +462,7 @@ class DataFrameClient(InfluxDBClient):
|
||||
|
||||
# If desired precision is > 10 decimal places, need to use repr
|
||||
if numeric_precision > 10:
|
||||
- dframe[float_columns] = (dframe[float_columns].applymap(repr))
|
||||
+ dframe[float_columns] = (dframe[float_columns].map(repr))
|
||||
dframe[nonfloat_columns] = (dframe[nonfloat_columns]
|
||||
.astype(str))
|
||||
else:
|
||||
|
@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 24 18:51:23 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Update python-influxdb-new-pandas.patch in order to avoid
|
||||
FutureWarning: does not work with pandas < 2.1
|
||||
- Make pure python a noarch package
|
||||
- PEP 517
|
||||
- Upstream is archived, but still required by
|
||||
openSUSE-release-tools gh#openSUSE/openSUSE-release-tools#3034
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 19 08:47:41 UTC 2023 - Fabian Vogt <fvogt@suse.com>
|
||||
|
||||
|
@ -16,8 +16,6 @@
|
||||
#
|
||||
|
||||
|
||||
%define skip_python2 1
|
||||
%define skip_python36 1
|
||||
Name: python-influxdb
|
||||
Version: 5.3.1
|
||||
Release: 0
|
||||
@ -34,20 +32,24 @@ Patch1: https://github.com/influxdata/influxdb-python/pull/845.patch#/in
|
||||
Patch2: python-influxdb-no-six.patch
|
||||
# fix tests with newer pandas
|
||||
Patch3: python-influxdb-new-pandas.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module python-dateutil >= 2.6.0}
|
||||
BuildRequires: %{python_module pytz}
|
||||
BuildRequires: %{python_module requests >= 2.17.0}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-msgpack
|
||||
Requires: python-python-dateutil >= 2.6.0
|
||||
Requires: python-pytz
|
||||
Requires: python-requests >= 2.17.0
|
||||
# Pandas is optional but only works with pandas >= 2.1. If pandas < 2.1 is installed, the module throws an ImportError
|
||||
Conflicts: python-pandas < 2.1
|
||||
ExcludeArch: %ix86 %arm ppc
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module msgpack}
|
||||
BuildRequires: %{python_module pandas}
|
||||
BuildRequires: %{python_module pandas >= 2.1}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module requests-mock}
|
||||
BuildRequires: influxdb
|
||||
@ -55,6 +57,7 @@ BuildRequires: influxdb
|
||||
BuildRequires: hostname
|
||||
%endif
|
||||
# /SECTION
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@ -64,10 +67,10 @@ InfluxDB-Python is a client for interacting with InfluxDB 1.x
|
||||
%autosetup -p1 -n influxdb-%{version}
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
@ -83,6 +86,6 @@ donttest="test_write_points_from_dataframe_with_nan_json or test_write_points_fr
|
||||
%license LICENSE
|
||||
%doc README.rst
|
||||
%{python_sitelib}/influxdb
|
||||
%{python_sitelib}/influxdb-%{version}*-info
|
||||
%{python_sitelib}/influxdb-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
Loading…
x
Reference in New Issue
Block a user