Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 517952 - dev-python/mox3-0.7.0 - add python3_3 python3_4 support
Summary: dev-python/mox3-0.7.0 - add python3_3 python3_4 support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo OpenStack team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-24 10:35 UTC by Helmut Jarausch
Modified: 2014-10-11 15:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Helmut Jarausch 2014-07-24 10:35:01 UTC
mox3 builds and works for Python 3.3 and 3.4, as well.

Please change

PYTHON_COMPAT=( python{2_7,3_2} )
to 
PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} )
Comment 1 Ian Delaney (RETIRED) gentoo-dev 2014-07-25 05:09:43 UTC
mox3 building for 3.3 and 3.4 is the tip of a rather deep iceberg.  Py3.4 3.4 support needs to be added to each and all of its list of deps, and some of them fail miserably in their testsuites.  Therefore this package does not pass basic requirements to add the support of those pythons.  This is mainly due to those deps being a few versions, or several months, old at a time before py3.3 py3.4 support was common place.

Sorry
Comment 2 Helmut Jarausch 2014-07-25 07:34:00 UTC
(In reply to Ian Delaney from comment #1)
> mox3 building for 3.3 and 3.4 is the tip of a rather deep iceberg.  Py3.4
> 3.4 support needs to be added to each and all of its list of deps, and some
> of them fail miserably in their testsuites.  Therefore this package does not
> pass basic requirements to add the support of those pythons.  This is mainly
> due to those deps being a few versions, or several months, old at a time
> before py3.3 py3.4 support was common place.
> 

I didn't check building mox3 with USE=test, but
without USE=test, mox3 depends on 
dev-python/setuptools
dev-python/pbr
dev-python/fixtures

which all of them are installed here for Python{3_3,3_4} from
GenToo's standard tree.

Furthermore, unpacking mox3-0.7.0.tar.gz, going to
mox3-0.7.0/mox3/tests
and running

python3.3 -m testtools.run  test_mox   gives
Tests running...

Ran 222 tests in 0.085s
OK

Doing the same with 18 % python3.4 -m testtools.run  test_mox
Tests running...
======================================================================
ERROR: test_mox.MoxTest.testStubOutClass_OldStyle
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Work1/Obj/Python/mox3-0.7.0/mox3/tests/test_mox.py", line 1915, in testStubOutClass_OldStyle
    mock_instance.Value().AndReturn('mock instance')
  File "/usr/lib64/python3.4/site-packages/mox3/mox.py", line 1107, in __call__
    self._checker.Check(params, named_params)
  File "/usr/lib64/python3.4/site-packages/mox3/mox.py", line 1029, in Check
    % (' '.join(sorted(still_needed))))
AttributeError: No values given for arguments: self

Ran 222 tests in 0.343s
FAILED (failures=1)
python3.4 shows a single failure

Certainly this has to be fixed (but there are no old style classes in Python3.x)

So, the problem seems to be with USE=test. Perhaps it would be better to
replace all of this and depend only on dev-python/setuptools
and run the test show above.

Sorry for the inconvenience.
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2014-07-25 08:42:26 UTC
My preference is to add those py impls, however your arg. is restricted the testsuite of mox3 itself.  I said he testsuites of the deps of mox3 fall over which means they don't qualify to have support added to them.  Again, those deps, the testsuites of which fall over, are now oldish and support py3.2, as in py3.2 passes the testsuite, but don't make it with the newer py3s
.
Sadly python packages are terrible for failing testsuites.  If it were simply one test failing in py3.4 in mox3's own testsuite, fine. That can be filed the py3s added.  To add the py3 support requires selectively turning a blind eye to the reported failings of the deps' testsuites.  I have worked long and hard to honour the presence and output of testsuites, so am not about to be 'selective' in order to justify this request.

What this package really needs is a version bump with rdeps that are current and support py3.3 3.4, but there isn't one.   Most of the deps of the package do just that, but the package stipulates prior versions.
You need find someone else to add their support.  I'm basically following the rule book.  Maybe find someone else reading a different rule book.
Comment 4 Helmut Jarausch 2014-07-25 08:58:39 UTC
(In reply to Ian Delaney from comment #3)
> My preference is to add those py impls, however your arg. is restricted the
> testsuite of mox3 itself.  I said he testsuites of the deps of mox3 fall
> over which means they don't qualify to have support added to them.  Again,
> those deps, the testsuites of which fall over, are now oldish and support
> py3.2, as in py3.2 passes the testsuite, but don't make it with the newer
> py3s
> .
> Sadly python packages are terrible for failing testsuites.  If it were
> simply one test failing in py3.4 in mox3's own testsuite, fine. That can be
> filed the py3s added.  To add the py3 support requires selectively turning a
> blind eye to the reported failings of the deps' testsuites.  I have worked
> long and hard to honour the presence and output of testsuites, so am not
> about to be 'selective' in order to justify this request.
> 
> What this package really needs is a version bump with rdeps that are current
> and support py3.3 3.4, but there isn't one.   Most of the deps of the
> package do just that, but the package stipulates prior versions.
> You need find someone else to add their support.  I'm basically following
> the rule book.  Maybe find someone else reading a different rule book.

It's easy to patch mox3' test suite to skip the test for old-style classes if running under Python3. This is sensible since old-style classes have gone in Python3.
Would you accept an ebuild with such a patch? Furthermore one can skip the old test dependencies altogether. Note, it's not for me since I have put mox3 in my local overlay such that I don't need an official ebuild.
Comment 5 Alex Brandt (RETIRED) gentoo-dev 2014-08-04 01:19:31 UTC
Hey Jarausch,

With the integration of mock into python-3 I'm curious why this package would be needed outside of the OpenStack ebuilds.  Would you mind letting me know how you use mox3 to satisfy my curiosity?

If the problem turns out to be skipping the offending tests we'll see what can happen to make that work.  A patch for this would be super useful and I highly encourage you to get it added upstream as that is always more desirable.

More importantly is there another package that requires mox3 and python3 support that we're missing and should focus on fixing everything or should mox3 be replaced with the builtin library mock and eventually removed from the tree?

Let me know what your thoughts are and I'll start looking at what it takes to get mox3 up and up on the python3 track.
Comment 6 Alex Brandt (RETIRED) gentoo-dev 2014-09-13 19:20:08 UTC
I've got mox3 working with python3_3 but for python3_4 there are many more dependencies to add the target to.  Once I have a full list I'll see about updating the tree so we can move this forward.  Pretty sure we'll need this for python3* support in python-*client anyway.
Comment 7 Alex Brandt (RETIRED) gentoo-dev 2014-09-22 20:44:26 UTC
Alright, got a working implementation of mox3 with both python3_3 and python3_4.  I'm merging it to master on my overlay.  Could someone please check it out and verify before I upload the necessities to the tree?
Comment 8 Alex Brandt (RETIRED) gentoo-dev 2014-09-23 20:16:12 UTC
Added a revbump to the tree with python3_3 and python3_4.  Marking this as test-request and feel free to re-open if any problems arise.

If I don't hear anything by October 11, I'll assume this is fixed and mark the bug appropriately.