Make psutil an optional dependency#4634
Conversation
|
Perhaps a better extra name could be used? I've picked |
emmatyping
left a comment
There was a problem hiding this comment.
Looks like a good start, but this should be documented (maybe in the installation section?). Also, I think there should be an error message here
Line 363 in 0c12b21
psutil and fails. Maybe psutil not found, run pip install mypy[dmypy] to install the needed components for dmypy?
setup.py
Outdated
| ], | ||
| extras_require = { | ||
| ':python_version < "3.5"': 'typing >= 3.5.3', | ||
| 'dmypy': 'psutil >= 5.4.0, < 5.5.0', |
There was a problem hiding this comment.
You should add :sys_platform!="win32" after dmypy, since it is not used on Windows.
|
I agree that docs should be updated, but I don't know what |
|
Oh and I'm pretty sure that using |
|
Can you point me to the docs that explain this notation works? Both the I think the best way to surface the error is to stick it in the |
|
Assuming the tests pass I'm fine with it. |
|
I restarted the 3.6 build on Travis as the stubgen tests seem to be flaking. |
|
I've updated PR description in such way that it describes all changes to the codebase. |
docs/source/getting_started.rst
Outdated
|
|
||
| $ python3 -m pip install mypy | ||
|
|
||
| Optionally you can install extra dependencies for daemon server with: |
There was a problem hiding this comment.
Please remove this since dmypy is otherwise undocumented (and unsupported). This will only confuse users.
This reverts commit c93e70a.
|
Thanks! |
* master: (27 commits) Don't call --strict-optional and --incremental experimental (python#4642) Sync typeshed (python#4641) Fix callable types with inconsistent argument counts (python#4611) Fix example (add 'class A:') Make psutil an optional dependency (python#4634) mypy and mypy_extensions aren't posix only (python#3765) Documentation for attr support (python#4632) Use read_with_python_encoding in stubgen to handle file encoding (python#3790) Sync typeshed (python#4631) Add remaining core team emails to CREDITS (python#4629) Fix issues with attr code. (python#4628) Better support for converter in attrs plugin. (python#4607) Clean up credits (python#4626) Support type aliases in fine-grained incremental mode (python#4525) Fine-grained: Fix crash caused by unreachable class (python#4613) Treat divmod like a binary operator (python#4585) Sync typeshed (python#4605) Fine-grained: Don't infer partial types from multiple targets (python#4553) Fine-grained: Compare symbol table snapshots when following dependencies (python#4598) Fix type of forward reference to a decorated class method (python#4486) ...
If it's not installed, when running `dmypy status -v` a message will be displayed instead of the memory stats.
psutilnot installed, daemon reports it and suggests installing itFixes #4593.