You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by iv...@apache.org on 2021/05/19 13:21:33 UTC

[ignite-python-thin-client] branch master updated: IGNITE-14738 Remove obsolete setup dependency to pytest-runner - Fixes #38.

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

ivandasch 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 8c8a006  IGNITE-14738 Remove obsolete setup dependency to pytest-runner - Fixes #38.
8c8a006 is described below

commit 8c8a006a0b0e913f9d38dd45dab80001b144c3c6
Author: Ivan Daschinsky <iv...@apache.org>
AuthorDate: Wed May 19 16:20:22 2021 +0300

    IGNITE-14738 Remove obsolete setup dependency to pytest-runner - Fixes #38.
---
 requirements/install.txt           |  2 +-
 requirements/setup.txt             |  3 ---
 setup.py                           | 33 +++++++--------------------------
 tests/common/test_expiry_policy.py |  2 +-
 4 files changed, 9 insertions(+), 31 deletions(-)

diff --git a/requirements/install.txt b/requirements/install.txt
index 1ee12a9..feb4eb6 100644
--- a/requirements/install.txt
+++ b/requirements/install.txt
@@ -1,3 +1,3 @@
 # these pip packages are necessary for the pyignite to run
 
-attrs==20.3.0
+attrs>=20.3.0
diff --git a/requirements/setup.txt b/requirements/setup.txt
deleted file mode 100644
index d202467..0000000
--- a/requirements/setup.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# additional package for integrating pytest in setuptools
-
-pytest-runner==5.3.0
diff --git a/setup.py b/setup.py
index 7a3cb70..1a4071d 100644
--- a/setup.py
+++ b/setup.py
@@ -13,7 +13,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 import re
-from collections import defaultdict
 from distutils.command.build_ext import build_ext
 from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
 
@@ -63,25 +62,12 @@ def is_a_requirement(line):
     ])
 
 
-requirement_sections = [
-    'install',
-    'setup',
-    'tests',
-    'docs',
-]
-
-requirements = defaultdict(list)
-
-for section in requirement_sections:
-    with open(
-        'requirements/{}.txt'.format(section),
-        'r',
-        encoding='utf-8',
-    ) as requirements_file:
-        for line in requirements_file.readlines():
-            line = line.strip('\n')
-            if is_a_requirement(line):
-                requirements[section].append(line)
+install_requirements = []
+with open('requirements/install.txt', 'r', encoding='utf-8') as requirements_file:
+    for line in requirements_file.readlines():
+        line = line.strip('\n')
+        if is_a_requirement(line):
+            install_requirements.append(line)
 
 with open('README.md', 'r', encoding='utf-8') as readme_file:
     long_description = readme_file.read()
@@ -114,12 +100,7 @@ def run_setup(with_binary=True):
         long_description_content_type='text/markdown',
         url='https://github.com/apache/ignite-python-thin-client',
         packages=setuptools.find_packages(),
-        install_requires=requirements['install'],
-        tests_require=requirements['tests'],
-        setup_requires=requirements['setup'],
-        extras_require={
-            'docs': requirements['docs'],
-        },
+        install_requires=install_requirements,
         license="Apache License 2.0",
         license_files=('LICENSE', 'NOTICE'),
         classifiers=[
diff --git a/tests/common/test_expiry_policy.py b/tests/common/test_expiry_policy.py
index cc852c7..9dc4152 100644
--- a/tests/common/test_expiry_policy.py
+++ b/tests/common/test_expiry_policy.py
@@ -124,7 +124,7 @@ async def test_expiry_policy_async(async_cache):
 
         await asyncio.sleep(ttl * 2 / 3)
 
-        cache_updated.get(2)  # Check that access doesn't matter for updated policy.
+        await cache_updated.get(2)  # Check that access doesn't matter for updated policy.
 
         await asyncio.sleep(ttl * 2 / 3)