Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1944109

Summary: python-TestSlide fails to build with Python 3.10: AssertionError: TypeCheckError not raised
Product: [Fedora] Fedora Reporter: Tomáš Hrnčiar <thrnciar>
Component: python-TestSlideAssignee: Davide Cavalca <dcavalca>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dcavalca, filbranden, mhroncok, michel, thrnciar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.6.4-4.fc35 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-15 22:33:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1890881    

Description Tomáš Hrnčiar 2021-03-29 10:05:29 UTC
python-TestSlide fails to build with Python 3.10.0a6.

Failures:

  1) patch_attribute(), when target is a StrictMock, with a template, type validation: it fails if new value is of incompatible type
    1) AssertionError: TypeCheckError not raised
      File "testslide/runner.py", line 639, in run
        self._run_example(example)
      File "testslide/runner.py", line 623, in _run_example
        _ExampleRunner(example, self.formatter).run()
      File "testslide/__init__.py", line 540, in run
        self._sync_run_all_hooks_and_example(context_data)
      File "testslide/__init__.py", line 512, in _sync_run_all_hooks_and_example
        aggregated_exceptions.raise_correct_exception()
      File "testslide/__init__.py", line 289, in raise_correct_exception
        raise self.exceptions[0]
      File "testslide/__init__.py", line 273, in catch
        yield
      File "testslide/__init__.py", line 503, in _sync_run_all_hooks_and_example
        self._fail_if_coroutine_function(self.example.code, context_data)
      File "testslide/__init__.py", line 471, in _fail_if_coroutine_function
        return func(*args, **kwargs)
      File "tests/patch_attribute_testslide.py", line 119, in it_fails_if_new_value_is_of_incompatible_type
        self.patch_attribute(self.target, "typedattr", 123)
      File "/usr/lib64/python3.10/unittest/case.py", line 226, in __exit__
        self._raiseFailure("{} not raised".format(exc_name))
      File "/usr/lib64/python3.10/unittest/case.py", line 163, in _raiseFailure
        raise self.test_case.failureException(msg)

Finished 46 example(s) in 1.0s 
  Successful:  45
  Failed:  1
  Not executed:  4
make: *** [Makefile:73: tests/patch_attribute_testslide.py] Error 1

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/02103597-python-TestSlide/

For all our attempts to build python-TestSlide with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/python-TestSlide/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Davide Cavalca 2021-03-30 17:20:28 UTC
Filed https://github.com/facebook/TestSlide/issues/296 for upstream

Comment 2 Davide Cavalca 2021-04-15 22:33:11 UTC
This should be fixed in python-TestSlide-2.6.4-4.fc35