[Debian-med-packaging] Bug#933527: snakemake: fails to install: SyntaxError: duplicate argument 'stay_on_remote' in function definition

Andreas Tille andreas at an3as.eu
Mon Sep 2 09:09:22 BST 2019


Hi,

On Wed, Jul 31, 2019 at 10:37:22AM +0200, Andreas Beckmann wrote:
> Version: 5.5.3-1
> Severity: serious
> 
> during a test with piuparts I noticed your package failed to install. As
> per definition of the release team this makes the package too buggy for
> a release, thus the severity.
> 
> >From the attached log (scroll to the bottom...):
> 
>   Setting up snakemake (5.5.3-1) ...
>     File "/usr/lib/python3/dist-packages/snakemake/remote/gfal.py", line 29
>       def __init__(self, *args, keep_local=False, stay_on_remote=False, is_default=False, stay_on_remote=False, retry=5, **kwargs):
>       ^
>   SyntaxError: duplicate argument 'stay_on_remote' in function definition
>   

I can confirm this issue.  Michael has commited a fix together with the
new version.  I've commited some more changes but the current state in
Git does not pass build time tests:

...
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

path = '/build/snakemake-5.5.4/tests/test_issue328', shouldfail = False
snakefile = '/build/snakemake-5.5.4/tests/test_issue328/Snakefile'
subpath = None, no_tmpdir = False, check_md5 = True, cores = 3
params = {'forcerun': ['split']}
results_dir = '/build/snakemake-5.5.4/tests/test_issue328/expected-results'
@py_assert1 = None, @py_assert3 = None, @py_assert6 = None

    def run(path,
            shouldfail=False,
            snakefile="Snakefile",
            subpath=None,
            no_tmpdir=False,
            check_md5=True, cores=3, **params):
        """
        Test the Snakefile in path.
        There must be a Snakefile in the path and a subdirectory named
        expected-results.
        """
        results_dir = join(path, 'expected-results')
        snakefile = join(path, snakefile)
        assert os.path.exists(snakefile)
        assert os.path.exists(results_dir) and os.path.isdir(
            results_dir), '{} does not exist'.format(results_dir)
        with tempfile.TemporaryDirectory(prefix="snakemake-") as tmpdir:
            config = {}
            # handle subworkflow
            if subpath is not None:
                # set up a working directory for the subworkflow and pass it in `config`
                # for now, only one subworkflow is supported
                assert os.path.exists(subpath) and os.path.isdir(
                    subpath), '{} does not exist'.format(subpath)
                subworkdir = os.path.join(tmpdir, "subworkdir")
                os.mkdir(subworkdir)
                # copy files
                for f in os.listdir(subpath):
                    copy(os.path.join(subpath, f), subworkdir)
                config['subworkdir'] = subworkdir
    
            # copy files
            for f in os.listdir(path):
                print(f)
                copy(os.path.join(path, f), tmpdir)
    
            # run snakemake
            success = snakemake(snakefile,
                                cores=cores,
                                workdir=path if no_tmpdir else tmpdir,
                                stats="stats.txt",
                                config=config, **params)
            if shouldfail:
                assert not success, "expected error on execution"
            else:
>               assert success, "expected successful execution"
E               AssertionError: expected successful execution
E               assert False

tests/tests.py:124: AssertionError
----------------------------- Captured stdout call -----------------------------
in.txt
expected-results
Snakefile
----------------------------- Captured stderr call -----------------------------
PermissionError in line 4 of /build/snakemake-5.5.4/tests/test_issue328/Snakefile:
[Errno 13] Permission denied: '/nonexistent'
  File "/build/snakemake-5.5.4/tests/test_issue328/Snakefile", line 4, in <module>
  File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 699, in __init__
  File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 441, in __init__
  File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 486, in _make_container_dir
  File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 77, in _make_dir_recursively
  File "/usr/lib/python3.7/os.py", line 211, in makedirs
  File "/usr/lib/python3.7/os.py", line 211, in makedirs
  File "/usr/lib/python3.7/os.py", line 211, in makedirs
  File "/usr/lib/python3.7/os.py", line 221, in makedirs
------------------------------ Captured log call -------------------------------
ERROR    snakemake.logging:logging.py:307 PermissionError in line 4 of /build/snakemake-5.5.4/tests/test_issue328/Snakefile:
                                          [Errno 13] Permission denied: '/nonexistent'
                                            File "/build/snakemake-5.5.4/tests/test_issue328/Snakefile", line 4, in <module>
                                            File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 699, in __init__
                                            File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 441, in __init__
                                            File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 486, in _make_container_dir
                                            File "/usr/lib/python3/dist-packages/pytools/persistent_dict.py", line 77, in _make_dir_recursively
                                            File "/usr/lib/python3.7/os.py", line 211, in makedirs
                                            File "/usr/lib/python3.7/os.py", line 211, in makedirs
                                            File "/usr/lib/python3.7/os.py", line 211, in makedirs
                                            File "/usr/lib/python3.7/os.py", line 221, in makedirs
=============================== warnings summary ===============================
/usr/lib/python3/dist-packages/pandas/core/dtypes/inference.py:6
  /usr/lib/python3/dist-packages/pandas/core/dtypes/inference.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import Iterable

/usr/lib/python3/dist-packages/pandas/core/tools/datetimes.py:3
  /usr/lib/python3/dist-packages/pandas/core/tools/datetimes.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import MutableMapping

tests/test_schema.py::test_config
  /usr/lib/python3/dist-packages/jsonschema/compat.py:6: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    from collections import MutableMapping, Sequence  # noqa

tests/test_schema.py::test_dataframe
  /usr/lib/python3/dist-packages/pandas/core/frame.py:7476: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
    elif isinstance(data[0], collections.Mapping):

-- Docs: https://docs.pytest.org/en/latest/warnings.html
= 2 failed, 112 passed, 18 skipped, 9 deselected, 4 warnings in 578.49 seconds =
E: pybuild pybuild:341: test: plugin custom failed with: exit code=1: python3.7 -m pytest tests/test*.py -v -k 'not report and not ancient and not test_script and not default_remote and not issue635 and not con


Any volunteer to check this?

Kind regards

        Andreas.

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list