Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ junit*.xml
pyignite.egg-info
ignite-log-*
__pycache__
venv
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ addons:

env:
global:
- IGNITE_VERSION=2.12.0
- IGNITE_VERSION=2.13.0
- IGNITE_HOME=/opt/ignite

before_install:
Expand All @@ -34,9 +34,6 @@ before_install:

jobs:
include:
- python: '3.6'
arch: amd64
env: TOXENV=py36
- python: '3.7'
arch: amd64
env: TOXENV=py37
Expand All @@ -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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/pyignite.connection.protocol_context.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
limitations under the License.

pyignite.connection.protocol_context package
===========================
============================================

.. automodule:: pyignite.connection.protocol_context
:members:
8 changes: 3 additions & 5 deletions examples/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion examples/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions pyignite/datatypes/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 0 additions & 2 deletions pyignite/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

-r install.txt
wheel==0.36.2
Sphinx==1.7.5
Sphinx==4.3.2
sphinxcontrib-fulltoc==1.2.0
2 changes: 1 addition & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion scripts/BuildWheels.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/create_distr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=""
Expand Down
2 changes: 1 addition & 1 deletion scripts/create_sdist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down