1{ lib
2, buildPythonPackage
3, python-dateutil
4, fetchPypi
5, mock
6, msgpack
7, nose
8, pandas
9, pytestCheckHook
10, pytz
11, requests
12, requests-mock
13, six
14}:
15
16buildPythonPackage rec {
17 pname = "influxdb";
18 version = "5.3.1";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "0ymjv322mv6y424fmpd70f87152w55mbwwj6i7p3sjzf0ixmxy26";
23 };
24
25 postPatch = ''
26 for f in influxdb/tests/dataframe_client_test.py influxdb/tests/influxdb08/dataframe_client_test.py; do
27 substituteInPlace "$f" \
28 --replace "pandas.util.testing" "pandas.testing"
29 done
30 '';
31
32 propagatedBuildInputs = [
33 requests
34 python-dateutil
35 pytz
36 six
37 msgpack
38 ];
39
40 __darwinAllowLocalNetworking = true;
41
42 nativeCheckInputs = [
43 pytestCheckHook
44 requests-mock
45 mock
46 nose
47 pandas
48 ];
49
50 disabledTests = [
51 # Tests cause FutureWarning due to use of 'record' instead of 'records' in pandas.
52 # https://github.com/influxdata/influxdb-python/pull/845
53 # Also type mismatches in assertEqual on DataFrame:
54 # b'foo[30 chars]_one=1.0,column_two=1.0 0\nfoo,tag_one=red,tag[47 chars]00\n' !=
55 # b'foo[30 chars]_one="1",column_two=1i 0\nfoo,tag_one=red,tag_[46 chars]00\n'
56 "test_write_points_from_dataframe_with_nan_json"
57 "test_write_points_from_dataframe_with_tags_and_nan_json"
58 "test_write_points_from_dataframe_with_numeric_precision"
59 # Reponse is not empty but `s = '孝'` and the JSON decoder chokes on that
60 "test_query_with_empty_result"
61 # Pandas API changes cause it to no longer infer datetimes in the expected manner
62 "test_multiquery_into_dataframe"
63 "test_multiquery_into_dataframe_dropna"
64 ];
65
66 pythonImportsCheck = [ "influxdb" ];
67
68 meta = with lib; {
69 description = "Python client for InfluxDB";
70 homepage = "https://github.com/influxdb/influxdb-python";
71 license = licenses.mit;
72 maintainers = with maintainers; [ fab ];
73 };
74}