[PKG-Openstack-devel] Bug#751990: Bug#751990: python-nose-exclude: Add Python 3 support

Barry Warsaw barry at debian.org
Wed Jun 18 18:44:49 UTC 2014

On Jun 19, 2014, at 12:05 AM, Thomas Goirand wrote:

>Thanks a lot for this work, this is very much appreciated.

You're welcome!

>Unfortunately, I need to maintain a backport of nose-exclude in Wheezy,
>and your patch is breaking it (log from the build on my (unclean) laptop):
>  File
>line 129, in <module>
>    class TestNoseExcludeTest(PluginTester, unittest.TestCase):
>  File
>line 136, in TestNoseExcludeTest
>    @unittest.skipIf(IS_PY3, 'issue 10')
>AttributeError: 'module' object has no attribute 'skipIf'
>Would you be able to provide a patch which would work as well in Wheezy?
>If not, then maybe we could use six to do the "if python3"?

Actually, the problem is that in Wheezy we also have Python 2.6, and pybuild
will build the package against that version.  Unfortunately, Python 2.6
doesn't have unittest.skipIf().

Even crazier, something is *very* odd about how that test module gets run.  It
seems like inside the test methods, all the names in the global namespace have
been set to None, including IS_PY3 and sys!  I have nfc what's going on there,
but I did rework the patch so that the tests will be properly skipped in
Python 3, in a way that's compatible with Python 2.6.

I've updated the git repo, however git-buildpackage is mystifying me.  It
seems that there's no way to update an existing patch afaict.  If I
`gbp pq switch` to land on the patch-queue/py3 branch, then I update the
tests.py file.  Now, `gbp pq rebase` refuses to work because there are
uncommitted changes, and if I `git commit` and then rebase, or `pq switch`
back to the py3 branch, it always insists on creating a new debian/patch on
the stack.  This is the first package I've used gbp on, and documentation is a
bit sparse in this regard, so I hope you can make sense of the quilt patch

In any case, the package now builds for me on wheezy-backports.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/openstack-devel/attachments/20140618/1ab98a76/attachment.sig>

More information about the Openstack-devel mailing list