[Twisted-Python] Canonical way to run trial with Python3
Aloha Are there any suggestions on how to run trial on a given package to be ported to Python 3 Mahalo, Werner
On Thu, May 17, 2018, at 11:51 PM, Werner Thie wrote:
Aloha
Are there any suggestions on how to run trial on a given package to be ported to Python 3
Use an editable installation. trial won't automatically find unported modules in an editable installation, but you run it against any package in src/twisted by specifying the fully-qualified pathname. Perform an editable install of Twisted in a virtual environment within which you'll run trial: $ mkvirtualenv -p /path/to/python3 /path/to/venv3/ $ /path/to/venv3/bin/pip install -e /path/to/twisted/checkout Now that virtual environment's trial can test something that isn't ported to Python 3: $ /path/to/venv3/bin/trial twisted.news # Lots of failures Don't forget to remove the ported package and its tests from notPortedModules when you're done: https://github.com/twisted/twisted/blob/2b61992249d7c628a2685456e5c1608d7565... Good luck and thanks for your interest in porting more of Twisted to Python 3! -- Mark Williams mrw@enotuniq.org
Mahalo Mark just had some time to try to make some progress on porting twisted/nevow to py3 on the fork of Markus Demleitner, https://github.com/msdemlei/nevow.git The tests don't run through but the current status is FAILED (skips=22, expectedFailures=2, failures=1, errors=4, successes=827) I'm currently looking into the tests involving nodejs on the JavaScript side, trying to keep Livepage alive. Werner On 05/18/2018 04:40 PM, Mark Williams wrote:
On Thu, May 17, 2018, at 11:51 PM, Werner Thie wrote:
Aloha
Are there any suggestions on how to run trial on a given package to be ported to Python 3
Use an editable installation. trial won't automatically find unported modules in an editable installation, but you run it against any package in src/twisted by specifying the fully-qualified pathname.
Perform an editable install of Twisted in a virtual environment within which you'll run trial:
$ mkvirtualenv -p /path/to/python3 /path/to/venv3/ $ /path/to/venv3/bin/pip install -e /path/to/twisted/checkout
Now that virtual environment's trial can test something that isn't ported to Python 3:
$ /path/to/venv3/bin/trial twisted.news # Lots of failures
Don't forget to remove the ported package and its tests from notPortedModules when you're done:
https://github.com/twisted/twisted/blob/2b61992249d7c628a2685456e5c1608d7565...
Good luck and thanks for your interest in porting more of Twisted to Python 3!
participants (2)
-
Mark Williams
-
Werner Thie