Skip to content

Commit c06cb78

Browse files
authored
chore(deps): migrate to RxPY v4; set minimal Python version to 3.7 (#472)
1 parent cdb92c8 commit c06cb78

17 files changed

+55
-54
lines changed

.circleci/config.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,14 @@ commands:
3333
paths:
3434
- ".venv"
3535
- "~/.cache/pip"
36-
# - "/usr/local/lib/python3.8/site-packages"
37-
# - "/usr/local/lib/python3.7/site-packages"
38-
# - "/usr/local/lib/python3.6/site-packages"
3936
- "/usr/local/lib/site-python"
4037
when: always
4138
jobs:
4239
tests-python:
4340
parameters:
4441
python-image:
4542
type: string
46-
default: &default-python "cimg/python:3.6"
43+
default: &default-python "cimg/python:3.7"
4744
influxdb-image:
4845
type: string
4946
default: &default-influxdb "influxdb:latest"
@@ -154,6 +151,7 @@ jobs:
154151
pip install -e . --user
155152
pip install sphinx==1.8.5 --user
156153
pip install sphinx_rtd_theme --user
154+
pip install jinja2==3.0.3 --user
157155
cd docs
158156
python -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html
159157
check-aws-lambda-layer:
@@ -180,16 +178,13 @@ workflows:
180178
- check-examples
181179
- check-sphinx
182180
- tests-python:
183-
name: test-3.6
181+
name: test-3.7
184182
- tests-python:
185-
name: test-3.6-without-ciso8601
183+
name: test-3.7-without-ciso8601
186184
enabled-ciso-8601: false
187185
- tests-python:
188-
name: test-3.6-influxdb-nightly
186+
name: test-3.7-influxdb-nightly
189187
influxdb-image: "quay.io/influxdb/influxdb:nightly"
190-
- tests-python:
191-
name: test-3.7
192-
python-image: "cimg/python:3.7"
193188
- tests-python:
194189
name: test-3.8
195190
python-image: "cimg/python:3.8"

.readthedocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
build:
22
image: latest
33
python:
4-
version: 3.6
4+
version: 3.7
55
pip_install: true
66
extra_requirements:
77
- docs

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
## 1.32.0[unreleased]
1+
## 1.32.0 [unreleased]
2+
3+
:warning: This release drop supports for Python 3.6. As of 2021-12-23, 3.6 has reached the end-of-life phase of its release cycle. 3.6.15 was the final security release. For more info see: https://peps.python.org/pep-0494/#lifespan
4+
5+
### Dependencies
6+
1. [#472](https://github.com/influxdata/influxdb-client-python/pull/472): Update `RxPY` to `4.0.4`
7+
8+
### Others
9+
1. [#472](https://github.com/influxdata/influxdb-client-python/pull/472): Drop supports for Python 3.6
210

311
## 1.31.0 [2022-07-29]
412

README.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Installation
9292
9393
InfluxDB python library uses `RxPY <https://github.com/ReactiveX/RxPY>`__ - The Reactive Extensions for Python (RxPY).
9494

95-
**Python 3.6** or later is required.
95+
**Python 3.7** or later is required.
9696

9797
.. note::
9898

@@ -451,8 +451,8 @@ The batching is configurable by ``write_options``\ :
451451
from datetime import datetime, timedelta
452452
453453
import pandas as pd
454-
import rx
455-
from rx import operators as ops
454+
import reactivex as rx
455+
from reactivex import operators as ops
456456
457457
from influxdb_client import InfluxDBClient, Point, WriteOptions
458458
@@ -795,8 +795,8 @@ If you would like to import gigabytes of data then use our multiprocessing examp
795795
from collections import OrderedDict
796796
from csv import DictReader
797797
798-
import rx
799-
from rx import operators as ops
798+
import reactivex as rx
799+
from reactivex import operators as ops
800800
801801
from influxdb_client import InfluxDBClient, Point, WriteOptions
802802
@@ -899,8 +899,8 @@ Efficiency write data from IOT sensor
899899
from datetime import timedelta
900900
901901
import psutil as psutil
902-
import rx
903-
from rx import operators as ops
902+
import reactivex as rx
903+
from reactivex import operators as ops
904904
905905
from influxdb_client import InfluxDBClient, WriteApi, WriteOptions
906906
@@ -1370,7 +1370,7 @@ How to use Asyncio
13701370
^^^^^^^^^^^^^^^^^^
13711371
.. marker-asyncio-start
13721372
1373-
Starting from version 1.27.0 for Python 3.6+ the ``influxdb-client`` package supports ``async/await`` based on
1373+
Starting from version 1.27.0 for Python 3.7+ the ``influxdb-client`` package supports ``async/await`` based on
13741374
`asyncio <https://docs.python.org/3/library/asyncio.html>`_ and `aiohttp <https://docs.aiohttp.org>`_.
13751375
You can install ``aiohttp`` directly:
13761376

conda/meta.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ build:
1717

1818
requirements:
1919
host:
20-
- python >=3.6
20+
- python >=3.7
2121
- pip
2222
run:
23-
- python >=3.6
23+
- python >=3.7
2424
- setuptools
2525

2626
about:

examples/asynchronous_batching.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
import asyncio
55
from csv import DictReader
66

7-
import rx
8-
from rx import operators as ops
9-
from rx.scheduler.eventloop import AsyncIOScheduler
7+
import reactivex as rx
8+
from reactivex import operators as ops
9+
from reactivex.scheduler.eventloop import AsyncIOScheduler
1010

1111
from influxdb_client import Point
1212
from influxdb_client.client.influxdb_client_async import InfluxDBClientAsync

examples/import_data_set.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
from collections import OrderedDict
88
from csv import DictReader
99

10-
import rx
11-
from rx import operators as ops
10+
import reactivex as rx
11+
from reactivex import operators as ops
1212

1313
from influxdb_client import Point, InfluxDBClient, WriteOptions
1414

examples/import_data_set_multiprocessing.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from multiprocessing import Value
1313
from urllib.request import urlopen
1414

15-
import rx
16-
from rx import operators as ops
15+
import reactivex as rx
16+
from reactivex import operators as ops
1717

1818
from influxdb_client import Point, InfluxDBClient, WriteOptions
1919
from influxdb_client.client.write_api import WriteType

examples/import_data_set_sync_batching.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
from csv import DictReader
66

7-
import rx
8-
from rx import operators as ops
7+
import reactivex as rx
8+
from reactivex import operators as ops
99

1010
from influxdb_client import InfluxDBClient, Point
1111
from influxdb_client.client.write.retry import WritesRetry

examples/iot_sensor.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from datetime import timedelta
77

88
import psutil as psutil
9-
import rx
10-
from rx import operators as ops
9+
import reactivex as rx
10+
from reactivex import operators as ops
1111

1212
from influxdb_client import WriteApi, WriteOptions
1313
from influxdb_client.client.influxdb_client import InfluxDBClient

examples/rx_playground.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
from random import random
44
from threading import current_thread
55

6-
import rx
7-
from rx import operators as ops
8-
from rx.core import GroupedObservable
9-
from rx.scheduler import ThreadPoolScheduler
10-
from rx.subject import Subject
6+
import reactivex as rx
7+
from reactivex import operators as ops, GroupedObservable
8+
from reactivex.scheduler import ThreadPoolScheduler
9+
from reactivex.subject import Subject
1110

1211

1312
class _WriterKey(object):

influxdb_client/client/write_api.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
from time import sleep
1111
from typing import Union, Any, Iterable, NamedTuple
1212

13-
import rx
14-
from rx import operators as ops, Observable
15-
from rx.scheduler import ThreadPoolScheduler
16-
from rx.subject import Subject
13+
import reactivex as rx
14+
from reactivex import operators as ops, Observable
15+
from reactivex.scheduler import ThreadPoolScheduler
16+
from reactivex.subject import Subject
1717

1818
from influxdb_client import WritePrecision
1919
from influxdb_client.client._base import _BaseWriteApi, _HAS_DATACLASS

notebooks/realtime-stream.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
"\n",
4040
"import hvplot.streamz\n",
4141
"import pandas as pd\n",
42-
"import rx\n",
43-
"from rx import operators as ops\n",
42+
"import reactivex as rx\n",
43+
"from reactivex import operators as ops\n",
4444
"\n",
4545
"from streamz.dataframe import Random, DataFrame\n",
4646
"from streamz import Stream\n",
@@ -61,7 +61,7 @@
6161
" f'{query}')) \\\n",
6262
" .pipe(ops.map(lambda query: client.query_api().query_data_frame(query, data_frame_index=['_time']))) \\\n",
6363
" .pipe(ops.map(lambda data_frame: data_frame.drop(columns=['result', 'table']))) \\\n",
64-
" .subscribe(observer=lambda data_frame: sink.emit(data_frame), on_error=lambda error: print(error))\n",
64+
" .subscribe(on_next=lambda data_frame: sink.emit(data_frame), on_error=lambda error: print(error))\n",
6565
" pass"
6666
]
6767
},

notebooks/stock_predictions_import_data.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import ciso8601
1111
import requests
12-
import rx
13-
from rx import operators as ops
12+
import reactivex as rx
13+
from reactivex import operators as ops
1414

1515
from influxdb_client import InfluxDBClient, WriteOptions
1616
from influxdb_client.client.write.point import EPOCH

setup.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from setuptools import setup, find_packages # noqa: H301
66

77
requires = [
8-
'rx >= 3.0.1',
8+
'reactivex >= 4.0.4',
99
'certifi >= 14.05.14',
1010
'python_dateutil >= 2.5.3',
1111
'setuptools >= 21.0.0',
@@ -64,13 +64,12 @@
6464
long_description_content_type="text/x-rst",
6565
packages=find_packages(exclude=('tests*',)),
6666
test_suite='tests',
67-
python_requires='>=3.6',
67+
python_requires='>=3.7',
6868
include_package_data=True,
6969
classifiers=[
7070
'Development Status :: 4 - Beta',
7171
'Intended Audience :: Developers',
7272
'License :: OSI Approved :: MIT License',
73-
'Programming Language :: Python :: 3.6',
7473
'Programming Language :: Python :: 3.7',
7574
'Programming Language :: Python :: 3.8',
7675
'Programming Language :: Python :: 3.9',

tests/test_QueryApiDataFrame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import httpretty
44
import pytest
5-
import rx
5+
import reactivex as rx
66
from pandas import DataFrame
77
from pandas._libs.tslibs.timestamps import Timestamp
8-
from rx import operators as ops
8+
from reactivex import operators as ops
99

1010
from influxdb_client import InfluxDBClient, Point, WritePrecision, WriteOptions
1111
from influxdb_client.client.warnings import MissingPivotFunction

tests/test_WriteApiBatching.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
import httpretty
1111
import pytest
12-
import rx
13-
from rx import operators as ops
12+
import reactivex as rx
13+
from reactivex import operators as ops
1414

1515
import influxdb_client
1616
from influxdb_client import WritePrecision, InfluxDBClient, VERSION

0 commit comments

Comments
 (0)