Bug 1834187 - python-rope fails to build with Python 3.9: uses removed threading.Thread.isAlive()
Summary: python-rope fails to build with Python 3.9: uses removed threading.Thread.isA...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-rope
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mukundan Ragavan
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1842147 (view as bug list)
Depends On:
Blocks: PYTHON39 F33FTBFS 1841727
TreeView+ depends on / blocked
 
Reported: 2020-05-11 09:29 UTC by Miro Hrončok
Modified: 2020-06-04 23:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-04 23:43:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
py3.9 fix patch (9.84 KB, patch)
2020-06-02 23:54 UTC, Charalampos Stratakis
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github python-rope rope issues 299 0 None open advanced_oi_test.py fails with python 3.9 2020-06-04 00:17:21 UTC

Description Miro Hrončok 2020-05-11 09:29:50 UTC
python-rope fails to build with Python 3.9.0a6.

____________ DocstringParamHintingTest.test_hierarchical_hint_param ____________

self = <ropetest.type_hinting_test.DocstringParamHintingTest testMethod=test_hierarchical_hint_param>

    def test_hierarchical_hint_param(self):
        code = 'class ISample(object):\n' \
               '    def a_method(self, a_arg):\n' \
               '        """:type a_arg: threading.Thread"""\n' \
               '\n\n' \
               'class Sample(ISample):\n' \
               '    def a_method(self, a_arg):\n' \
               '        a_arg.isA'
        result = self._assist(code)
>       self.assert_completion_in_result('isAlive', 'attribute', result)

ropetest/type_hinting_test.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
ropetest/type_hinting_test.py:31: in assert_completion_in_result
    self.fail('completion <%s> in scope %r not proposed, available names: %r' % (
E   AssertionError: completion <isAlive> in scope 'attribute' not proposed, available names: []
...


See https://docs.python.org/3.9/whatsnew/3.9.html#removed

"The isAlive() method of threading.Thread has been removed. It was deprecated since Python 3.8. Use is_alive() instead."



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

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

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-25 13:01:05 UTC
This comment is mass posted to all bugs blocking the Python 3.9 tracker, sorry if it is not 100 % relevant. When in doubt, please ask.


The Python 3.9 rebuild is in progress in a Koji side tag.

If you fix this bug, please don't rebuild the package in regular rawhide, but do it in the side tag with:

    $ fedpkg build --target=f33-python

The rebuild is progressing slowly and it is possible this package won't have all the required build dependencies yet. If that's the case, please just leave the fix committed and pushed and we will eventually rebuild it for you.

You are not asked to go and try rebuild all the missing dependencies yourself. If you know there is a bootstrap loop in the dependencies, let me know and we can untangle it together.

If you want to test your fix or reproduce the failure, you can still use the Copr repo mentioned in the initial comment of this bug: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Comment 2 Miro Hrončok 2020-05-29 07:11:13 UTC
Python 3.9 update: The f33-python side tag is currently being merged.

New builds in f33-python are no longer possible, but python3 is not yet updated to Python 3.9 in rawhide. You can check when Python is Python 3.9 with:

    $ koji wait-repo f33-build --build python3.9-3.9.0~b1-3.fc3

And build the packages normally after that.

Comment 3 Miro Hrončok 2020-06-01 11:43:28 UTC
*** Bug 1842147 has been marked as a duplicate of this bug. ***

Comment 4 Mukundan Ragavan 2020-06-02 22:21:34 UTC
I don't think I know how to fix this failing test. Help needed! :)

Comment 5 Mukundan Ragavan 2020-06-02 23:00:25 UTC
I can disable the two tests that fail for the time being though - https://koji.fedoraproject.org/koji/taskinfo?taskID=45332662

Just this - 

PYTHONPATH=%{buildroot}%{python3_sitelib} pytest-3 -v -k "not ( type_hinting_test or advanced_oi_test )"

Comment 6 Charalampos Stratakis 2020-06-02 23:54:41 UTC
Created attachment 1694627 [details]
py3.9 fix patch

I created a patch for one of the issues and that makes type_hinting_test pass. You can apply at the SPEC file.

This should ideally be forwarded upstream.

However advanced_oi_test.py still fails for me and the failures are of this type:

AssertionError: <rope.base.pyobjectsdef.PyClass object at 0x7faf13114f70> != <rope.base.pyobjects.PyObject object at 0x7faf13545760>

Comment 7 Petr Viktorin (pviktori) 2020-06-03 06:32:15 UTC
Mukundan, could you report it upstream?

Comment 8 Mukundan Ragavan 2020-06-03 10:19:34 UTC
Petr, yes absolutely. I will report it today.

Comment 9 Mukundan Ragavan 2020-06-04 00:17:21 UTC
Built on rawhide disabling advanced_oi_test.

Upstream bug report filed.

Comment 10 Igor Raits 2020-06-04 01:30:04 UTC
Hello,

Please note that this comment was generated automatically. If you feel that this output has mistakes, please contact me via email (ignatenkobrain).

All subpackages of a package agaisnt which this bug was filled are now installable or removed from Fedora 33.

Thanks for taking care of it!


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