Path: csiph.com!aioe.org!bofh.it!news.nic.it!robomod From: Mo Zhou Newsgroups: linux.debian.maint.python Subject: Re: Test error in python-cytoolz Date: Thu, 06 Dec 2018 05:40:01 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Thu Dec 6 04:33:08 2018 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.58 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, FOURLA=0.1, GMAIL=1, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_LOW=-0.7] autolearn=unavailable autolearn_force=no X-Policyd-Weight: using cached result; rate: -6.1 X-Riseup-User-ID: 671F0A8335646741E27A262E38E2B8986381C8DCB10FF2C910EACB310A11929B MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="DocE+STaALJfprDB" Content-Disposition: inline X-Mailing-List: archive/latest/16600 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20181206041449.GA27084@Asuna Approved: robomod@news.nic.it Lines: 153 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org, Debian Science List X-Original-Date: Thu, 6 Dec 2018 04:14:50 +0000 X-Original-Message-ID: <20181206041449.GA27084@Asuna> X-Original-References: <20181130132832.ysbve4o6ixp72424@an3as.eu> <20181203130309.uwuljpaslmfbye6y@an3as.eu> Xref: csiph.com linux.debian.maint.python:11155 --DocE+STaALJfprDB Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi Andreas, Here is the patch to make the package build. I didn't fully understand what the test is doing, but the feature that breaks the test is newly introduced by python3.7 hence I see there is no harm to patch it like this. I lost my write permission to DPMT during the DM->DD account transition. Please help me push the attached commit. On Mon, Dec 03, 2018 at 02:03:09PM +0100, Andreas Tille wrote: > Hi again, > > I noticed that this issue is reportet upstream at > > https://github.com/pytoolz/cytoolz/issues/122 > > I'd be happy if somebody familiar with Python 3.7 would find some solution. > > Thanks for any help > > Andreas. > > On Fri, Nov 30, 2018 at 02:28:32PM +0100, Andreas Tille wrote: > > Hi, > > > > Lumin (in CC - thanks a lot for your preparation) has prepared some > > Python packages that are needed to package some NLP tools which I would > > like to maintain. Unfortunately I get a test suite error in > > python-cytoolz[1]: > > > > ... > > ============================= test session starts ============================== > > platform linux -- Python 3.7.1, pytest-3.10.1, py-1.7.0, pluggy-0.8.0 > > rootdir: /build/python-cytoolz-0.9.0.1, inifile: > > collected 190 items > > > > cytoolz/tests/test_compatibility.py .. [ 1%] > > cytoolz/tests/test_curried.py .......... [ 6%] > > cytoolz/tests/test_curried_toolzlike.py ... [ 7%] > > cytoolz/tests/test_dev_skip_test.py .. [ 8%] > > cytoolz/tests/test_dicttoolz.py ........................................ [ 30%] > > ..... [ 32%] > > cytoolz/tests/test_docstrings.py .. [ 33%] > > cytoolz/tests/test_doctests.py . [ 34%] > > cytoolz/tests/test_embedded_sigs.py .. [ 35%] > > cytoolz/tests/test_functoolz.py .................................... [ 54%] > > cytoolz/tests/test_inspect_args.py ..............F.. [ 63%] > > cytoolz/tests/test_itertoolz.py ........................................ [ 84%] > > ......... [ 88%] > > cytoolz/tests/test_none_safe.py .... [ 91%] > > cytoolz/tests/test_recipes.py .. [ 92%] > > cytoolz/tests/test_serialization.py ......... [ 96%] > > cytoolz/tests/test_signatures.py ... [ 98%] > > cytoolz/tests/test_tlz.py . [ 98%] > > cytoolz/tests/test_utils.py .. [100%] > > > > =================================== FAILURES =================================== > > _______________________ test_introspect_builtin_modules ________________________ > > ... > > > raise AssertionError(message + '\n\n'.join(messages)) > > E AssertionError: Missing introspection for the following callables: > > E > > E builtins: > > E breakpoint > > > > cytoolz/tests/test_inspect_args.py:442: AssertionError > > =============================== warnings summary =============================== > > .pybuild/cpython3_3.7_cymem/build/cytoolz/tests/test_embedded_sigs.py::test_class_sigs > > /build/python-cytoolz-0.9.0.1/.pybuild/cpython3_3.7_cymem/build/cytoolz/tests/test_embedded_sigs.py:39: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() > > toolz_spec = inspect.getargspec(toolz_func) > > /build/python-cytoolz-0.9.0.1/.pybuild/cpython3_3.7_cymem/build/cytoolz/tests/test_embedded_sigs.py:49: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly > > ... > > toolz_spec = inspect.getargspec(toolz_func) > > /build/python-cytoolz-0.9.0.1/.pybuild/cpython3_3.7_cymem/build/cytoolz/tests/test_embedded_sigs.py:49: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly > > toolz_sig = toolz_func.__name__ + inspect.formatargspec(*toolz_spec) > > /build/python-cytoolz-0.9.0.1/.pybuild/cpython3_3.7_cymem/build/cytoolz/tests/test_embedded_sigs.py:54: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly > > **{'formatvalue': lambda x: '=' + getattr(x, '__name__', repr(x))} > > > > -- Docs: https://docs.pytest.org/en/latest/warnings.html > > ============== 1 failed, 189 passed, 177 warnings in 2.00 seconds ============== > > E: pybuild pybuild:338: test: plugin distutils failed with: exit code=1: cd /build/python-cytoolz-0.9.0.1/.pybuild/cpython3_3.7_cymem/build; python3.7 -m pytest > > dh_auto_test: pybuild --test --test-pytest -i python{version} -p "3.6 3.7" returned exit code 13 > > > > > > Any idea how to fix this (which is better than just skipping the test which > > would be my only clue)? > > > > Kind regards > > > > Andreas. > > > > > > [1] https://salsa.debian.org/python-team/modules/python-cytoolz > > > > -- > > http://fam-tille.de > > -- > http://fam-tille.de > --DocE+STaALJfprDB Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Fix-python3.7-compatibility.patch" >From 78a6eb1bb9a0bebc400dfbdc258a77311168f572 Mon Sep 17 00:00:00 2001 From: Mo Zhou Date: Thu, 6 Dec 2018 04:12:15 +0000 Subject: [PATCH] Fix python3.7 compatibility. --- debian/patches/py37.patch | 12 ++++++++++++ debian/patches/series | 1 + 2 files changed, 13 insertions(+) create mode 100644 debian/patches/py37.patch create mode 100644 debian/patches/series diff --git a/debian/patches/py37.patch b/debian/patches/py37.patch new file mode 100644 index 0000000..9784cef --- /dev/null +++ b/debian/patches/py37.patch @@ -0,0 +1,12 @@ +Index: python-cytoolz/cytoolz/tests/test_inspect_args.py +=================================================================== +--- python-cytoolz.orig/cytoolz/tests/test_inspect_args.py ++++ python-cytoolz/cytoolz/tests/test_inspect_args.py +@@ -405,6 +405,7 @@ def test_introspect_builtin_modules(): + add_blacklist(builtins, 'NoneType') + add_blacklist(builtins, '__metaclass__') + add_blacklist(builtins, 'sequenceiterator') ++ add_blacklist(builtins, 'breakpoint') + + def is_missing(modname, name, func): + if name.startswith('_') and not name.startswith('__'): diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..1e8b3e9 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +py37.patch -- 2.20.0.rc2 --DocE+STaALJfprDB--