lyft / toasted-marshmallow

S'More speed for Marshmallow

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflict with marshmallow install

samuelcolvin opened this issue · comments

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)

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

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

+1 also running into this bug.

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?

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.