Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 727696 - dev-python/numpy-python2-1.16.6 - TestPickling.test_py3_can_load_py2_pickle_with_dtype_field_names
Summary: dev-python/numpy-python2-1.16.6 - TestPickling.test_py3_can_load_py2_pickle_w...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks: 714384
  Show dependency tree
 
Reported: 2020-06-09 17:05 UTC by ernsteiswuerfel
Modified: 2021-01-30 23:20 UTC (History)
2 users (show)

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


Attachments
emerge --info (file_727696.txt,5.91 KB, text/plain)
2020-06-09 17:05 UTC, ernsteiswuerfel
Details
build.log.xz (numpy-python2-1.16.6:20200609-165133.log.xz,58.21 KB, application/x-xz)
2020-06-09 17:08 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2020-06-09 17:05:13 UTC
Created attachment 644164 [details]
emerge --info

[...]
=============================================== FAILURES ===============================================
___________________ TestPickling.test_py3_can_load_py2_pickle_with_dtype_field_names ___________________

self = <numpy.core.tests.test_multiarray.TestPickling object at 0xf0d495d0>

        def test_py3_can_load_py2_pickle_with_dtype_field_names(self):
            # gh-2407 and PR #14275
            # Roundtrip: Py3 should load a pickle that was created in PY2
            # after loading the saved_pickle (from PY3) in the test named
            # 'test_py2_can_load_py3_pickle_with_dtype_field_names'
            import numpy as np
    
            expected_dtype = np.dtype([('SPOT', np.float64)])
            expected = np.array([(6.0)], dtype=expected_dtype)
            # Pickled under Python 2.7.16 with protocol=2 after it was loaded
            # by test 'test_py2_can_load_py3_pickle_with_dtype_field_names'
            pickle_from_py2 = b'''\
    \x80\x02cnumpy.core.multiarray\n_reconstruct\nq\x01cnumpy\nndarray\n\
    q\x02K\x00\x85U\x01b\x87Rq\x03(K\x01K\x01\x85cnumpy\ndtype\nq\x04U\x02\
    V8K\x00K\x01\x87Rq\x05(K\x03U\x01|NU\x04SPOTq\x06\x85q\x07}q\x08h\x06h\
    \x04U\x02f8K\x00K\x01\x87Rq\t(K\x03U\x01<NNNJ\xff\xff\xff\xffJ\xff\xff\
    \xff\xffK\x00tbK\x00\x86sK\x08K\x01K\x10tb\x89U\x08\x00\x00\x00\x00\x00\
    \x00\x18@tb.\
    '''
    
            if sys.version_info[0] >= 3:  # PY3
                assert pickle.loads(pickle_from_py2) == expected
            else:
                # check that the string above is what we claim on PY2
                if sys.platform.startswith('linux') and not IS_PYPY:
>                   assert pickle.dumps(expected, protocol=2) == pickle_from_py2
E                   AssertionError: assert '\x80\x02cnum...00\x00\x00tb.' == '\x80\x02cnump...0\x00\x18@tb.'
E                       \x80\x02cnumpy.core.multiarray
E                       _reconstruct
E                       q\x01cnumpy
E                       ndarray
E                       q\x02K\x00\x85U\x01b\x87Rq\x03(K\x01K\x01\x85cnumpy
E                       dtype
E                     - q\x04U\x02V8K\x00K\x01\x87Rq\x05(K\x03U\x01|NU\x04SPOTq\x06\x85q\x07}q\x08h\x06h\x04U\x02f8K\x00K\x01\x87Rq\t(K\x03U\x01>NNNJ\xff\xff\xff\xffJ\xff\xff\xff\xffK\x00tbK\x00\x86sK\x08K\x01K\x10tb\x89U\x08@\x18\x00\x00\x00\x00\x00\x00tb....
E                     
E                     ...Full output truncated (4 lines hidden), use '-vv' to show

expected   = array([(6.,)], dtype=[('SPOT', '>f8')])
expected_dtype = dtype([('SPOT', '>f8')])
np         = <module 'numpy' from '/var/tmp/portage/dev-python/numpy-python2-1.16.6/work/numpy-1.16.6-python2_7/test/lib/numpy/__init__.py'>
pickle_from_py2 = '\x80\x02cnumpy.core.multiarray\n_reconstruct\nq\x01cnumpy\nndarray\nq\x02K\x00\x85U\x01b\x87Rq\x03(K\x01K\x01\x85cnum...U\x01<NNNJ\xff\xff\xff\xffJ\xff\xff\xff\xffK\x00tbK\x00\x86sK\x08K\x01K\x10tb\x89U\x08\x00\x00\x00\x00\x00\x00\x18@tb.'
self       = <numpy.core.tests.test_multiarray.TestPickling object at 0xf0d495d0>

../work/numpy-1.16.6-python2_7/test/lib/numpy/core/tests/test_multiarray.py:3942: AssertionError
============= 1 failed, 7305 passed, 173 skipped, 12 xfailed, 3 xpassed in 301.75 seconds ==============
 * ERROR: dev-python/numpy-python2-1.16.6::gentoo failed (test phase):
 *   Tests fail with python2.7
Comment 1 ernsteiswuerfel archtester 2020-06-09 17:08:44 UTC
Created attachment 644166 [details]
build.log.xz
Comment 2 Rolf Eike Beer archtester 2020-06-23 14:40:08 UTC
Same on hppa.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-01-30 23:20:23 UTC
numpy-python2 is being removed.