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

Conflict with marshmallow install #9

Open
samuelcolvin opened this issue Nov 6, 2017 · 5 comments

Comments

Projects
None yet
5 participants
@samuelcolvin
Copy link

commented Nov 6, 2017

Currently toasted-marshmallow is messing with the marshmallow install and causing errors. I'm pretty sure that modifying other named packages in site-packages/ is pretty bad form.

It should either use the system version of marshmallow (perhaps with constraints on which version) or install a custom version of marshmallow somewhere else.

Current behaviour:

Try uninstalling toasted-marshmallow and you get:

pip uninstall toastedmarshmallow
Uninstalling toastedmarshmallow-0.2.6:
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__init__.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/__init__.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/base.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/class_registry.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/compat.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/decorators.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/exceptions.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/fields.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/marshalling.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/orderedset.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/schema.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/utils.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/__pycache__/validate.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/base.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/class_registry.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/compat.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/decorators.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/exceptions.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/fields.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/marshalling.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/orderedset.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/schema.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/utils.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/marshmallow/validate.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow-0.2.6.dist-info/DESCRIPTION.rst
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow-0.2.6.dist-info/INSTALLER
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow-0.2.6.dist-info/METADATA
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow-0.2.6.dist-info/RECORD
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow-0.2.6.dist-info/WHEEL
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow-0.2.6.dist-info/metadata.json
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow-0.2.6.dist-info/top_level.txt
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/__init__.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/__pycache__/__init__.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/__pycache__/compat.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/__pycache__/jit.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/__pycache__/utils.cpython-36.pyc
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/compat.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/jit.py
  /home/samuel/code/pydantic/env/lib/python3.6/site-packages/toastedmarshmallow/utils.py

In other works toasted-marshmallow is installing it's own version of marshmallow to site-packages/marshmallow, then I'm getting an error if I install the real marshmallow:

from marshmallow import SchemaJit

(I want both marshmallow and toastedmarshmallow installed for my benchmarks of other frameworks)

@gazure

This comment has been minimized.

Copy link

commented Jan 26, 2018

+1 on this. Big hinderance when trying to use marshmallow-sqlalchemy in conjunction with toasted marshmallow.

@rrranthony

This comment has been minimized.

Copy link

commented Jan 29, 2018

+1. Current implementation leads to unpredictable builds and makes it frustrating to use toasted marshmallow.

@aosyborg

This comment has been minimized.

Copy link

commented Jan 29, 2018

+1 also running into this bug.

@bitfinity

This comment has been minimized.

Copy link

commented May 4, 2018

This really is bad practice. You guys should fork marshmallow, not overwrite it. This is not a drop-in replacement for marshmallow - it broke my project (as mentioned above - sqlalchemy-marshmallow). Even when I disabled toasted marshmallow's version of jit, my project was still broken, and I had to force reinstall marshmallow to get it working again. Had I not seen this issue, it may have taken a long time to figure out what happened and how to fix.
People's projects may rely on a specific version of marshmallow - how would they know that this project overwrote their marshmallow with it's own specific version?

@samuelcolvin

This comment has been minimized.

Copy link
Author

commented May 4, 2018

Kind of mad this ever happened and madder still that it hasn't been fixed and no one has responded.

Use pydantic instead. It's faster than toasted-marshmallow and more elegant IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.