Source: ncbi-acc-download
Version: 0.2.8-1
Severity: serious
Tags: sid bookworm
User: debian...@lists.debian.org
Usertags: needs-update
User: debian-pyt...@lists.debian.org
Usertags: python3.11
Control: affects -1 src:python3-defaults

Dear maintainer(s),

We are in the transition of adding python3.11 as a supported Python version [0]. With a recent upload of python3-defaults the autopkgtest of ncbi-acc-download fails in testing when that autopkgtest is run with the binary packages of python3-defaults from unstable. It passes when run with only packages from testing. In tabular form:

                       pass            fail
python3-defaults       from testing    3.10.6-3
ncbi-acc-download      from testing    0.2.8-1
all others             from testing    from testing

I copied some of the output at the bottom of this report.

Currently this regression is blocking the migration of python3-defaults to testing [1]. https://docs.python.org/3/whatsnew/3.11.html lists what's new in Python3.11, it may help to identify what needs to be updated.

More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation

Paul

[0] https://bugs.debian.org/1021984
[1] https://qa.debian.org/excuses.php?package=python3-defaults

https://ci.debian.net/data/autopkgtest/testing/amd64/n/ncbi-acc-download/28727754/log.gz

=================================== FAILURES =================================== __________________________ test_config_have_biopython __________________________

    def test_config_have_biopython():
        """Test we detect Biopython."""
      assert core.HAVE_BIOPYTHON
E       assert False
E        +  where False = core.HAVE_BIOPYTHON

test_core.py:46: AssertionError
_________________ test_validate_and_write_extended_validation __________________

req = <requests_mock.mocker.Mocker object at 0x7f09f58de410>

    def test_validate_and_write_extended_validation(req):
        """Test extended validation before writing."""
        handle = StringIO()
        req.get('http://fake/', text=u'>foo\nMAGIC')
        r = requests.get('http://fake/')
      config = core.Config(extended_validation='loads', molecule='protein')

test_core.py:226: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3/dist-packages/ncbi_acc_download/core.py:64: in __init__
    self.extended_validation = extended_validation
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <ncbi_acc_download.core.Config object at 0x7f09f5d73ec0>, value = 'loads'

    @extended_validation.setter
    def extended_validation(self, value):
        if value != 'none' and not HAVE_BIOPYTHON:
          raise ValueError("Asked for extended validation, but Biopython not 
available")
E ValueError: Asked for extended validation, but Biopython not available

/usr/lib/python3/dist-packages/ncbi_acc_download/core.py:96: ValueError
____________________ test_download_and_validate_partial_wgs ____________________

req = <requests_mock.mocker.Mocker object at 0x7f09f5933610>

    def test_download_and_validate_partial_wgs(req):
        handle = StringIO(open(full_path('partialcontig.gbk'), 'r').read())
      assert validate.run_extended_validation(handle, 'genbank', 'loads')
E       AssertionError: assert False
E + where False = <function run_extended_validation at 0x7f09f5882c00>(<_io.StringIO object at 0x7f09f5a3e710>, 'genbank', 'loads') E + where <function run_extended_validation at 0x7f09f5882c00> = validate.run_extended_validation

test_correct.py:15: AssertionError
_____________________ test_run_extended_validation_raises ______________________

monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f09f5767850>
mocker = <pytest_mock.plugin.MockerFixture object at 0x7f09f5767910>

    def test_run_extended_validation_raises(monkeypatch, mocker):
"""Test the "seqence loads" validator catches exceptions in SeqIO.parse()."""
        seqio_mock = mocker.MagicMock()
        seqio_mock.parse = mocker.MagicMock(side_effect=ValueError)
      monkeypatch.setattr(validate, 'SeqIO', seqio_mock)
E AttributeError: <module 'ncbi_acc_download.validate' from '/usr/lib/python3/dist-packages/ncbi_acc_download/validate.py'> has no attribute 'SeqIO'

test_validate.py:19: AttributeError
______________________ test_run_extended_validation_loads ______________________

    def test_run_extended_validation_loads():
        """Test the "sequence loads" validator."""
        handle = StringIO(u'>foo\nATGC\n>bar\nATGTGA\n')
      assert validate.run_extended_validation(handle, 'fasta', 'loads')
E       AssertionError: assert False
E + where False = <function run_extended_validation at 0x7f09f5882c00>(<_io.StringIO object at 0x7f09f5a3ecb0>, 'fasta', 'loads') E + where <function run_extended_validation at 0x7f09f5882c00> = validate.run_extended_validation

test_validate.py:29: AssertionError
_________________________ test_download_wgs_parts_wgs __________________________

req = <requests_mock.mocker.Mocker object at 0x7f09f5761990>

    def test_download_wgs_parts_wgs(req):
        cfg = Config(format="genbank")
        wgs_contig = open(full_path('wgs.gbk'), 'rt')
        req.get(ENTREZ_URL, body=open(full_path('wgs_full.gbk'), 'rt'))
            outhandle = wgs.download_wgs_parts(wgs_contig, cfg)
        wgs_full = open(full_path('wgs_full.gbk'), 'rt')
      assert outhandle.getvalue() == wgs_full.read()
E AttributeError: '_io.TextIOWrapper' object has no attribute 'getvalue'

test_wgs.py:91: AttributeError
______________________ test_download_wgs_parts_wgs_retry _______________________

req = <requests_mock.mocker.Mocker object at 0x7f09f58fee90>

    def test_download_wgs_parts_wgs_retry(req):
        cfg = Config(format="genbank")
        wgs_contig = open(full_path('wgs.gbk'), 'rt')
        req.get(ENTREZ_URL, response_list=[
{"text": u'Whoa, slow down', "status_code": 429, "headers": {"Retry-After": "0"}},
            {"body": open(full_path('wgs_full.gbk'), 'rt')},
        ])
            outhandle = wgs.download_wgs_parts(wgs_contig, cfg)
        wgs_full = open(full_path('wgs_full.gbk'), 'rt')
      assert outhandle.getvalue() == wgs_full.read()
E AttributeError: '_io.TextIOWrapper' object has no attribute 'getvalue'

test_wgs.py:106: AttributeError
______________________ test_download_wgs_parts_wgs_scafld ______________________

req = <requests_mock.mocker.Mocker object at 0x7f09f58aad10>

    def test_download_wgs_parts_wgs_scafld(req):
        cfg = Config(format="genbank")
        wgs_contig = open(full_path('wgs_scafld.gbk'), 'rt')
        with open(full_path('wgs_full.gbk'), 'rt') as handle:
            full_file = handle.read()
        req.get(ENTREZ_URL, text=full_file)
            outhandle = wgs.download_wgs_parts(wgs_contig, cfg)
      assert outhandle.getvalue() == full_file
E AttributeError: '_io.TextIOWrapper' object has no attribute 'getvalue'

test_wgs.py:119: AttributeError
_____________________ test_download_wgs_parts_supercontig ______________________

req = <requests_mock.mocker.Mocker object at 0x7f09f58f1990>

    def test_download_wgs_parts_supercontig(req):
        cfg = Config(format="genbank")
        supercontig = open(full_path('supercontig.gbk'), 'rt')
req.get(ENTREZ_URL, body=open(full_path('supercontig_full.gbk'), 'rt'))
            outhandle = wgs.download_wgs_parts(supercontig, cfg)
        supercontig_full = open(full_path('supercontig_full.gbk'), 'rt')
      assert outhandle.getvalue() == supercontig_full.read()
E AttributeError: '_io.TextIOWrapper' object has no attribute 'getvalue'

test_wgs.py:130: AttributeError
__________________ test_download_wgs_parts_supercontig_retry ___________________

req = <requests_mock.mocker.Mocker object at 0x7f09f5933110>

    def test_download_wgs_parts_supercontig_retry(req):
        cfg = Config(format="genbank")
        supercontig = open(full_path('supercontig.gbk'), 'rt')
        req.get(ENTREZ_URL, response_list=[
{"text": u'Whoa, slow down', "status_code": 429, "headers": {"Retry-After": "0"}},
            {"body": open(full_path('supercontig_full.gbk'), 'rt')}
        ])
            outhandle = wgs.download_wgs_parts(supercontig, cfg)
        supercontig_full = open(full_path('supercontig_full.gbk'), 'rt')
      assert outhandle.getvalue() == supercontig_full.read()
E AttributeError: '_io.TextIOWrapper' object has no attribute 'getvalue'

test_wgs.py:145: AttributeError
__________________________ test_download_wgs_no_parts __________________________

req = <requests_mock.mocker.Mocker object at 0x7f09f58791d0>

    def test_download_wgs_no_parts(req):
        cfg = Config(format="genbank")
        supercontig = open(full_path('supercontig_full.gbk'), 'rt')
        req.get(ENTREZ_URL, status_code=404)
            outhandle = wgs.download_wgs_parts(supercontig, cfg)
        supercontig_full = open(full_path('supercontig_full.gbk'), 'rt')
      assert outhandle.getvalue() == supercontig_full.read()
E AttributeError: '_io.TextIOWrapper' object has no attribute 'getvalue'

test_wgs.py:157: AttributeError
=========================== short test summary info ============================
FAILED test_core.py::test_config_have_biopython - assert False
FAILED test_core.py::test_validate_and_write_extended_validation - ValueError... FAILED test_correct.py::test_download_and_validate_partial_wgs - AssertionErr... FAILED test_validate.py::test_run_extended_validation_raises - AttributeError... FAILED test_validate.py::test_run_extended_validation_loads - AssertionError:... FAILED test_wgs.py::test_download_wgs_parts_wgs - AttributeError: '_io.TextIO... FAILED test_wgs.py::test_download_wgs_parts_wgs_retry - AttributeError: '_io.... FAILED test_wgs.py::test_download_wgs_parts_wgs_scafld - AttributeError: '_io... FAILED test_wgs.py::test_download_wgs_parts_supercontig - AttributeError: '_i... FAILED test_wgs.py::test_download_wgs_parts_supercontig_retry - AttributeErro... FAILED test_wgs.py::test_download_wgs_no_parts - AttributeError: '_io.TextIOW... =================== 11 failed, 20 passed, 1 xfailed in 0.15s ===================
autopkgtest [20:14:21]: test run-param-test

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to