kgiusti closed pull request #429: DISPATCH-1229 - Fixed imports causing issues to system tests on python3.7 URL: https://github.com/apache/qpid-dispatch/pull/429
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/python/qpid_dispatch_internal/tools/command.py b/python/qpid_dispatch_internal/tools/command.py index ace9391f..b7da384b 100644 --- a/python/qpid_dispatch_internal/tools/command.py +++ b/python/qpid_dispatch_internal/tools/command.py @@ -26,7 +26,10 @@ from __future__ import print_function import sys, json, optparse, os -from collections import Sequence, Mapping +try: + from collections.abc import Mapping, Sequence +except ImportError: + from collections import Mapping, Sequence from qpid_dispatch_site import VERSION from proton import SSLDomain, Url from proton.utils import SyncRequestResponse, BlockingConnection diff --git a/tests/tox.ini.in b/tests/tox.ini.in index af724a43..4885e61d 100644 --- a/tests/tox.ini.in +++ b/tests/tox.ini.in @@ -18,7 +18,7 @@ # [tox] -envlist = py27,py35,py36 +envlist = py27,py35,py36,py37 skipsdist = True minversion = ${TOX_VERSION} skip_missing_interpreters = True @@ -43,4 +43,6 @@ basepython = python3.5 [testenv:py36] basepython = python3.6 +[testenv:py37] +basepython = python3.7 diff --git a/tools/qdmanage.in b/tools/qdmanage.in index 9ed3adb8..b1480e36 100755 --- a/tools/qdmanage.in +++ b/tools/qdmanage.in @@ -27,7 +27,10 @@ from __future__ import print_function import sys, json, re import qpid_dispatch_site from qpid_dispatch.management.client import Node, Url -from collections import Mapping, Sequence +try: + from collections.abc import Mapping, Sequence +except ImportError: + from collections import Mapping, Sequence from optparse import OptionGroup from qpid_dispatch_internal.tools.command import OptionParser, Option, UsageError, connection_options, check_args, \ main, opts_ssl_domain, opts_url, opts_sasl ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org