at master 2.8 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 mock, 6 msgpack, 7 pandas, 8 pytestCheckHook, 9 python-dateutil, 10 pytz, 11 requests, 12 requests-mock, 13 setuptools, 14 six, 15}: 16 17buildPythonPackage rec { 18 pname = "influxdb"; 19 version = "5.3.2"; 20 pyproject = true; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-WMZH9gQ3Et2G6a7hLrTM+7tUFUZ7yZEKSKqMdMEQiXA="; 25 }; 26 27 patches = [ 28 # https://github.com/influxdata/influxdb-python/pull/835 29 ./remove-nose.patch 30 ]; 31 32 postPatch = '' 33 for f in influxdb/tests/dataframe_client_test.py influxdb/tests/influxdb08/dataframe_client_test.py; do 34 substituteInPlace "$f" \ 35 --replace-fail "pandas.util.testing" "pandas.testing" 36 done 37 38 for f in influxdb/tests/influxdb08/client_test.py influxdb/tests/client_test.py; do 39 substituteInPlace "$f" \ 40 --replace-fail "assertRaisesRegexp" "assertRaisesRegex" 41 done 42 ''; 43 44 build-system = [ setuptools ]; 45 46 dependencies = [ 47 msgpack 48 python-dateutil 49 pytz 50 requests 51 six 52 ]; 53 54 __darwinAllowLocalNetworking = true; 55 56 nativeCheckInputs = [ 57 mock 58 pandas 59 pytestCheckHook 60 requests-mock 61 ]; 62 63 disabledTests = [ 64 "socket" 65 # Tests cause FutureWarning due to use of 'record' instead of 'records' in pandas. 66 # https://github.com/influxdata/influxdb-python/pull/845 67 # Also type mismatches in assertEqual on DataFrame: 68 # b'foo[30 chars]_one=1.0,column_two=1.0 0\nfoo,tag_one=red,tag[47 chars]00\n' != 69 # b'foo[30 chars]_one="1",column_two=1i 0\nfoo,tag_one=red,tag_[46 chars]00\n' 70 "test_write_points_from_dataframe_with_nan_json" 71 "test_write_points_from_dataframe_with_tags_and_nan_json" 72 "test_write_points_from_dataframe_with_numeric_precision" 73 # Response is not empty but `s = '孝'` and the JSON decoder chokes on that 74 "test_query_with_empty_result" 75 # Pandas API changes cause it to no longer infer datetimes in the expected manner 76 "test_multiquery_into_dataframe" 77 "test_multiquery_into_dataframe_dropna" 78 # FutureWarning: 'H' is deprecated and will be removed in a future version, please use 'h' instead. 79 "test_write_points_from_dataframe_with_tag_escaped" 80 # AssertionError: 2 != 1 : <class 'influxdb.tests.helper_test.TestSeriesHelper.testWarnBulkSizeNoEffect.<locals>.WarnBulkSizeNoEffect'> call should have generated one warning. 81 "testWarnBulkSizeNoEffect" 82 ]; 83 84 pythonImportsCheck = [ "influxdb" ]; 85 86 meta = with lib; { 87 description = "Python client for InfluxDB"; 88 homepage = "https://github.com/influxdb/influxdb-python"; 89 changelog = "https://github.com/influxdata/influxdb-python/blob/v${version}/CHANGELOG.md"; 90 license = licenses.mit; 91 maintainers = with maintainers; [ fab ]; 92 }; 93}