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

Move msgpack and pyyaml to extras #7

Closed
rominf opened this issue Apr 11, 2019 · 7 comments
Closed

Move msgpack and pyyaml to extras #7

rominf opened this issue Apr 11, 2019 · 7 comments

Comments

@rominf
Copy link

rominf commented Apr 11, 2019

I want to use the library for conversion to and from dict only. So, I don't like that when I install the library msgpack and pyyaml are installed.

Here is the relevant part of documentation: https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies

@Fatal1ty
Copy link
Owner

@rominf I don't agree with you. If i make dependencies optional, it will break compatibility for those who already use mashumaro. If you really don't want to install dependencies for some reason, you can tell pip to ignore them with --no-dependencies flag.

@rominf
Copy link
Author

rominf commented Apr 15, 2019

Can you explain why do you think "it will break compatibility for those who already use mashumaro"? Users who already have mashumaro installed will not notice the change, as they will not even call pip for installation. On the other hand, if they would want to update all dependencies (but probably they won't if they use only conversion to and from dict only, as I), they will have do:

$ pip install -U mashumaro[msgpack,yaml]

That can be documented.

Also, how can I tell poetry not to install the dependencies? I don't think it's possible.

@Fatal1ty
Copy link
Owner

Users who already have mashumaro installed will not notice the change, as they will not even call pip for installation.

You're totally wrong here. The users should be able to install the current major version of mashumaro without making changes to their requirements. If setuptools had the ability to specify default "extras" dependencies, I would use it. There is the issue for that.

I will consider to make pyyaml and msgpack dependencies optional in the next major release.

@rominf
Copy link
Author

rominf commented Apr 15, 2019

You're totally wrong here. The users should be able to install the current major version of mashumaro without making changes to their requirements.

I don't agree with you, in my opinion it's a minor issue for users. But anyway, you are the creator of the library and I respect your opinion.

I will consider to make pyyaml and msgpack dependencies optional in the next major release.

Nice to hear. I hope you will do it, as it will attract more users.

@anthrotype
Copy link

my 2c: I really like mashumaro, I was thinking of replacing my use of cattrs with it, but decided not to because it forces my application to depend on msgpack and yaml which I am not planning on using. Please make them extras! Thanks

@Fatal1ty Fatal1ty reopened this Feb 1, 2022
@Fatal1ty
Copy link
Owner

Fatal1ty commented Feb 1, 2022

Hi @rominf @anthrotype

msgpack and pyyaml are going to be extra requirements in the next 3.0 version.

The existing mixins will be imported from mashumaro.mixins.msgpack and mashumaro.mixins.yaml.

@Fatal1ty
Copy link
Owner

Fatal1ty commented Feb 9, 2022

And finally these two packages are optional in 3.0.

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

3 participants