Hi,

2014-05-22 10:53 GMT+02:00 Saúl Ibarra Corretgé <[email protected]>:
> I just tried running the aiodns test suite on Python 3.3.X and it runs
> just fine :-)

Did you modify the code to use Trollius? How?

> I wonder what approach should libraries follow for Python 3.3+, since
> a user could have both asyncio and trollius installed, and depending
> on how the import try-except dance is done results could be unexpected...

In Trollius documentation, I suggested:
---
try:
    # Use Trollius on Python <= 3.2
    import trollius as asyncio
except ImportError:
    # Use Tulip on Python 3.3, or builtin asyncio on Python 3.4+
    import asyncio
---

But after reading your mail, I realized that it is not what I want.
Tulip and asyncio of Python 3.4+ should be preferred over Trollius:
---
try:
    # Use Tulip on Python 3.3, or builtin asyncio on Python 3.4+
    import asyncio
except ImportError:
    # Use Trollius on Python <= 3.2
    import trollius as asyncio
---

Victor

Reply via email to