Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / influxdb / default.nix
blobca962f4e47929626b80fc18c358586f50d0d46fb
1 { lib
2 , buildPythonPackage
3 , python-dateutil
4 , fetchPypi
5 , mock
6 , msgpack
7 , pynose
8 , pandas
9 , pytestCheckHook
10 , pytz
11 , requests
12 , requests-mock
13 , six
16 buildPythonPackage rec {
17   pname = "influxdb";
18   version = "5.3.1";
19   format = "setuptools";
21   src = fetchPypi {
22     inherit pname version;
23     sha256 = "0ymjv322mv6y424fmpd70f87152w55mbwwj6i7p3sjzf0ixmxy26";
24   };
26   postPatch = ''
27     for f in influxdb/tests/dataframe_client_test.py influxdb/tests/influxdb08/dataframe_client_test.py; do
28       substituteInPlace "$f" \
29         --replace-fail "pandas.util.testing" "pandas.testing"
30     done
32     for f in influxdb/tests/influxdb08/client_test.py influxdb/tests/client_test.py; do
33       substituteInPlace "$f" \
34         --replace-fail "assertRaisesRegexp" "assertRaisesRegex"
35     done
36   '';
38   propagatedBuildInputs = [
39     requests
40     python-dateutil
41     pytz
42     six
43     msgpack
44   ];
46   __darwinAllowLocalNetworking = true;
48   nativeCheckInputs = [
49     pytestCheckHook
50     requests-mock
51     mock
52     pynose
53     pandas
54   ];
56   disabledTests = [
57     # Tests cause FutureWarning due to use of 'record' instead of 'records' in pandas.
58     #   https://github.com/influxdata/influxdb-python/pull/845
59     # Also type mismatches in assertEqual on DataFrame:
60     #   b'foo[30 chars]_one=1.0,column_two=1.0 0\nfoo,tag_one=red,tag[47 chars]00\n' !=
61     #   b'foo[30 chars]_one="1",column_two=1i 0\nfoo,tag_one=red,tag_[46 chars]00\n'
62     "test_write_points_from_dataframe_with_nan_json"
63     "test_write_points_from_dataframe_with_tags_and_nan_json"
64     "test_write_points_from_dataframe_with_numeric_precision"
65     # Reponse is not empty but `s = '孝'` and the JSON decoder chokes on that
66     "test_query_with_empty_result"
67     # Pandas API changes cause it to no longer infer datetimes in the expected manner
68     "test_multiquery_into_dataframe"
69     "test_multiquery_into_dataframe_dropna"
70     # FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead.
71     "test_write_points_from_dataframe_with_tag_escaped"
72     # AssertionError: 2 != 1 : <class 'influxdb.tests.helper_test.TestSeriesHelper.testWarnBulkSizeNoEffect.<locals>.WarnBulkSizeNoEffect'> call should have generated one warning.
73     "testWarnBulkSizeNoEffect"
74   ];
76   pythonImportsCheck = [ "influxdb" ];
78   meta = with lib; {
79     description = "Python client for InfluxDB";
80     homepage = "https://github.com/influxdb/influxdb-python";
81     license = licenses.mit;
82     maintainers = with maintainers; [ fab ];
83   };