Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Update Werkzeug and add pyyaml#664

Merged
Marc-Andre-Rivet merged 5 commits into
devfrom
update-requirements
Feb 4, 2020
Merged

Update Werkzeug and add pyyaml#664
Marc-Andre-Rivet merged 5 commits into
devfrom
update-requirements

Conversation

@wbrgss

@wbrgss wbrgss commented Dec 12, 2019

Copy link
Copy Markdown
Contributor

When running npm run build in this repo, within a virtual environment:

  • Without upgrading Werkzeug to 0.15.6 I got
  from .wrappers import Request
  File "/home/plotly/Workspace/dash-table/ve/lib/python3.7/site-packages/flask/wrappers.py", line 14, in <module>
  from werkzeug.wrappers.json import JSONMixin as _JSONMixin
ModuleNotFoundError: No module named 'werkzeug.wrappers.json'; 'werkzeug.wrappers' is not a package

Maybe we could also use a different version of Flask. In the end it might be a Flask bug (see here)

  • Without installing pyyaml from pip:
Traceback (most recent call last):
  File "/home/plotly/Workspace/dash-table/ve/bin/dash-generate-components", line 5, in <module>
    from dash.development.component_generator import cli
  File "/home/plotly/Workspace/dash-table/ve/lib/python3.7/site-packages/dash/development/component_generator.py", line 14, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'

I'm using PopOS (a flavour of Ubuntu 19.04). @Marc-Andre-Rivet can you check if bumping the Werkzeug version breaks anything in your env and/or whether pyyaml is already in your env?

Comment thread requirements.txt
Werkzeug==0.15.6
wrapt==1.10.11
xlrd>= 1.0.0 No newline at end of file
xlrd>= 1.0.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what happened here; whitespace strip?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your editor probably added a trailing newline, which @Marc-Andre-Rivet's files often don't have. No worries, I do that all the time too 😏

@alexcjohnson

Copy link
Copy Markdown
Collaborator

@Marc-Andre-Rivet What is this requirements.txt file? The only place I see it mentioned is in the "local server review apps" section of CONTRIBUTING.md. For running npm run build I'd think you want to be in an environment that has dash[dev] installed, and that'll bring along PyYAML with it (and then after that reinstall the table repo -e).

Re: Werkzeug - I guess that should have been updated with Flask in #536, but I don't know why this requirements.txt file is locking down things we don't depend on directly, that seems like a recipe for all sorts of problems, unless this file is autogenerated from some other clean install process

@Marc-Andre-Rivet

Copy link
Copy Markdown
Contributor

@alexcjohnson I think this file is used for the Heroku deployment from GH:
image

Not sure if dev-requirements and python-requirements have any use at this point though.

@Marc-Andre-Rivet Marc-Andre-Rivet added the dash-type-maintenance Technical debt, dependency management, additional testing, etc. label Feb 4, 2020
@shammamah-zz

Copy link
Copy Markdown
Contributor

@wbrgss pyyaml should be installed automatically with pip install dash[dev]. We might have to update the contributing guidelines instead to specify that that package should be installed.

@Marc-Andre-Rivet

Copy link
Copy Markdown
Contributor

Removing the pyyaml entry. As @shammamah pointed out this is included with dash[dev].

@Marc-Andre-Rivet
Marc-Andre-Rivet merged commit 4ef63a8 into dev Feb 4, 2020
@Marc-Andre-Rivet
Marc-Andre-Rivet deleted the update-requirements branch February 4, 2020 16:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

dash-type-maintenance Technical debt, dependency management, additional testing, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants