Bug 2059963 - python-parameterized fails to build with pytest 7
Summary: python-parameterized fails to build with pytest 7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-parameterized
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2092233 (view as bug list)
Depends On:
Blocks: PYTHON3.11 F37FTBFS PYTEST7
TreeView+ depends on / blocked
 
Reported: 2022-03-02 12:09 UTC by Miro Hrončok
Modified: 2022-06-09 10:32 UTC (History)
3 users (show)

Fixed In Version: python-parameterized-0.8.1-1.fc37
Clone Of:
Environment:
Last Closed: 2022-06-09 10:32:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github wolever parameterized issues 122 0 None open 0.8.1: pytest based test suite is failing 2022-03-10 17:32:44 UTC
Github wolever parameterized issues 34 0 None open Pytest 'yield tests are deprecated, and scheduled to be removed in pytest 4.0' 2022-03-10 17:31:10 UTC

Description Miro Hrončok 2022-03-02 12:09:38 UTC
In this copr repo, I have updated pytest to 7.0.1:

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/

Based on this PR:

https://src.fedoraproject.org/rpms/pytest/pull-request/25

I'd like to update pytest to 7 in Fedora 37, but python-parameterized 0.7.4-5 fails to build.

https://copr.fedorainfracloud.org/coprs/churchyard/pytest-7/package/python-parameterized/


___ ERROR at teardown of TestParameterizedClassDict_2_some_name.test_method ____

    def tearDownModule():
        missing = sorted(list(missing_tests))
>       assert_equal(missing, [])
E       AssertionError: Lists differ: ["test_instance_method('foo0', bar=None)",[461 chars]o')"] != []
E       
E       First list contains 12 additional elements.
E       First extra element 0:
E       "test_instance_method('foo0', bar=None)"
E       
E       + []
E       - ["test_instance_method('foo0', bar=None)",
E       -  "test_instance_method('foo1', bar=None)",
E       -  "test_instance_method('foo2', bar=42)",
E       -  'test_instance_method(42, bar=None)',
E       -  "test_mock_patch_standalone_function(42, 'umask')",
E       -  "test_naked_function('foo0', bar=None)",
E       -  "test_naked_function('foo1', bar=None)",
E       -  "test_naked_function('foo2', bar=42)",
E       -  'test_naked_function(42, bar=None)',
E       -  "test_patch_class_no_expand(42, 51, 'umask', 'getpid')",
E       -  "test_patch_no_expand(42, 51, 'umask')",
E       -  "test_wrapped_iterable_input('foo')"]

parameterized/test.py:371: AssertionError

See also https://github.com/wolever/parameterized/issues/34

There are several packages affected by this update, so I'd very much appreciate it if you could fix this failure. Please, check if your upstream hasn't already fixed it and backport the fix if possible. Report this failure to your upstream otherwise. If you need specific help, let me know.

Thanks!

Comment 1 Ben Beasley 2022-03-10 17:31:10 UTC
Based on the linked upstream bug, support for pytest 4 is still “coming,” and the last commit was about a year ago. A commenter points out that comparable functionality is in pytest 6 and later[1].

It looks like roughly the following packages still depend on this one:

- dist-git
- gtk-doc
- m2crypto
- matrix-synapse
- pungi
- python-aws-sam-translator
- python-azure-keyvault-keys
- python-dateparser
- python-moreorless
- python-theano

I wonder if the easier route would be to patch the python-parameterized dependency out of those packages.

[1] https://github.com/wolever/parameterized/issues/34#issuecomment-891900315

Comment 2 Ben Beasley 2022-03-10 17:32:44 UTC
Upstream issue #122 seem to show exactly this error.

https://github.com/wolever/parameterized/issues/122

Comment 3 Miro Hrončok 2022-06-08 11:49:09 UTC
*** Bug 2092233 has been marked as a duplicate of this bug. ***

Comment 4 Miro Hrončok 2022-06-08 11:53:30 UTC
Ok, this now blocks the Python 3.11 rebuild: parameterized -> pungi -> bodhi -> fedpkg.

Updating to 0.8.1 indeed does not fix this and only changes the test name that fails, as reported in https://github.com/wolever/parameterized/issues/122

As an absolute workaround, we might skip that one test. Ideally, we would get rid of the dependency in the long term.

Comment 5 Miro Hrončok 2022-06-08 12:01:54 UTC
Interestingly, when deselecting the test, the previous test errors instead.

Comment 6 Miro Hrončok 2022-06-08 12:02:27 UTC
Apparently, it's always the last one.

Comment 7 Miro Hrončok 2022-06-08 12:25:54 UTC
That actually makes perfect sense, considering this is in tearDownModule :), sorry for the noise.

Comment 9 Fedora Update System 2022-06-09 10:17:28 UTC
FEDORA-2022-b320e0a5aa has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b320e0a5aa

Comment 10 Fedora Update System 2022-06-09 10:32:46 UTC
FEDORA-2022-b320e0a5aa has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.