Bug 1788111

Summary: python-sure fails to build with Python 3.9
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: python-sureAssignee: Miro Hrončok <mhroncok>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, mhroncok, python-sig, slavek.kabrda
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-06 13:20:48 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: 1785415    

Description Miro Hrončok 2020-01-06 13:13:41 UTC
python-sure fails to build with Python 3.9.0a2.


======================================================================
ERROR: this(None).should.be.none
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/sure-1.4.11/tests/test_assertion_builder.py", line 140, in test_should_be_a
    assert this([]).should.be.a('collections.Iterable')
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 385, in wrapper
    value = func(self, *args, **kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 721, in an
    klass = reduce(getattr, items, __import__(first))
AttributeError: module 'collections' has no attribute 'Iterable'

======================================================================
FAIL: issues.test_issue_104.test_issue_104
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 385, in wrapper
    value = func(self, *args, **kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 636, in within
    raise AssertionError((
AssertionError: world.should.be.within(hello world, ) must be called with either a iterable:
world.should.be.within([1, 2, 3, 4])
or with a range of numbers:world.should.be.within(1, 3000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 385, in wrapper
    value = func(self, *args, **kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 888, in contain
    return expect(what).to.be.within(obj)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 387, in wrapper
    raise AssertionError(e)
AssertionError: world.should.be.within(hello world, ) must be called with either a iterable:
world.should.be.within([1, 2, 3, 4])
or with a range of numbers:world.should.be.within(1, 3000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/sure-1.4.11/tests/issues/test_issue_104.py", line 12, in test_issue_104
    expect("hello world").to.contain("world")
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 387, in wrapper
    raise AssertionError(e)
AssertionError: world.should.be.within(hello world, ) must be called with either a iterable:
world.should.be.within([1, 2, 3, 4])
or with a range of numbers:world.should.be.within(1, 3000)

======================================================================
FAIL: expect('some string').to.contain('tri')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 385, in wrapper
    value = func(self, *args, **kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 636, in within
    raise AssertionError((
AssertionError: tri.should.be.within(some string, ) must be called with either a iterable:
tri.should.be.within([1, 2, 3, 4])
or with a range of numbers:tri.should.be.within(1, 3000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 385, in wrapper
    value = func(self, *args, **kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 888, in contain
    return expect(what).to.be.within(obj)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 387, in wrapper
    raise AssertionError(e)
AssertionError: tri.should.be.within(some string, ) must be called with either a iterable:
tri.should.be.within([1, 2, 3, 4])
or with a range of numbers:tri.should.be.within(1, 3000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/sure-1.4.11/tests/test_assertion_builder.py", line 570, in test_match_contain
    assert this("some string").should.contain("tri")
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 387, in wrapper
    raise AssertionError(e)
AssertionError: tri.should.be.within(some string, ) must be called with either a iterable:
tri.should.be.within([1, 2, 3, 4])
or with a range of numbers:tri.should.be.within(1, 3000)

======================================================================
FAIL: do not patch already existing class attributes with same name
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 385, in wrapper
    value = func(self, *args, **kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 636, in within
    raise AssertionError((
AssertionError: when.should.be.within({'__module__': 'test_cpython_patches', 'when': 42, 'shouldnt': 43, 'bar': 'bar', '__dict__': <attribute '__dict__' of 'Foo' objects>, '__weakref__': <attribute '__weakref__' of 'Foo' objects>, '__doc__': None}, ) must be called with either a iterable:
when.should.be.within([1, 2, 3, 4])
or with a range of numbers:when.should.be.within(1, 3000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 385, in wrapper
    value = func(self, *args, **kw)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 888, in contain
    return expect(what).to.be.within(obj)
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 387, in wrapper
    raise AssertionError(e)
AssertionError: when.should.be.within({'__module__': 'test_cpython_patches', 'when': 42, 'shouldnt': 43, 'bar': 'bar', '__dict__': <attribute '__dict__' of 'Foo' objects>, '__weakref__': <attribute '__weakref__' of 'Foo' objects>, '__doc__': None}, ) must be called with either a iterable:
when.should.be.within([1, 2, 3, 4])
or with a range of numbers:when.should.be.within(1, 3000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILD/sure-1.4.11/tests/test_cpython_patches.py", line 45, in test_shouldnt_overwrite_class_attributes
    Foo.__dict__.should.contain('when')
  File "/builddir/build/BUILD/sure-1.4.11/sure/__init__.py", line 387, in wrapper
    raise AssertionError(e)
AssertionError: when.should.be.within({'__module__': 'test_cpython_patches', 'when': 42, 'shouldnt': 43, 'bar': 'bar', '__dict__': <attribute '__dict__' of 'Foo' objects>, '__weakref__': <attribute '__weakref__' of 'Foo' objects>, '__doc__': None}, ) must be called with either a iterable:
when.should.be.within([1, 2, 3, 4])
or with a range of numbers:when.should.be.within(1, 3000)

======================================================================
FAIL: that() has(object)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/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 153, in test_that_has
    assert that(name).has("john")
  File "/builddir/build/BUILD/sure-1.4.11/sure/old.py", line 75, in wrap
    assert ret, msg % (self._src, what)
AssertionError: 'john' should have 'john', but have not

----------------------------------------------------------------------
Ran 142 tests in 0.847s

FAILED (errors=1, failures=4)

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

For all our attempts to build python-sure with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/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.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33, but the initial bootstrapping has already started.
A build failure this early in the bootstrap sequence blocks us very much.