Skip to content

Commit 26a6a6d

Browse files
authored
Merge pull request apache#1082 from datastax/python-1212
PYTHON-1212: bump gremlinpython dependency to 3.4.6
2 parents 2385095 + 7dcda6d commit 26a6a6d

6 files changed

Lines changed: 21 additions & 11 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Bug Fixes
1414
Others
1515
------
1616
* Bump geomet dependency version to 0.2 (PYTHON-1243)
17+
* Bump gremlinpython dependency version to 3.4.6 (PYTHON-1212)
1718

1819
3.23.0
1920
======

Jenkinsfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,11 @@ def describePerCommitStage() {
290290
currentBuild.displayName = "Per-Commit (${env.EVENT_LOOP_MANAGER} | ${type.capitalize()})"
291291
currentBuild.description = "Per-Commit build and ${type} testing of ${serverDescription} against Python v2.7.14 and v3.5.6 using ${env.EVENT_LOOP_MANAGER} event loop manager"
292292
}
293+
294+
sh label: 'Describe the python environment', script: '''#!/bin/bash -lex
295+
python -V
296+
pip freeze
297+
'''
293298
}
294299

295300
def describeScheduledTestingStage() {
@@ -623,15 +628,15 @@ pipeline {
623628
axis {
624629
name 'CASSANDRA_VERSION'
625630
values '3.11', // Current Apache Cassandra
626-
'dse-6.8.0' // Current DataStax Enterprise
631+
'dse-6.8' // Current DataStax Enterprise
627632
}
628633
axis {
629634
name 'PYTHON_VERSION'
630635
values '2.7.14', '3.5.6'
631636
}
632637
axis {
633638
name 'CYTHON_ENABLED'
634-
values 'False', 'True'
639+
values 'False'
635640
}
636641
}
637642

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def run_setup(extensions):
410410
dependencies.append('futures')
411411

412412
_EXTRAS_REQUIRE = {
413-
'graph': ['gremlinpython==3.3.4']
413+
'graph': ['gremlinpython==3.4.6']
414414
}
415415

416416
setup(

test-datastax-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
-r test-requirements.txt
22
kerberos
3-
gremlinpython==3.3.4
3+
gremlinpython==3.4.6

tests/integration/simulacron/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
from cassandra.metadata import SchemaParserV4, SchemaParserDSE68
2121

22+
from tests.util import wait_until_not_raised
2223
from tests.integration import CASSANDRA_VERSION, SIMULACRON_JAR, DSE_VERSION
2324

2425
DEFAULT_CLUSTER = "python_simulacron_cluster"
@@ -110,7 +111,8 @@ def submit_request(self, query):
110111
request.add_header("Content-Type", 'application/json')
111112
request.add_header("Content-Length", len(data))
112113

113-
connection = opener.open(request)
114+
# wait that simulacron is ready and listening
115+
connection = wait_until_not_raised(lambda: opener.open(request), 1, 10)
114116
return connection.read().decode('utf-8')
115117

116118
def prime_server_versions(self):

tests/util.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import time
1616
from functools import wraps
1717

18+
1819
def wait_until(condition, delay, max_attempts):
1920
"""
2021
Executes a function at regular intervals while the condition
@@ -44,22 +45,23 @@ def wait_until_not_raised(condition, delay, max_attempts):
4445
"""
4546
def wrapped_condition():
4647
try:
47-
condition()
48+
result = condition()
4849
except:
49-
return False
50+
return False, None
5051

51-
return True
52+
return True, result
5253

5354
attempt = 0
5455
while attempt < (max_attempts-1):
5556
attempt += 1
56-
if wrapped_condition():
57-
return
57+
success, result = wrapped_condition()
58+
if success:
59+
return result
5860

5961
time.sleep(delay)
6062

6163
# last attempt, let the exception raise
62-
condition()
64+
return condition()
6365

6466

6567
def late(seconds=1):

0 commit comments

Comments
 (0)