django-rest-marshmallow icon indicating copy to clipboard operation
django-rest-marshmallow copied to clipboard

PIP dependencies don't seem to list marshmallow.

Open dragonpaw opened this issue 5 years ago • 4 comments

Installing this module via poetry/pip didn't pull down marshmallow, so I think you're missing a dependency there.

dragonpaw avatar Apr 06 '20 23:04 dragonpaw

Looks like rest_framework is also missing there.

dragonpaw avatar Apr 06 '20 23:04 dragonpaw

Indeed, this package declares no explicit dependencies in install_requires, and that seems to have been an explicit decision from the beginning (correct me if I'm wrong @tomchristie ). My guess is that django and marshmallow are considered "peer dependencies" that the consumer is responsible for installing themselves.

In Python packaging, though, everything is a peer dependency, so I think it would be fine to add both django and marshmallow as explicit dependencies in setup.py .

sloria avatar Apr 07 '20 00:04 sloria

I guess I'm of the opinion that once I install a package in Python, I should at least be able to import it without fatal errors. Optional dependencies are one thing, but if a package won't even import at all, that feels like the case for a explicit dependency to me.

(Especially as the docs for this package do mention specific versions you require.)

dragonpaw avatar Apr 07 '20 03:04 dragonpaw

Ok, let’s go ahead and add them. Would you like to send a PR?

sloria avatar Apr 07 '20 03:04 sloria