Skip to content

Introduce ConnectionPool with master discovery #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
python: drop Python 2 support
Python 2.7 reached the end of its life on January 1st, 2020 [1]. Since
it would be a waste to ignore several Python 3.x features in master
discovery implementation, we decided to drop Python 2 support here.

Python 2 workaround cleanup activities are expected to be solved as
part of #212 solution.

1. https://www.python.org/doc/sunset-python-2/

Part of #196
  • Loading branch information
DifferentialOrange committed Apr 20, 2022
commit 54b95398eb4c8733a0d918b65e5ca43459d079c5
2 changes: 0 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
- '2.8'
- '2.x-latest'
python:
- '2.7'
- '3.5'
- '3.6'
- '3.7'
Expand Down Expand Up @@ -116,7 +115,6 @@ jobs:
- '1.10'
- '2.8'
python:
- '2.7'
- '3.10'

steps:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
(PR #192).

### Changed
- **Breaking**: drop Python 2 support (PR #207).
- **Breaking**: change binary types encode/decode for Python 3
to support working with varbinary (PR #211, #105).
With Python 2 the behavior of the connector remains the same.
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,6 @@ def find_version(*file_paths):
command_options=command_options,
install_requires=[
'msgpack>=0.4.0',
]
],
python_requires='>=3',
)
9 changes: 0 additions & 9 deletions test/suites/lib/skip.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,3 @@ def skip_or_run_varbinary_test(func):
return skip_or_run_test_tarantool(func, '2.2.1',
'does not support VARBINARY type')


def skip_or_run_mp_bin_test(func):
"""Decorator to skip or run mp_bin-related tests depending on
the Python version.

Python 2 connector do not support mp_bin.
"""

return skip_or_run_test_python_major(func, 3, 'does not support mp_bin')
5 changes: 1 addition & 4 deletions test/suites/test_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import unittest
import tarantool

from .lib.skip import skip_or_run_mp_bin_test, skip_or_run_varbinary_test
from .lib.skip import skip_or_run_varbinary_test
from .lib.tarantool_server import TarantoolServer

class TestSuite_Encoding(unittest.TestCase):
Expand Down Expand Up @@ -99,7 +99,6 @@ def test_01_02_string_decode_for_encoding_utf8_behavior(self):
resp = self.con_encoding_utf8.eval("return box.space['%s']:get('%s')" % (space, data))
self.assertSequenceEqual(resp, [[data]])

@skip_or_run_mp_bin_test
@skip_or_run_varbinary_test
def test_01_03_bytes_encode_for_encoding_utf8_behavior(self):
data_id = 103
Expand All @@ -111,7 +110,6 @@ def test_01_03_bytes_encode_for_encoding_utf8_behavior(self):
resp = self.con_encoding_utf8.select(space, [ data ], index='varbin')
self.assertSequenceEqual(resp, [[data_id, data]])

@skip_or_run_mp_bin_test
@skip_or_run_varbinary_test
def test_01_04_varbinary_decode_for_encoding_utf8_behavior(self):
data_id = 104
Expand Down Expand Up @@ -162,7 +160,6 @@ def test_02_03_bytes_encode_for_encoding_none_behavior(self):
resp = self.con_encoding_none.select(space, [data])
self.assertSequenceEqual(resp, [[data]])

@skip_or_run_mp_bin_test
@skip_or_run_varbinary_test
def test_02_04_varbinary_decode_for_encoding_none_behavior(self):
data_id = 204
Expand Down