Bug 1831182

Summary: ipython fails to build with Python 3.9: test_getdoc and test_memoryerror fail
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: ipythonAssignee: Lumír Balhar <lbalhar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, dcantrell, lbalhar, mhroncok, michel, mplch, mrunge, orion, python-sig, tomspur
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-05-05 15:36:16 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-05-04 18:01:58 UTC
ipython fails to build with Python 3.9.0a6:


======================================================================
FAIL: IPython.core.tests.test_oinspect.test_getdoc
----------------------------------------------------------------------
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/BUILDROOT/ipython-7.14.0-1.fc33.x86_64/usr/lib/python3.9/site-packages/IPython/core/tests/test_oinspect.py", line 256, in test_getdoc
    nt.assert_equal(oinspect.getdoc(a), "standard docstring")
AssertionError: None != 'standard docstring'
    "None != 'standard docstring'" = '%s != %s' % _common_shorten_repr(None, 'standard docstring')
    "None != 'standard docstring'" = self._formatMessage("None != 'standard docstring'", "None != 'standard docstring'")
>>  raise self.failureException("None != 'standard docstring'")
    

======================================================================
FAIL: test_memoryerror (IPython.core.tests.test_ultratb.MemoryErrorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILDROOT/ipython-7.14.0-1.fc33.x86_64/usr/lib/python3.9/site-packages/IPython/core/tests/test_ultratb.py", line 260, in test_memoryerror
    ip.run_cell(memoryerror_code)
  File "/builddir/build/BUILDROOT/ipython-7.14.0-1.fc33.x86_64/usr/lib/python3.9/site-packages/IPython/testing/tools.py", line 376, in __exit__
    assert s in printed, notprinted_msg.format(s, self.channel, printed)
AssertionError: Did not find 'MemoryError' in printed output (on stdout):
-------
Out[1]: ()

-------

>>  assert 'MemoryError' in 'Out[1]: ()\n', 'Did not find {0!r} in printed output (on {1}):\n-------\n{2!s}\n-------\n'.format('MemoryError', <IPython.testing.tools.AssertPrints object at 0x7fcde25cfa60>.channel, 'Out[1]: ()\n')
    


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

For all our attempts to build ipython with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/ipython/

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. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
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 Miro Hrončok 2020-05-04 18:21:40 UTC
ipython is early in the bootstrap sequence, raising severity.

Comment 2 Lumír Balhar 2020-05-05 14:04:10 UTC
The "problem" in test_memory_error is that this code `eval("(" * 200 + ")" * 200)` raises MemoryError in Python 3.9.0a5 but not in 3.9.0a6. https://github.com/ipython/ipython/issues/12286

Comment 3 Lumír Balhar 2020-05-05 14:32:42 UTC
The second problem is a recent change in the `inspect` module (https://bugs.python.org/issue40257): https://github.com/ipython/ipython/issues/12287

Comment 4 Lumír Balhar 2020-05-05 14:53:29 UTC
The incompatible tests have been removed from the RPM package and the latest build succeeded.

Comment 5 Miro Hrončok 2020-05-05 15:36:16 UTC
Thanks.