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

'cytoolz.functoolz.Compose' object has no attribute '__module__' #103

Closed
djrtwo opened this issue Aug 7, 2017 · 9 comments
Closed

'cytoolz.functoolz.Compose' object has no attribute '__module__' #103

djrtwo opened this issue Aug 7, 2017 · 9 comments

Comments

@djrtwo
Copy link

djrtwo commented Aug 7, 2017

When porting to cytoolz from toolz, I ran into the problem where the some previous library code was expecting Compose to have __module__ defined. I'm new to the project, but would expect the goal to be to generally to be able to move to cytoolz from toolz without any issues.

Should this be defined in Compose? If so, I can work to add it.

@pipermerriam
Copy link

Any thoughts on whether this could be addressed?

Also, here's a cute puppy to thank you for your time.

561447_cfad8a26d5063e659828371ef52d1317_large

@eriknw
Copy link
Member

eriknw commented Sep 7, 2017

Thanks for the report and the puppy! And I'm sorry for the delay; I had a 5000+ mile road trip to plan and execute that just finished.

I'm new to the project, but would expect the goal to be to generally to be able to move to cytoolz from toolz without any issues.

You're right, that is the goal, so any issue like this is greatly appreciated.

To clarify, it is Compose objects and not the Compose class that don't have __module__ attribute`, right? Taking a look now.

@djrtwo
Copy link
Author

djrtwo commented Sep 7, 2017

I believe is the Compose class. This is the original error (sorry hard to read)

29049765-924efb76-7b9d-11e7-9388-f2b37669c19d

I previously tried to import it and just monkey patch it but can't because it's compiled c-code.

from cytoolz import (
    Compose
)

Compose.__module__ = "cytoolz.functoolz"

error:

TypeError: can't set attributes of built-in/extension type 'cytoolz.functoolz.Compose'

I hope that helps. I'm a few weeks away from seeing the error so that's all the info I have without digging back in deeper.

@pipermerriam
Copy link

@eriknw no worries about the delay. Thanks for taking a look and for maintaining an awesome library that I love.

@pipermerriam
Copy link

ping

@llllllllll
Copy link

the __module__ is always toolz.functoolz for toolz.functoolz.Compose, is that actually useful to put in cytoolz?

@eriknw
Copy link
Member

eriknw commented Dec 16, 2017

This is in. Sorry for the delay. I plan to do a release later today.

@eriknw eriknw closed this as completed Dec 16, 2017
@pipermerriam
Copy link

Much appreciated @eriknw and @llllllllll

@eriknw
Copy link
Member

eriknw commented Dec 17, 2017

You bet, and thanks for the puppy!

Sorry again for the excessive delay. 0.9.0 was just released if you want to give it a go.

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

4 participants