'test_trans_add' unit test broken on Python 3.4.3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Shared File Systems Service (Manila) |
Fix Released
|
Critical
|
Nicolas Trangez |
Bug Description
The `test_trans_add` test in `manila.
consistently failed on our CI system, which is based on Ubuntu 14.04.
Contrary, on my development machine running Fedora 22, all tests
succeeded. Whilst the test dispatches on Python version (`if six.PY2`)
to select which `hacking` errors are expected, at which line/column
pair, I noticed our CI system returned the expected values for Python 2,
not the Python 3 ones, which differ in column numbers only.
After verifying versions of dependencies, stepping through the code and
whatnot, the only difference left turned out to be the version of Python
being used: 3.4.2 on my workstation, 3.4.3 on our CI system. As a last
resort, I opened the Python 3.4 ChangeLog [1] and noticed a suspicious
entry::
Issue #21295: Revert some changes (issue #16795) to AST line numbers
and column offsets that constituted a regression.
Looking at those issues, it becomes clear this is the cause. Supposedly
the Python 3 specific expected values were created on a Python 3.4
version containing the original patch of #16795 [2], and this is also
what's running on the OpenStack CI system. Our CI system runs a build of
Python which contains the revert of #21295 [3].
This patch fixes the version-specific expected error calculation by not
simply dispatching on Python 2 or 3, but specifically limits the custom
version to 3.4.0 <= Python < 3.4.3.
[1] https:/
[2] http://
[3] http://
Changed in manila: | |
assignee: | nobody → Nicolas Trangez (eikke) |
status: | New → In Progress |
tags: | added: liberty-rc-porential |
tags: |
added: liberty-rc-potential removed: liberty-rc-porential |
Changed in manila: | |
importance: | Undecided → Critical |
Changed in manila: | |
milestone: | none → mitaka-1 |
milestone: | mitaka-1 → liberty-rc2 |
Changed in manila: | |
status: | Fix Committed → Fix Released |
Changed in manila: | |
milestone: | liberty-rc2 → 1.0.0 |
Reviewed: https:/ /review. openstack. org/227854 /git.openstack. org/cgit/ openstack/ manila/ commit/ ?id=83167bd2a2a 0369d2271bd08eb c7ca753a603d60
Committed: https:/
Submitter: Jenkins
Branch: master
commit 83167bd2a2a0369 d2271bd08ebc7ca 753a603d60
Author: Nicolas Trangez <email address hidden>
Date: Fri Sep 25 15:26:57 2015 +0200
Fix `test_trans_add` for Python 3.4.3
The `test_trans_add` test in `manila. tests.test_ hacking. HackingTestCase `
consistently failed on our CI system, which is based on Ubuntu 14.04.
Contrary, on my development machine running Fedora 22, all tests
succeeded. Whilst the test dispatches on Python version (`if six.PY2`)
to select which `hacking` errors are expected, at which line/column
pair, I noticed our CI system returned the expected values for Python 2,
not the Python 3 ones, which differ in column numbers only.
After verifying versions of dependencies, stepping through the code and
whatnot, the only difference left turned out to be the version of Python
being used: 3.4.2 on my workstation, 3.4.3 on our CI system. As a last
resort, I opened the Python 3.4 ChangeLog [1] and noticed a suspicious
entry::
Issue #21295: Revert some changes (issue #16795) to AST line numbers
and column offsets that constituted a regression.
Looking at those issues, it becomes clear this is the cause. Supposedly
the Python 3 specific expected values were created on a Python 3.4
version containing the original patch of #16795 [2], and this is also
what's running on the OpenStack CI system. Our CI system runs a build of
Python which contains the revert of #21295 [3].
This patch fixes the version-specific expected error calculation by not
simply dispatching on Python 2 or 3, but specifically limits the custom
version to 3.4.0 <= Python < 3.4.3.
[1] https:/ /docs.python. org/3.4/ whatsnew/ changelog. html bugs.python. org/issue16795 bugs.python. org/issue21295
[2] http://
[3] http://
Closes-Bug: 1499743
Change-Id: I649fb1f5244efb a7ab79e9bf33743 3d541fa8b19