[Asterisk-code-review] testsuite: Python 3 compatibility inital commit (testsuite[development/16/python3])

George Joseph asteriskteam at digium.com
Wed May 11 08:45:41 CDT 2022


Attention is currently required from: Michael Bradeen, Joshua Colp, Kevin Harwell.
George Joseph has posted comments on this change. ( https://gerrit.asterisk.org/c/testsuite/+/18199 )

Change subject: testsuite: Python 3 compatibility inital commit
......................................................................


Patch Set 8: Code-Review-1

(1 comment)

File lib/python/asterisk/test_runner.py:

https://gerrit.asterisk.org/c/testsuite/+/18199/comment/665df7d6_8d5b2f35 
PS7, Line 18: from importlib.machinery import SourceFileLoader
> This is causing the CI to fail.
> 
> This wasn't introduced until 3.1, and so is no in 2.7. Probably need to wrap in a try/except similar to how the yaml import below is handled, or by some other version distinguishing mechanism.

There's also another issue....   Even if you run the testsuite with "python3", this will still fail if the default python implementation is still "python2".  I.E. If /usr/bin/python points to /usr/bin/python2, this will fail even if you run "python3 ./runtests.py".  We must be executing '/usr/bin/python' explicitly somewhere.



-- 
To view, visit https://gerrit.asterisk.org/c/testsuite/+/18199
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: testsuite
Gerrit-Branch: development/16/python3
Gerrit-Change-Id: Ic7a1d72b174df59107370fcb03fae9dc4cdfc9d3
Gerrit-Change-Number: 18199
Gerrit-PatchSet: 8
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-CC: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Attention: Joshua Colp <jcolp at sangoma.com>
Gerrit-Attention: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Wed, 11 May 2022 13:45:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20220511/e7f7aecd/attachment.html>


More information about the asterisk-code-review mailing list