From ded84fc23ad5f79489a400550b9bf198d62f94ba Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 16 Dec 2019 15:25:27 +0100 Subject: [PATCH 1/4] Update pymongo to the latest version. Issue which has prevented us from upgrading in the past (https://jira.mongodb.org/browse/PYTHON-1966) has been resolved. --- fixed-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixed-requirements.txt b/fixed-requirements.txt index 7f9222282c..3ac7f05d29 100644 --- a/fixed-requirements.txt +++ b/fixed-requirements.txt @@ -18,7 +18,7 @@ requests[security]==2.22.0 apscheduler==3.6.3 gitpython==2.1.11 jsonschema==2.6.0 -pymongo==3.7.2 +pymongo==3.10.0 mongoengine==0.18.2 passlib==1.7.1 lockfile==0.12.2 From c75f264364223f15a14bf44b4fcbdb7457113094 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 16 Dec 2019 15:28:29 +0100 Subject: [PATCH 2/4] Add a comment. --- st2common/st2common/models/db/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/st2common/st2common/models/db/__init__.py b/st2common/st2common/models/db/__init__.py index 31c4abc1d4..8edb72b970 100644 --- a/st2common/st2common/models/db/__init__.py +++ b/st2common/st2common/models/db/__init__.py @@ -295,6 +295,9 @@ def db_cleanup(db_name, db_host, db_port, username=None, password=None, def _get_ssl_kwargs(ssl=False, ssl_keyfile=None, ssl_certfile=None, ssl_cert_reqs=None, ssl_ca_certs=None, authentication_mechanism=None, ssl_match_hostname=True): + # NOTE: In pymongo 3.9.0 some of the ssl related arguments have been renamed - + # https://api.mongodb.com/python/current/changelog.html#changes-in-version-3-9-0 + # Old names still work, but we should eventually update to new argument names. ssl_kwargs = { 'ssl': ssl, } From 004db835bf07effe664c878f7d8c548b8ef9d043 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 16 Dec 2019 15:29:36 +0100 Subject: [PATCH 3/4] Add changelog entry. --- CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 639d48c58f..ccf1635231 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -47,6 +47,7 @@ Changed function must be called separately. (improvement) * Update various internal dependencies to latest stable versions (cryptography, jinja2, requests, apscheduler, eventlet, amqp, kombu, semver, six) #4819 (improvement) +* Upgrade ``pymongo`` to the latest stable version (``3.10.0.``). #4835 (improvement) Fixed ~~~~~ From 30f5c3da2c27caab1dd7420e1b434fb61b080bde Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 16 Dec 2019 22:20:54 +0100 Subject: [PATCH 4/4] Re-generate requirements.txt files. --- requirements.txt | 2 +- st2api/requirements.txt | 2 +- st2auth/requirements.txt | 2 +- st2common/requirements.txt | 2 +- st2stream/requirements.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements.txt b/requirements.txt index 992ff32fd4..5e6b631ee4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -40,7 +40,7 @@ prettytable prompt-toolkit==1.0.15 psutil==5.6.3 pyinotify==0.9.6 -pymongo==3.7.2 +pymongo==3.10.0 pyrabbit python-dateutil==2.8.0 python-editor==1.0.4 diff --git a/st2api/requirements.txt b/st2api/requirements.txt index be6ea74399..735c125d26 100644 --- a/st2api/requirements.txt +++ b/st2api/requirements.txt @@ -13,5 +13,5 @@ kombu==4.6.6 mongoengine==0.18.2 oslo.config<1.13,>=1.12.1 oslo.utils<=3.37.0,>=3.36.2 -pymongo==3.7.2 +pymongo==3.10.0 six==1.13.0 diff --git a/st2auth/requirements.txt b/st2auth/requirements.txt index 315a21db3c..9d20e81a42 100644 --- a/st2auth/requirements.txt +++ b/st2auth/requirements.txt @@ -11,6 +11,6 @@ git+https://github.com/StackStorm/st2-auth-backend-flat-file.git@master#egg=st2- gunicorn==19.9.0 oslo.config<1.13,>=1.12.1 passlib==1.7.1 -pymongo==3.7.2 +pymongo==3.10.0 six==1.13.0 stevedore==1.30.1 diff --git a/st2common/requirements.txt b/st2common/requirements.txt index 991358ed9d..95d94276ba 100644 --- a/st2common/requirements.txt +++ b/st2common/requirements.txt @@ -23,7 +23,7 @@ mongoengine==0.18.2 networkx==1.11 oslo.config<1.13,>=1.12.1 paramiko==2.6.0 -pymongo==3.7.2 +pymongo==3.10.0 python-dateutil==2.8.0 python-statsd==2.1.0 pyyaml==5.1.2 diff --git a/st2stream/requirements.txt b/st2stream/requirements.txt index 890b64f2c1..7a920a843f 100644 --- a/st2stream/requirements.txt +++ b/st2stream/requirements.txt @@ -12,5 +12,5 @@ kombu==4.6.6 mongoengine==0.18.2 oslo.config<1.13,>=1.12.1 oslo.utils<=3.37.0,>=3.36.2 -pymongo==3.7.2 +pymongo==3.10.0 six==1.13.0