ipython fails to build with Python 3.10.0a2. FAIL: IPython.core.tests.test_oinspect.test_render_signature_long ---------------------------------------------------------------------- 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/BUILDROOT/ipython-7.19.0-1.fc34.x86_64/usr/lib/python3.10/site-packages/IPython/core/tests/test_oinspect.py", line 423, in test_render_signature_long nt.assert_in(sig, [ AssertionError: "long_function(\n a_really_long_parameter: 'int',\n and_another_long_one: 'bool' = False,\n let_us_make_sure_this_is_looong: 'Optional[str]' = None,\n) -> 'bool'" not found in ['long_function(\n a_really_long_parameter: int,\n and_another_long_one: bool = False,\n let_us_make_sure_this_is_looong: Optional[str] = None,\n) -> bool', 'long_function(\n a_really_long_parameter: int,\n and_another_long_one: bool = False,\n let_us_make_sure_this_is_looong: Union[str, NoneType] = None,\n) -> bool', 'long_function(\n a_really_long_parameter:int,\n and_another_long_one:bool=False,\n let_us_make_sure_this_is_looong:Union[str, NoneType]=None,\n) -> bool'] """Fail immediately, with the given message.""" >> raise self.failureException('"long_function(\\n a_really_long_parameter: \'int\',\\n and_another_long_one: \'bool\' = False,\\n let_us_make_sure_this_is_looong: \'Optional[str]\' = None,\\n) -> \'bool\'" not found in [\'long_function(\\n a_really_long_parameter: int,\\n and_another_long_one: bool = False,\\n let_us_make_sure_this_is_looong: Optional[str] = None,\\n) -> bool\', \'long_function(\\n a_really_long_parameter: int,\\n and_another_long_one: bool = False,\\n let_us_make_sure_this_is_looong: Union[str, NoneType] = None,\\n) -> bool\', \'long_function(\\n a_really_long_parameter:int,\\n and_another_long_one:bool=False,\\n let_us_make_sure_this_is_looong:Union[str, NoneType]=None,\\n) -> bool\']') For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01787067-ipython/ For all our attempts to build ipython with Python 3.10, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.10/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.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.
Python 3.10a2: >>> from IPython.core import oinspect >>> from inspect import signature >>> >>> def long_function( ... a_really_long_parameter: int, ... and_another_long_one: bool = False, ... let_us_make_sure_this_is_looong: Optional[str] = None, ... ) -> bool: pass ... >>> print(oinspect._render_signature(signature(long_function), long_function.__name__)) long_function( a_really_long_parameter: 'int', and_another_long_one: 'bool' = False, let_us_make_sure_this_is_looong: 'Optional[str]' = None, ) -> 'bool' but Python 3.10a3 (from master branch compiled locally today): >>> from IPython.core import oinspect >>> from typing import Optional >>> from inspect import signature >>> def long_function( ... a_really_long_parameter: int, ... and_another_long_one: bool = False, ... let_us_make_sure_this_is_looong: Optional[str] = None, ... ) -> bool: pass ... >>> print(oinspect._render_signature(signature(long_function), long_function.__name__)) long_function( a_really_long_parameter: int, and_another_long_one: bool = False, let_us_make_sure_this_is_looong: Optional[str] = None, ) -> bool See the '' around type annotations. The latter one looks like the testing option for Python 3.9 and higher so it should pass. Could you please try it one more time when the latest release will be in COPR?
https://src.fedoraproject.org/rpms/ipython/pull-request/17
FEDORA-2021-9aeb216830 has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2021-467d41a8f8 has been pushed to the Fedora ELN stable repository. If problem still persists, please make note of it in this bug report.