diff --git a/mypy/dmypy_server.py b/mypy/dmypy_server.py index e4e3a56fb774b..54f85f3bfc280 100644 --- a/mypy/dmypy_server.py +++ b/mypy/dmypy_server.py @@ -559,13 +559,12 @@ def get_meminfo() -> Dict[str, Any]: try: import psutil # type: ignore # It's not in typeshed yet except ImportError: - if sys.platform != 'win32': - res['memory_psutil_missing'] = ( - 'psutil not found, run pip install mypy[dmypy] ' - 'to install the needed components for dmypy' - ) + res['memory_psutil_missing'] = ( + 'psutil not found, run pip install mypy[dmypy] ' + 'to install the needed components for dmypy' + ) else: - process = psutil.Process(os.getpid()) + process = psutil.Process() meminfo = process.memory_info() res['memory_rss_mib'] = meminfo.rss / MiB res['memory_vms_mib'] = meminfo.vms / MiB diff --git a/setup.py b/setup.py index 9c21ebb81edf9..02c02b462197f 100644 --- a/setup.py +++ b/setup.py @@ -174,12 +174,10 @@ def run(self): classifiers=classifiers, cmdclass=cmdclass, # When changing this, also update test-requirements.txt. - install_requires = ['typed-ast >= 1.3.5, < 1.4.0', - 'mypy_extensions >= 0.4.0, < 0.5.0', - ], + install_requires=['typed-ast >= 1.3.5, < 1.4.0', + 'mypy_extensions >= 0.4.0, < 0.5.0', + ], # Same here. - extras_require = { - 'dmypy': 'psutil >= 5.4.0, < 5.5.0; sys_platform!="win32"', - }, + extras_require={'dmypy': 'psutil >= 4.0'}, include_package_data=True, ) diff --git a/test-requirements.txt b/test-requirements.txt index e7638029850e9..5f310d5930240 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ flake8-bugbear; python_version >= '3.5' flake8-pyi; python_version >= '3.6' lxml==4.2.4 mypy_extensions>=0.4.0,<0.5.0 -psutil>=5.4.0,<5.5.0; sys_platform!='win32' +psutil>=4.0 pytest>=4.4 pytest-xdist>=1.22 pytest-cov>=2.4.0