numberoverzero / bottom

asyncio-based rfc2812-compliant IRC Client
http://bottom-docs.readthedocs.io
MIT License
74 stars 23 forks source link

collections.abc error #11

Closed thebigmunch closed 9 years ago

thebigmunch commented 9 years ago

collections.abc was moved to a separate module in 3.3 rather than being the abc attribute of the collections module. Therefore it needs to be imported in pack.py else an AttributeError is raised when packing iterables.

numberoverzero commented 9 years ago

Thanks for the bug report!

I intended bottom to be 3.4+ since https://docs.python.org/3/library/asyncio.html suggests asyncio was introduced then; however, https://pypi.python.org/pypi/asyncio requires 3.3+.

If this is the only delta between 3.3 and 3.4 support I'm fine with the change. Having not looked into the package on pypi yet, does it offer identical functionality to the 3.4 asyncio module? Is yield from also available in 3.3?

thebigmunch commented 9 years ago

I was simply saying that was when the collections module change happened. This error will occur on any version 3.3+.

As to the question of the asyncio package and yield from. Yes, yield from was introduced in 3.3. The asyncio package on PyPi is the same asyncio package as in the stdlib. As with a number of stdlib modules, the development happens in its own repository and will get pushed to the Python stdlib tree when a new release comes along. The version numbers of asyncio represent the Python version in which it's been released. So if you want to support asyncio on 3.3, it should be as simple as adding it to the requirements. If you wanted to stick to 3.4+, then you should set up something in setup.py to not install (or at least warn) when installing on anything less.

numberoverzero commented 9 years ago

Ok - I found this note on the collections docs for 3.3:

Changed in version 3.3: Moved Collections Abstract Base Classes to the collections.abc module. For backwards compatibility, they continue to be visible in this module as well.

I suspect the import was succeeding for me because of the compatibility aliasing - I'll update pack.py to import collections.abc