summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-02-27 17:13:52 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2019-02-27 17:13:52 +0100
commitbcff9ae55cb324ffe499347e1925c29f1d6800c9 (patch)
tree2a30c87d01bc01fa7f31a1f67b21404b6e5d53dd
parenteb05ea9bd7464232bbc81a8a9bfb902717d77b43 (diff)
downloadpsutil-bcff9ae55cb324ffe499347e1925c29f1d6800c9.tar.gz
fix #1442: use python3 as Makefile default
-rwxr-xr-x.ci/travis/install.sh2
-rw-r--r--DEVGUIDE.rst2
-rw-r--r--HISTORY.rst1
-rw-r--r--Makefile19
-rw-r--r--scripts/internal/print_api_speed.py9
5 files changed, 14 insertions, 19 deletions
diff --git a/.ci/travis/install.sh b/.ci/travis/install.sh
index 56f6623d..b0f28c66 100755
--- a/.ci/travis/install.sh
+++ b/.ci/travis/install.sh
@@ -39,4 +39,4 @@ elif [[ $TRAVIS_PYTHON_VERSION == '2.7' ]] || [[ $PYVER == 'py27' ]]; then
pip install -U ipaddress mock
fi
-pip install -U coverage coveralls flake8 pep8 setuptools
+pip install -U coverage coveralls flake8 setuptools
diff --git a/DEVGUIDE.rst b/DEVGUIDE.rst
index f604480e..1b056198 100644
--- a/DEVGUIDE.rst
+++ b/DEVGUIDE.rst
@@ -49,7 +49,7 @@ Some useful make commands:
.. code-block:: bash
make install # install
- make setup-dev-env # install useful dev libs (pyflakes, unittest2, etc.)
+ make setup-dev-env # install useful dev libs (fkale8, unittest2, etc.)
make test # run unit tests
make test-memleaks # run memory leak tests
make test-coverage # run test coverage
diff --git a/HISTORY.rst b/HISTORY.rst
index 5313a091..2428f033 100644
--- a/HISTORY.rst
+++ b/HISTORY.rst
@@ -19,6 +19,7 @@ XXXX-XX-XX
startup.
- 1433_: new Process.parents() method. (idea by Ghislain Le Meur)
- 1437_: pids() are returned in sorted order.
+- 1442_: python3 is now the default interpreter used by Makefile.
**Bug fixes**
diff --git a/Makefile b/Makefile
index 839a6026..24ee6db6 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
# To use a specific Python version run: "make install PYTHON=python3.3"
# You can set the variables below from the command line.
-PYTHON = python
+PYTHON = python3
TSCRIPT = psutil/tests/__main__.py
ARGS =
# List of nice-to-have dev libs.
@@ -14,9 +14,7 @@ DEPS = \
futures \
ipaddress \
mock==1.0.1 \
- pep8 \
perf \
- pyflakes \
requests \
setuptools \
sphinx \
@@ -166,13 +164,6 @@ test-coverage: ## Run test coverage.
# Linters
# ===================================================================
-pep8: ## PEP8 linter.
- @git ls-files | grep \\.py$ | xargs $(PYTHON) -m pep8
-
-pyflakes: ## Pyflakes linter.
- @export PYFLAKES_NODOCTEST=1 && \
- git ls-files | grep \\.py$ | xargs $(PYTHON) -m pyflakes
-
flake8: ## flake8 linter.
@git ls-files | grep \\.py$ | xargs $(PYTHON) -m flake8
@@ -247,16 +238,16 @@ generate-manifest: ## Generates MANIFEST.in file.
# ===================================================================
print-announce: ## Print announce of new release.
- @$(TEST_PREFIX) $(PYTHON) scripts/internal/print_announce.py
+ @$(PYTHON) scripts/internal/print_announce.py
print-timeline: ## Print releases' timeline.
- @$(TEST_PREFIX) $(PYTHON) scripts/internal/print_timeline.py
+ @$(PYTHON) scripts/internal/print_timeline.py
print-access-denied: ## Print AD exceptions
- @$(TEST_PREFIX) $(PYTHON) scripts/internal/print_access_denied.py
+ @$(PYTHON) scripts/internal/print_access_denied.py
print-api-speed: ## Benchmark all API calls
- @$(TEST_PREFIX) $(PYTHON) scripts/internal/print_api_speed.py $(ARGS)
+ @$(PYTHON) scripts/internal/print_api_speed.py $(ARGS)
# ===================================================================
# Misc
diff --git a/scripts/internal/print_api_speed.py b/scripts/internal/print_api_speed.py
index e635810f..188ae737 100644
--- a/scripts/internal/print_api_speed.py
+++ b/scripts/internal/print_api_speed.py
@@ -66,8 +66,10 @@ def run():
# --- system
public_apis = []
- ignore = ('wait_procs', 'process_iter', 'win_service_get',
- 'win_service_iter')
+ ignore = ['wait_procs', 'process_iter', 'win_service_get',
+ 'win_service_iter']
+ if psutil.MACOS:
+ ignore.append('net_connections') # raises AD
for name in psutil.__all__:
obj = getattr(psutil, name, None)
if inspect.isfunction(obj):
@@ -88,11 +90,12 @@ def run():
print_timings()
# --- process
-
print(titlestr("\nPROCESS APIS"))
ignore = ['send_signal', 'suspend', 'resume', 'terminate', 'kill', 'wait',
'as_dict', 'parent', 'parents', 'memory_info_ex', 'oneshot',
'pid', 'rlimit']
+ if psutil.MACOS:
+ ignore.append('memory_maps') # XXX
p = psutil.Process()
for name in sorted(dir(p)):
if not name.startswith('_') and name not in ignore: