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 1889730 - python-sure fails to build with Python 3.10: unexpected exception message
Summary: python-sure fails to build with Python 3.10: unexpected exception message
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: python-sure
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-10-20 13:18 UTC by Tomáš Hrnčiar
Modified: 2020-10-23 11:25 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-23 11:18:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github gabrielfalcao sure issues 169 0 None open Python 3.10.0a1: FAIL: sure.that_with_context() when no context is given it fails 2020-10-20 13:30:38 UTC

Description Tomáš Hrnčiar 2020-10-20 13:18:04 UTC
python-sure fails to build with Python 3.10.0a1.

This report is automated and not very verbose, but we'll try to get back here with details.

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

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

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.

Currently we do not know what is the reason of failure.

======================================================================
FAIL: sure.that_with_context() when no context is given it fails
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/sure-1.4.11/sure/old.py", line 126, in raises
    self._src(*self._callable_args, **self._callable_kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 152, in wrap
    res = test.apply(context)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 117, in apply
    return self.callback(*args, **self.kwargs)
TypeError: test_context_is_not_optional.<locals>.it_crashes() takes 0 positional arguments but 1 was given

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/sure-1.4.11/tests/test_old_api.py", line 59, in test_context_is_not_optional
    assert that(it_crashes).raises(
  File "/builddir/build/BUILD/sure-1.4.11/sure/old.py", line 145, in raises
    raise AssertionError('''
AssertionError: <function test_context_is_not_optional.<locals>.it_crashes at 0x7efdf7066430> raised TypeError, but the exception message does not
                    match.

EXPECTED:
the function it_crashes defined at test_old_api.py line 56, is being decorated by either @that_with_context or @scenario, so it should take at least 1 parameter, which is the test context

GOT:
test_context_is_not_optional.<locals>.it_crashes() takes 0 positional arguments but 1 was given

----------------------------------------------------------------------
Ran 142 tests in 0.846s

FAILED (failures=1)

Comment 1 Miro Hrončok 2020-10-20 13:30:38 UTC
Reported upstream: https://github.com/gabrielfalcao/sure/issues/169

Comment 2 Miro Hrončok 2020-10-23 09:04:05 UTC
A downstream workaround: https://src.fedoraproject.org/rpms/python-sure/pull-request/1

Since I only maintain sure to be able to build/test python-freezegun and python-httpretty, I think this is fine.

Could you please test if that works in copr and if so, feel free to merge.

Comment 3 Tomáš Hrnčiar 2020-10-23 11:25:40 UTC
Builds all right in Copr, thank you.

https://copr.fedorainfracloud.org/coprs/g/python/python3.10/build/1718135/


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