You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by is...@apache.org on 2022/05/26 12:43:08 UTC

[ignite-python-thin-client] branch master updated: IGNITE-17023 Remove Python 3.6, add 3.10.

This is an automated email from the ASF dual-hosted git repository.

isapego pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-python-thin-client.git


The following commit(s) were added to refs/heads/master by this push:
     new ac12197  IGNITE-17023 Remove Python 3.6, add 3.10.
ac12197 is described below

commit ac12197224794bc62d1be35718408632d7afdbd2
Author: Igor Sapego <is...@apache.org>
AuthorDate: Thu May 26 05:42:02 2022 -0700

    IGNITE-17023 Remove Python 3.6, add 3.10.
    
    This closes #52
---
 .gitignore                                           | 1 +
 .travis.yml                                          | 8 ++++----
 README.md                                            | 6 +++---
 docs/readme.rst                                      | 4 ++--
 docs/source/pyignite.connection.protocol_context.rst | 2 +-
 examples/docker-compose.yml                          | 8 +++-----
 examples/readme.md                                   | 6 +++++-
 pyignite/datatypes/standard.py                       | 4 ++--
 pyignite/monitoring.py                               | 2 --
 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 ++--
 tox.ini                                              | 2 +-
 17 files changed, 31 insertions(+), 30 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/.travis.yml b/.travis.yml
index a52c5b2..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:
@@ -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/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..17eb4b5 100644
--- a/docs/readme.rst
+++ b/docs/readme.rst
@@ -35,9 +35,9 @@ 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).
+  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 76c91b3..e2dd178 100644
--- a/examples/docker-compose.yml
+++ b/examples/docker-compose.yml
@@ -13,24 +13,22 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+version: "3"
 services:
   ignite_0:
     image: apacheignite/ignite:latest
     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/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 @@ from datetime import date, datetime, time, timedelta
 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 @@ class DateObject(StandardObject):
         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/pyignite/monitoring.py b/pyignite/monitoring.py
index 9bbfd20..997a5f8 100644
--- a/pyignite/monitoring.py
+++ b/pyignite/monitoring.py
@@ -56,8 +56,6 @@ Event listeners can be registered by passing parameter to :class:`~pyignite.clie
 
 .. 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 962f07f..d088fff 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.3.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 <<EOF
@@ -50,7 +50,7 @@ run_wheel_arch() {
     if [[ $1 =~ ^(i686|x86)$ ]]; then
         PLAT="manylinux1_i686"
         PRE_CMD="linux32"
-        DOCKER_IMAGE="quay.io/pypa/manylinux1_i686"
+        DOCKER_IMAGE="quay.io/pypa/manylinux2010_i686"
     elif [[ $1 =~ ^(x86_64)$ ]]; then
         PLAT="manylinux1_x86_64"
         PRE_CMD=""
diff --git a/scripts/create_sdist.sh b/scripts/create_sdist.sh
index d3bd598..3267269 100755
--- a/scripts/create_sdist.sh
+++ b/scripts/create_sdist.sh
@@ -18,7 +18,7 @@ set -e -u -x
 
 # Create source dist.
 for PYBIN in /opt/python/*/bin; do
-    if [[ $PYBIN =~ ^(.*)cp3[6789](.*)$ ]]; then
+    if [[ $PYBIN =~ ^(.*)cp3[7891](.*)$ ]]; then
         cd pyignite
         "${PYBIN}/python" setup.py sdist --formats=gztar,zip --dist-dir /dist
         break;
diff --git a/setup.py b/setup.py
index 1a4071d..91a72f5 100644
--- a/setup.py
+++ b/setup.py
@@ -92,7 +92,7 @@ def run_setup(with_binary=True):
     setuptools.setup(
         name='pyignite',
         version=version,
-        python_requires='>=3.6',
+        python_requires='>=3.7',
         author='The Apache Software Foundation',
         author_email='dev@ignite.apache.org',
         description='Apache Ignite binary client Python API',
@@ -106,10 +106,10 @@ def run_setup(with_binary=True):
         classifiers=[
             'Programming Language :: Python',
             'Programming Language :: Python :: 3',
-            'Programming Language :: Python :: 3.6',
             'Programming Language :: Python :: 3.7',
             'Programming Language :: Python :: 3.8',
             'Programming Language :: Python :: 3.9',
+            'Programming Language :: Python :: 3.10',
             'Programming Language :: Python :: 3 :: Only',
             'Intended Audience :: Developers',
             'Topic :: Database :: Front-Ends',
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