[
https://issues.apache.org/jira/browse/DISPATCH-1229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16726223#comment-16726223
]
ASF GitHub Bot commented on DISPATCH-1229:
------------------------------------------
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:
[email protected]
> System tests failing when executed with python3.7
> -------------------------------------------------
>
> Key: DISPATCH-1229
> URL: https://issues.apache.org/jira/browse/DISPATCH-1229
> Project: Qpid Dispatch
> Issue Type: Bug
> Components: Tests
> Reporter: Fernando Giorgetti
> Priority: Major
>
> System tests are failing when executed against F29 with only python3.7
> installed.
> A few python source files are importing Mapping and Sequence classes from
> "collections" package, but python3.7 raises a warning message saying:
>
> {noformat}
> DeprecationWarning: Using or importing the ABCs from 'collections' instead of
> from 'collections.abc' is deprecated, and in 3.8 it will stop working
> {noformat}
> There are system tests reading, for example, the output from "qdmanage query"
> and trying to parse it as a JSON, but because of the "warning" message above,
> qdmanage output cannot be parsed and so system test fails.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]