From d5e8629082238f1d2326cb7742c74c5d7ac2c7e5 Mon Sep 17 00:00:00 2001 From: Igor Sapego Date: Thu, 5 May 2022 12:07:28 +0400 Subject: [PATCH 1/4] IGNITE-17023 Remove Python 3.6, add 3.10. --- README.md | 6 +++--- docs/readme.rst | 2 +- examples/docker-compose.yml | 1 + pyignite/datatypes/standard.py | 4 ++-- requirements/docs.txt | 2 +- requirements/tests.txt | 2 +- scripts/BuildWheels.ps1 | 2 +- scripts/build_wheels.sh | 2 +- scripts/create_distr.sh | 4 ++-- scripts/create_sdist.sh | 2 +- setup.py | 4 ++-- 11 files changed, 16 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 2a936d6..be5fa7b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Apache Ignite thin (binary protocol) client, written in Python 3. ## Prerequisites -- Python 3.6 or above (3.6, 3.7, 3.8 and 3.9 are tested), +- Python 3.7 or above (3.7, 3.8, 3.9 and 3.10 are tested), - Access to Apache Ignite node, local or remote. The current thin client version was tested on Apache Ignite 2.10 (binary client protocol 1.7.0). @@ -45,12 +45,12 @@ There is an optional C extension to speedup some computational intensive tasks. ***NB!* Docker is required.** -- On Windows MSVC 14.x required, and it should be in path, also python versions 3.6, 3.7, 3.8 and 3.9 both for x86 and +- On Windows MSVC 14.x required, and it should be in path, also python versions 3.7, 3.8, 3.9 and 3.10 both for x86 and x86-64 should be installed. You can disable some of these versions but you'd need to edit script for that. - For building `wheels` for Windows, invoke script `.\scripts\BuildWheels.ps1` using PowerShell. Just make sure that your execution policy allows execution of scripts in your environment. - Ready wheels for `x86` and `x86-64` for different python versions (3.6, 3.7, 3.8 and 3.9) will be + Ready wheels for `x86` and `x86-64` for different python versions (3.7, 3.8, 3.9 and 3.10) will be located in `distr` directory. ### Updating from older version diff --git a/docs/readme.rst b/docs/readme.rst index 5fc76a7..3e9bec6 100644 --- a/docs/readme.rst +++ b/docs/readme.rst @@ -35,7 +35,7 @@ through a raw TCP socket. Prerequisites ------------- -- *Python 3.6* or above (3.6, 3.7, 3.8 and 3.9 are tested), +- *Python 3.7* or above (3.7, 3.8, 3.9 and 3.10 are tested), - Access to *Apache Ignite* node, local or remote. The current thin client version was tested on *Apache Ignite 2.10.0* (binary client protocol 1.7.0). diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index 76c91b3..f3071b8 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -13,6 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +version: "3" services: ignite_0: image: apacheignite/ignite:latest diff --git a/pyignite/datatypes/standard.py b/pyignite/datatypes/standard.py index 9173daa..9357e8f 100644 --- a/pyignite/datatypes/standard.py +++ b/pyignite/datatypes/standard.py @@ -18,7 +18,7 @@ import decimal from io import SEEK_CUR from math import ceil -from typing import Tuple +from typing import Tuple, Union import uuid from pyignite.constants import * @@ -365,7 +365,7 @@ def build_c_type(cls): return cls._object_c_type @classmethod - def from_python_not_null(cls, stream, value: [date, datetime], **kwargs): + def from_python_not_null(cls, stream, value: Union[date, datetime], **kwargs): if type(value) is date: value = datetime.combine(value, time()) data_type = cls.build_c_type() diff --git a/requirements/docs.txt b/requirements/docs.txt index 962f07f..2bf167e 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -3,5 +3,5 @@ -r install.txt wheel==0.36.2 -Sphinx==1.7.5 +Sphinx==4.1.2 sphinxcontrib-fulltoc==1.2.0 \ No newline at end of file diff --git a/requirements/tests.txt b/requirements/tests.txt index a84975e..7262fe9 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -6,6 +6,6 @@ pytest-cov==2.11.1 pytest-asyncio==0.14.0 teamcity-messages==1.28 psutil==5.8.0 -jinja2==2.11.3 +jinja2==3.0.3 markupsafe==2.0.1 flake8==3.8.4 diff --git a/scripts/BuildWheels.ps1 b/scripts/BuildWheels.ps1 index cf7424e..9098d58 100644 --- a/scripts/BuildWheels.ps1 +++ b/scripts/BuildWheels.ps1 @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -$PyVers="36","37","38","39" +$PyVers="37","38","39","310" [System.Collections.ArrayList]$PyVersFull = $PyVers foreach ($Ver in $PyVers) diff --git a/scripts/build_wheels.sh b/scripts/build_wheels.sh index cf5f760..b30c3b7 100755 --- a/scripts/build_wheels.sh +++ b/scripts/build_wheels.sh @@ -27,7 +27,7 @@ function repair_wheel { # Compile wheels for PYBIN in /opt/python/*/bin; do - if [[ $PYBIN =~ ^(.*)cp3[6789](.*)$ ]]; then + if [[ $PYBIN =~ ^(.*)cp3[7891](.*)$ ]]; then "${PYBIN}/pip" wheel /pyignite/ --no-deps -w /wheels fi done diff --git a/scripts/create_distr.sh b/scripts/create_distr.sh index 5732aba..b86ac1e 100755 --- a/scripts/create_distr.sh +++ b/scripts/create_distr.sh @@ -16,7 +16,7 @@ DISTR_DIR="$(pwd)/distr/" SRC_DIR="$(pwd)" -DEFAULT_DOCKER_IMAGE="quay.io/pypa/manylinux1_x86_64" +DEFAULT_DOCKER_IMAGE="quay.io/pypa/manylinux2010_x86_64" usage() { cat < Date: Thu, 26 May 2022 01:22:27 -0700 Subject: [PATCH 2/4] IGNITE-17023 Fix documentation --- .gitignore | 1 + docs/readme.rst | 2 +- docs/source/pyignite.connection.protocol_context.rst | 2 +- examples/docker-compose.yml | 7 ++----- examples/readme.md | 6 +++++- pyignite/monitoring.py | 2 -- requirements/docs.txt | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 14ec495..7576fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ junit*.xml pyignite.egg-info ignite-log-* __pycache__ +venv diff --git a/docs/readme.rst b/docs/readme.rst index 3e9bec6..17eb4b5 100644 --- a/docs/readme.rst +++ b/docs/readme.rst @@ -37,7 +37,7 @@ Prerequisites - *Python 3.7* or above (3.7, 3.8, 3.9 and 3.10 are tested), - Access to *Apache Ignite* node, local or remote. The current thin client - version was tested on *Apache Ignite 2.10.0* (binary client protocol 1.7.0). + version was tested on *Apache Ignite 2.13.0* (binary client protocol 1.7.0). Installation ------------ diff --git a/docs/source/pyignite.connection.protocol_context.rst b/docs/source/pyignite.connection.protocol_context.rst index a5298ba..1ec3c81 100644 --- a/docs/source/pyignite.connection.protocol_context.rst +++ b/docs/source/pyignite.connection.protocol_context.rst @@ -14,7 +14,7 @@ limitations under the License. pyignite.connection.protocol_context package -=========================== +============================================ .. automodule:: pyignite.connection.protocol_context :members: \ No newline at end of file diff --git a/examples/docker-compose.yml b/examples/docker-compose.yml index f3071b8..e2dd178 100644 --- a/examples/docker-compose.yml +++ b/examples/docker-compose.yml @@ -20,18 +20,15 @@ services: ports: - 10800:10800 restart: always - network_mode: host ignite_1: image: apacheignite/ignite:latest ports: - - 10800:10801 + - 10801:10800 restart: always - network_mode: host ignite_2: image: apacheignite/ignite:latest ports: - - 10800:10802 + - 10802:10800 restart: always - network_mode: host diff --git a/examples/readme.md b/examples/readme.md index 8fd4848..ebc6b7b 100644 --- a/examples/readme.md +++ b/examples/readme.md @@ -2,12 +2,16 @@ This directory contains the following example files: +- `async_key_value` - asynchronous key-value operations, +- `async_sql` - asynchronous SQL operations, - `binary_basics.py` − basic operations with Complex objects, -- `binary_types.py` - read SQL table as a key-value cache, - `create_binary.py` − create SQL row with key-value operation, +- `expiry_policy.py` - the expiration policy for caches for synchronous and asynchronous operations is demonstrated, - `failover.py` − fail-over connection to Ignite cluster, - `get_and_put.py` − basic key-value operations, +- `get_and_put_complex.py` − key-value operations with different value and key types, - `migrate_binary.py` − work with Complex object schemas, +- `read_binary.py` − creates caches and fills them with data through SQL queries, demonstrates working with binary objects, - `scans.py` − cache scan operation, - `sql.py` − use Ignite SQL, - `type_hints.py` − type hints. diff --git a/pyignite/monitoring.py b/pyignite/monitoring.py index 9bbfd20..997a5f8 100644 --- a/pyignite/monitoring.py +++ b/pyignite/monitoring.py @@ -56,8 +56,6 @@ def on_query_success(self, event): .. note:: Debug logging is also available, standard ``logging`` is used. Just set ``DEBUG`` level to *pyignite* logger. -| -| """ from typing import Optional, Sequence diff --git a/requirements/docs.txt b/requirements/docs.txt index 2bf167e..d088fff 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -3,5 +3,5 @@ -r install.txt wheel==0.36.2 -Sphinx==4.1.2 +Sphinx==4.3.2 sphinxcontrib-fulltoc==1.2.0 \ No newline at end of file From 39dae698230a05f9f1f910c01250d000c5be10f6 Mon Sep 17 00:00:00 2001 From: Igor Sapego Date: Thu, 26 May 2022 01:30:41 -0700 Subject: [PATCH 3/4] IGNITE-17923 Fix tox and Travis --- .travis.yml | 6 +++--- tox.ini | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index a52c5b2..5d60866 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,9 +34,6 @@ before_install: jobs: include: - - python: '3.6' - arch: amd64 - env: TOXENV=py36 - python: '3.7' arch: amd64 env: TOXENV=py37 @@ -49,6 +46,9 @@ jobs: - python: '3.9' arch: amd64 env: TOXENV=py39 + - python: '3.10' + arch: amd64 + env: TOXENV=py310 install: pip install tox script: tox diff --git a/tox.ini b/tox.ini index 964b748..e873e21 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ [tox] skipsdist = True -envlist = codestyle,py{36,37,38,39} +envlist = codestyle,py{37,38,39,310} [pytest] log_format = %(asctime)s %(name)s %(levelname)s %(message)s From 25256b6069735d5155ac959310ca76d881690a13 Mon Sep 17 00:00:00 2001 From: Igor Sapego Date: Thu, 26 May 2022 01:31:38 -0700 Subject: [PATCH 4/4] IGNITE-17023 Update Ignite in Travis --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d60866..45f26f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ addons: env: global: - - IGNITE_VERSION=2.12.0 + - IGNITE_VERSION=2.13.0 - IGNITE_HOME=/opt/ignite before_install: