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

Create_task() is only available in python 3.7 and later #127

Open
yurac opened this issue Aug 3, 2022 · 3 comments
Open

Create_task() is only available in python 3.7 and later #127

yurac opened this issue Aug 3, 2022 · 3 comments

Comments

@yurac
Copy link

yurac commented Aug 3, 2022

Is it possible to fall back to ensure_future() instead create_task() in order to support python 3.6?
The create_task() function is currently called in 1 place in file proxy_object.py
Thanks!

@garyvdm
Copy link
Contributor

garyvdm commented Aug 4, 2022

I'm not the maintainer of this project, so my opinion may not be worth much.

Having said that, Python 3.6 is no longer supported. Source: https://peps.python.org/pep-0494/

Supporting 3.6 add some complexity to the build system since the main distribution of pip no longer supports 3.6. Hence pr #118 removes 3.6 support to get CI builds working again.

@yurac
Copy link
Author

yurac commented Aug 4, 2022

I'm not the maintainer of this project, so my opinion may not be worth much.

Having said that, Python 3.6 is no longer supported. Source: https://peps.python.org/pep-0494/

Supporting 3.6 add some complexity to the build system since the main distribution of pip no longer supports 3.6. Hence pr #118 removes 3.6 support to get CI builds working again.

@garyvdm I understand. I will have the following workaround for now:

# Dbus_next calls asyncio.create_task() which does not exist in python 3.6.                                             
# All else seem working. See issue #127                                                                                 
try:                                                                                                                    
    asyncio.create_task                                                                                                 
except AttributeError:                                                                                                  
    asyncio.create_task = asyncio.ensure_future                                                                         
import dbus_next as dbus                                                                                                

@garyvdm
Copy link
Contributor

garyvdm commented Aug 10, 2022

@garyvdm I understand. I will have the following workaround for now:

# Dbus_next calls asyncio.create_task() which does not exist in python 3.6.                                             
# All else seem working. See issue #127                                                                                 
try:                                                                                                                    
    asyncio.create_task                                                                                                 
except AttributeError:                                                                                                  
    asyncio.create_task = asyncio.ensure_future                                                                         
import dbus_next as dbus                                                                                                

As I mentioned, I'm not the maintainer/owner of this project, so it's not up to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants