Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails build on python3.11? #427

Closed
yuzibo opened this issue Dec 29, 2022 · 3 comments · Fixed by #440
Closed

Fails build on python3.11? #427

yuzibo opened this issue Dec 29, 2022 · 3 comments · Fixed by #440

Comments

@yuzibo
Copy link

yuzibo commented Dec 29, 2022

Hi,
I noticed the #1026619 that was marked removal for python-fire package on Debian.
The problem is that it build fails on here:

I: pybuild base:240: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build; python3.11 -m unittest discover -v
fire.test_components (unittest.loader._FailedTest.fire.test_components) ... ERROR
fire.test_components_bin (unittest.loader._FailedTest.fire.test_components_bin) ... ERROR
fire.test_components_py3 (unittest.loader._FailedTest.fire.test_components_py3) ... ERROR
fire.test_components_test (unittest.loader._FailedTest.fire.test_components_test) ... ERROR
....
======================================================================
ERROR: fire.test_components (unittest.loader._FailedTest.fire.test_components)
----------------------------------------------------------------------
ImportError: Failed to import test module: fire.test_components
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components.py", line 28, in <module>
    from fire import test_components_py3 as py3  # pylint: disable=unused-import,no-name-in-module,g-import-not-at-top
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 58, in <module>
    class WithAsyncio(object):
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 60, in WithAsyncio
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'


======================================================================
ERROR: fire.test_components_bin (unittest.loader._FailedTest.fire.test_components_bin)
----------------------------------------------------------------------
ImportError: Failed to import test module: fire.test_components_bin
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_bin.py", line 25, in <module>
    from fire import test_components
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components.py", line 28, in <module>
    from fire import test_components_py3 as py3  # pylint: disable=unused-import,no-name-in-module,g-import-not-at-top
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 58, in <module>
    class WithAsyncio(object):
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 60, in WithAsyncio
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'


======================================================================
ERROR: fire.test_components_py3 (unittest.loader._FailedTest.fire.test_components_py3)
----------------------------------------------------------------------
ImportError: Failed to import test module: fire.test_components_py3
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 58, in <module>
    class WithAsyncio(object):
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 60, in WithAsyncio
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'


======================================================================
ERROR: fire.test_components_test (unittest.loader._FailedTest.fire.test_components_test)
----------------------------------------------------------------------
ImportError: Failed to import test module: fire.test_components_test
Traceback (most recent call last):
  File "/usr/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
    module = self._get_module_from_name(name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_test.py", line 21, in <module>
    from fire import test_components as tc
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components.py", line 28, in <module>
    from fire import test_components_py3 as py3  # pylint: disable=unused-import,no-name-in-module,g-import-not-at-top
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 58, in <module>
    class WithAsyncio(object):
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.11/build/fire/test_components_py3.py", line 60, in WithAsyncio
    @asyncio.coroutine
     ^^^^^^^^^^^^^^^^^
AttributeError: module 'asyncio' has no attribute 'coroutine'


----------------------------------------------------------------------
Ran 7 tests in 0.001s

I have googled the asyncio was Deprecated here, right?
Could you have a look?

Thanks.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1026619

@yuzibo
Copy link
Author

yuzibo commented Dec 29, 2022

I tested the patch that is ok(It can be built):
https://src.fedoraproject.org/rpms/python-aiohttp-cors/pull-request/2#request_diff
Hope this helps.

@dbieber dbieber added the bug label Feb 1, 2023
@dbieber
Copy link
Member

dbieber commented Feb 1, 2023

I've marked this as bug. We would like to support Python 3.11 and will need to update the asyncio code to do so.

@dvzrv
Copy link

dvzrv commented Apr 8, 2023

Hi! A fix for this has been provided in #440 and it works.
Please merge and create a new release! We're currently rebuilding all packages against Python 3.11 on Arch Linux and I have to apply the mentioned fix to be able to Update this package.

Thanks! :)

archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Apr 8, 2023
Apply upstreamed patch for Python 3.11 compat: google/python-fire#427

git-svn-id: file:///srv/repos/svn-community/svn@1442990 9fca08f4-af9d-4005-b8df-a31f2cc04f65
archlinux-github pushed a commit to archlinux/svntogit-community that referenced this issue Apr 8, 2023
Apply upstreamed patch for Python 3.11 compat: google/python-fire#427

git-svn-id: file:///srv/repos/svn-community/svn@1442990 9fca08f4-af9d-4005-b8df-a31f2cc04f65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants