Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use pytest, get rid of test/runner.py #2447

Merged
merged 80 commits into from
Oct 1, 2024
Merged
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
56efb1d
get rid of TSCRIPT
giampaolo Jun 21, 2024
d92b4eb
remove runner.py
giampaolo Jun 21, 2024
c3c5b09
get rid of runner invocation from individual test files
giampaolo Jun 21, 2024
1ac4efa
use pytest in the Makefile
giampaolo Jun 21, 2024
49cf6bd
fix test
giampaolo Jun 21, 2024
20f587d
adjust test
giampaolo Jun 22, 2024
8a3f121
pytest parallel
giampaolo Jun 22, 2024
7049227
expose PYTEST_PARALLEL test constant
giampaolo Jun 22, 2024
66de919
skip test in parallel mode
giampaolo Jun 22, 2024
58d4243
rm @serialrun deco
giampaolo Jun 22, 2024
9a27542
small var rename
giampaolo Jun 22, 2024
c1d0ea4
avoid installing unneded deps on GHA
giampaolo Jun 22, 2024
13be4f3
attempt 3
giampaolo Jun 23, 2024
045463a
attempt 4
giampaolo Jun 23, 2024
c17152d
update ruff rules
giampaolo Jul 3, 2024
7caf15d
Merge branch 'master' into pytest
giampaolo Jul 7, 2024
e9a2a11
use short traceback
giampaolo Jul 7, 2024
562bc84
rm teyit + make fix-unittests target
giampaolo Jul 7, 2024
da580b4
disable failing test
giampaolo Jul 8, 2024
57c0ef0
progress
giampaolo Jul 12, 2024
667f1e7
fix ruff
giampaolo Jul 12, 2024
87a5999
re-enable CI platforms
giampaolo Jul 27, 2024
0f450b8
bump up cibuildwheel ver
giampaolo Jul 27, 2024
07984c1
attempt 1
giampaolo Jul 27, 2024
666cd81
install pytest
giampaolo Jul 27, 2024
22e7f88
adjust path
giampaolo Jul 27, 2024
9deea3f
adjust path 2
giampaolo Jul 27, 2024
8871a08
progress
giampaolo Jul 27, 2024
f04e92c
progress
giampaolo Jul 27, 2024
8cc2f17
merge from master
giampaolo Sep 30, 2024
516ed56
add pytest dep
giampaolo Sep 30, 2024
65b7aab
attempt
giampaolo Sep 30, 2024
3861914
attempt 2
giampaolo Sep 30, 2024
ef60bfc
Merge branch 'master' into pytest
giampaolo Oct 1, 2024
f9f374d
attempt 3
giampaolo Oct 1, 2024
1a96b3e
progress
giampaolo Oct 1, 2024
8f83395
progress2
giampaolo Oct 1, 2024
904b849
progress 3
giampaolo Oct 1, 2024
6615db4
progress 4
giampaolo Oct 1, 2024
936e4ed
progress 5
giampaolo Oct 1, 2024
785f9b3
progress 6
giampaolo Oct 1, 2024
82fdc64
progress 7
giampaolo Oct 1, 2024
a50aa7a
progress 8
giampaolo Oct 1, 2024
7933aa1
progress 9
giampaolo Oct 1, 2024
4bef550
progress 10
giampaolo Oct 1, 2024
172c3dd
progress 11
giampaolo Oct 1, 2024
901ad75
progress 12
giampaolo Oct 1, 2024
840258f
progress 13
giampaolo Oct 1, 2024
464571d
progress 14
giampaolo Oct 1, 2024
6ecee70
progress 15
giampaolo Oct 1, 2024
3add3ed
progress 16
giampaolo Oct 1, 2024
ae3fb00
progress 17
giampaolo Oct 1, 2024
0b20ce3
progress 18
giampaolo Oct 1, 2024
8ff70d4
progress 19
giampaolo Oct 1, 2024
bee3417
progress 20
giampaolo Oct 1, 2024
ce52218
progress 21
giampaolo Oct 1, 2024
334bac6
progress 22
giampaolo Oct 1, 2024
af76047
progress 23
giampaolo Oct 1, 2024
7d54440
resync pyproject.toml with master
giampaolo Oct 1, 2024
04f95d5
resync pyproject.toml with master
giampaolo Oct 1, 2024
ff88052
resync with master
giampaolo Oct 1, 2024
1686b3b
print sysinfo when tests start
giampaolo Oct 1, 2024
3e2c62b
progress 24
giampaolo Oct 1, 2024
6ac9233
adjust test case for AARCH64
giampaolo Oct 1, 2024
fe884c7
try running bsd tests
giampaolo Oct 1, 2024
56c81f0
revert prev commit
giampaolo Oct 1, 2024
d6bb787
add pytest-xdist dep on windows
giampaolo Oct 1, 2024
2e7ef43
try to fix winmake execution
giampaolo Oct 1, 2024
438d10e
winmake refact
giampaolo Oct 1, 2024
0e52a73
winmake refact
giampaolo Oct 1, 2024
3f24634
winmake refact 2
giampaolo Oct 1, 2024
2e82048
try to adjust insta-pip target
giampaolo Oct 1, 2024
49ee3c9
adjust deps
giampaolo Oct 1, 2024
dd608d9
adjust deps
giampaolo Oct 1, 2024
4106c7b
disable bsd
giampaolo Oct 1, 2024
27ab0e6
progress
giampaolo Oct 1, 2024
b3e33cd
progress
giampaolo Oct 1, 2024
a33358b
progress 2
giampaolo Oct 1, 2024
40af359
progress 3
giampaolo Oct 1, 2024
52c1e5e
progress
giampaolo Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions .github/workflows/bsd.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# # Execute tests on *BSD platforms. Does not produce wheels.
# # Useful URLs:
# # https://github.com/vmactions/freebsd-vm
# # https://github.com/vmactions/openbsd-vm
# # https://github.com/vmactions/netbsd-vm
# Execute tests on *BSD platforms. Does not produce wheels.
# Useful URLs:
# https://github.com/vmactions/freebsd-vm
# https://github.com/vmactions/openbsd-vm
# https://github.com/vmactions/netbsd-vm

on: [push, pull_request]
name: bsd-tests
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
cancel-in-progress: true
jobs:
# here just so that I can comment the next jobs to temporarily disable them
empty-job:
if: false
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

# on: [push, pull_request]
# name: bsd-tests
# concurrency:
# group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }}
# cancel-in-progress: true
# jobs:
# freebsd:
# runs-on: ubuntu-22.04
# steps:
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ concurrency:
jobs:
# Linux + macOS + Windows Python 3
py3:
name: "py3-${{ matrix.os }}-${{ matrix.arch }}"
name: "py3, ${{ matrix.os }}, ${{ matrix.arch }}"
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
@@ -57,6 +57,9 @@ jobs:
env:
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_PRERELEASE_PYTHONS: True
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND:
make -C {project} PYTHON="env python" PSUTIL_SCRIPTS_DIR="{project}/scripts" setup-dev-env install print-sysinfo test test-memleaks

- name: Upload wheels
uses: actions/upload-artifact@v4
@@ -73,19 +76,18 @@ jobs:

# Linux + macOS + Python 2
py2:
name: py2-${{ matrix.os }}
name: py2, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
env:
CIBW_TEST_COMMAND:
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/runner.py &&
PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1 python {project}/psutil/tests/test_memleaks.py
CIBW_TEST_EXTRAS: test
CIBW_BUILD: 'cp27-*'
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND:
make -C {project} PYTHON="env python" PSUTIL_SCRIPTS_DIR="{project}/scripts" setup-dev-env install print-sysinfo test test-memleaks

steps:
- uses: actions/checkout@v4
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -153,7 +153,6 @@ include psutil/arch/windows/wmi.h
include psutil/tests/README.rst
include psutil/tests/__init__.py
include psutil/tests/__main__.py
include psutil/tests/runner.py
include psutil/tests/test_aix.py
include psutil/tests/test_bsd.py
include psutil/tests/test_connections.py
98 changes: 56 additions & 42 deletions Makefile
Original file line number Diff line number Diff line change
@@ -2,49 +2,64 @@
# To use a specific Python version run: "make install PYTHON=python3.3"
# You can set the variables below from the command line.

# Configurable.
PYTHON = python3
PYTHON_ENV_VARS = PYTHONWARNINGS=always PYTHONUNBUFFERED=1 PSUTIL_DEBUG=1
PYTEST_ARGS = -v -s --tb=short
ARGS =
TSCRIPT = psutil/tests/runner.py

# Internal.
# mandatory deps for running tests
PY3_DEPS = \
black \
check-manifest \
concurrencytest \
coverage \
packaging \
pylint \
pyperf \
pypinfo \
requests \
rstcheck \
ruff \
setuptools \
sphinx_rtd_theme \
teyit \
toml-sort \
twine \
virtualenv \
wheel
pytest \
pytest-xdist

# deps for local development
ifndef CIBUILDWHEEL
PY3_DEPS += \
black \
check-manifest \
coverage \
packaging \
pylint \
pyperf \
pypinfo \
pytest-cov \
requests \
rstcheck \
ruff \
setuptools \
sphinx_rtd_theme \
toml-sort \
twine \
virtualenv \
wheel
endif

# python 2 deps
PY2_DEPS = \
futures \
ipaddress \
mock
mock==1.0.1 \
pytest==4.6.11 \
pytest-xdist \
setuptools

PY_DEPS = `$(PYTHON) -c \
"import sys; \
py3 = sys.version_info[0] == 3; \
py38 = sys.version_info[:2] >= (3, 8); \
py3_extra = ' abi3audit' if py38 else ''; \
print('$(PY3_DEPS)' + py3_extra if py3 else '$(PY2_DEPS)')"`

NUM_WORKERS = `$(PYTHON) -c "import os; print(os.cpu_count() or 1)"`

# "python3 setup.py build" can be parallelized on Python >= 3.6.
BUILD_OPTS = `$(PYTHON) -c \
"import sys, os; \
py36 = sys.version_info[:2] >= (3, 6); \
cpus = os.cpu_count() or 1 if py36 else 1; \
print('--parallel %s' % cpus if cpus > 1 else '')"`

# In not in a virtualenv, add --user options for install commands.
INSTALL_OPTS = `$(PYTHON) -c \
"import sys; print('' if hasattr(sys, 'real_prefix') or hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix else '--user')"`
@@ -123,74 +138,74 @@ install-pip: ## Install pip (no-op if already installed).
setup-dev-env: ## Install GIT hooks, pip, test deps (also upgrades them).
${MAKE} install-git-hooks
${MAKE} install-pip
$(PYTHON_ENV_VARS) $(PYTHON) -m pip install $(INSTALL_OPTS) --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
$(PYTHON_ENV_VARS) $(PYTHON) -m pip install $(INSTALL_OPTS) --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade $(PY_DEPS)
$(PYTHON) -m pip install $(INSTALL_OPTS) --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip
$(PYTHON) -m pip install $(INSTALL_OPTS) --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade $(PY_DEPS)

# ===================================================================
# Tests
# ===================================================================

test: ## Run all tests. To run a specific test do "make test ARGS=psutil.tests.test_system.TestDiskAPIs"
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS)
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) --ignore=psutil/tests/test_memleaks.py $(ARGS)

test-parallel: ## Run all tests in parallel.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) --parallel
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) --ignore=psutil/tests/test_memleaks.py -n auto --dist loadgroup $(ARGS)

test-process: ## Run process-related API tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_process.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_process.py

test-process-all: ## Run tests which iterate over all process PIDs.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_process_all.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_process_all.py

test-system: ## Run system-related API tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_system.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_system.py

test-misc: ## Run miscellaneous tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_misc.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_misc.py

test-testutils: ## Run test utils tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_testutils.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_testutils.py

test-unicode: ## Test APIs dealing with strings.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_unicode.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_unicode.py

test-contracts: ## APIs sanity tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_contracts.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_contracts.py

test-connections: ## Test psutil.net_connections() and Process.net_connections().
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_connections.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_connections.py

test-posix: ## POSIX specific tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_posix.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_posix.py

test-platform: ## Run specific platform tests only.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_`$(PYTHON) -c 'import psutil; print([x.lower() for x in ("LINUX", "BSD", "OSX", "SUNOS", "WINDOWS", "AIX") if getattr(psutil, x)][0])'`.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_`$(PYTHON) -c 'import psutil; print([x.lower() for x in ("LINUX", "BSD", "OSX", "SUNOS", "WINDOWS", "AIX") if getattr(psutil, x)][0])'`.py

test-memleaks: ## Memory leak tests.
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) psutil/tests/test_memleaks.py
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) $(ARGS) psutil/tests/test_memleaks.py

test-last-failed: ## Re-run tests which failed on last run
${MAKE} build
$(PYTHON_ENV_VARS) $(PYTHON) $(TSCRIPT) $(ARGS) --last-failed
$(PYTHON_ENV_VARS) $(PYTHON) -m pytest $(PYTEST_ARGS) --last-failed $(ARGS)

test-coverage: ## Run test coverage.
${MAKE} build
# Note: coverage options are controlled by .coveragerc file
rm -rf .coverage htmlcov
$(PYTHON_ENV_VARS) $(PYTHON) -m coverage run -m unittest -v
$(PYTHON_ENV_VARS) $(PYTHON) -m coverage run -m pytest $(PYTEST_ARGS) --ignore=psutil/tests/test_memleaks.py $(ARGS)
$(PYTHON) -m coverage report
@echo "writing results to htmlcov/index.html"
$(PYTHON) -m coverage html
@@ -235,16 +250,12 @@ fix-black:
fix-ruff:
@git ls-files '*.py' | xargs $(PYTHON) -m ruff check --no-cache --fix $(ARGS)

fix-unittests: ## Fix unittest idioms.
@git ls-files '*test_*.py' | xargs $(PYTHON) -m teyit --show-stats

fix-toml: ## Fix pyproject.toml
@git ls-files '*.toml' | xargs toml-sort

fix-all: ## Run all code fixers.
${MAKE} fix-ruff
${MAKE} fix-black
${MAKE} fix-unittests
${MAKE} fix-toml

# ===================================================================
@@ -351,6 +362,9 @@ print-downloads: ## Print PYPI download statistics
print-hashes: ## Prints hashes of files in dist/ directory
$(PYTHON) scripts/internal/print_hashes.py dist/

print-sysinfo: ## Prints system info
$(PYTHON) -c "from psutil.tests import print_sysinfo; print_sysinfo()"

# ===================================================================
# Misc
# ===================================================================
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -36,14 +36,14 @@ init:

install:
- "%WITH_COMPILER% %PYTHON%/python.exe -m pip --version"
- "%WITH_COMPILER% %PYTHON%/python.exe -m pip install --upgrade --user setuptools pip"
- "%WITH_COMPILER% %PYTHON%/python.exe scripts/internal/winmake.py setup-dev-env"
- "%WITH_COMPILER% %PYTHON%/python.exe -m pip freeze"
- "%WITH_COMPILER% %PYTHON%/python.exe scripts/internal/winmake.py install"

build: off

test_script:
- "%WITH_COMPILER% %PYTHON%/python.exe scripts/internal/winmake.py print-sysinfo"
- "%WITH_COMPILER% %PYTHON%/python.exe scripts/internal/winmake.py test"
- "%WITH_COMPILER% %PYTHON%/python.exe scripts/internal/winmake.py test-memleaks"

2 changes: 1 addition & 1 deletion docs/DEVGUIDE.rst
Original file line number Diff line number Diff line change
@@ -44,7 +44,7 @@ Once you have a compiler installed run:

.. code-block:: bash

make test TSCRIPT=test_script.py # on UNIX
make test ARGS=test_script.py # on UNIX
make test test_script.py # on Windows

- Do not use ``sudo``. ``make install`` installs psutil as a limited user in
7 changes: 0 additions & 7 deletions make.bat
Original file line number Diff line number Diff line change
@@ -16,19 +16,12 @@ rem ...therefore it might not work on your Windows installation.
rem
rem To compile for a specific Python version run:
rem set PYTHON=C:\Python34\python.exe & make.bat build
rem
rem To use a different test script:
rem set TSCRIPT=foo.py & make.bat test
rem ==========================================================================

if "%PYTHON%" == "" (
set PYTHON=python
)

if "%TSCRIPT%" == "" (
set TSCRIPT=psutil\tests\runner.py
)

rem Needed to locate the .pypirc file and upload exes on PyPI.
set HOME=%USERPROFILE%
set PSUTIL_DEBUG=1
2 changes: 1 addition & 1 deletion psutil/_psaix.py
Original file line number Diff line number Diff line change
@@ -349,7 +349,7 @@ def wrapper(self, *args, **kwargs):
class Process:
"""Wrapper class around underlying C implementation."""

__slots__ = ["pid", "_name", "_ppid", "_procfs_path", "_cache"]
__slots__ = ["_cache", "_name", "_ppid", "_procfs_path", "pid"]

def __init__(self, pid):
self.pid = pid
2 changes: 1 addition & 1 deletion psutil/_psbsd.py
Original file line number Diff line number Diff line change
@@ -640,7 +640,7 @@ def wrap_exceptions_procfs(inst):
class Process:
"""Wrapper class around underlying C implementation."""

__slots__ = ["pid", "_name", "_ppid", "_cache"]
__slots__ = ["_cache", "_name", "_ppid", "pid"]

def __init__(self, pid):
self.pid = pid
2 changes: 1 addition & 1 deletion psutil/_pslinux.py
Original file line number Diff line number Diff line change
@@ -1732,7 +1732,7 @@ def wrapper(self, *args, **kwargs):
class Process:
"""Linux process implementation."""

__slots__ = ["pid", "_name", "_ppid", "_procfs_path", "_cache"]
__slots__ = ["_cache", "_name", "_ppid", "_procfs_path", "pid"]

def __init__(self, pid):
self.pid = pid
2 changes: 1 addition & 1 deletion psutil/_psosx.py
Original file line number Diff line number Diff line change
@@ -361,7 +361,7 @@ def wrapper(self, *args, **kwargs):
class Process:
"""Wrapper class around underlying C implementation."""

__slots__ = ["pid", "_name", "_ppid", "_cache"]
__slots__ = ["_cache", "_name", "_ppid", "pid"]

def __init__(self, pid):
self.pid = pid
2 changes: 1 addition & 1 deletion psutil/_pssunos.py
Original file line number Diff line number Diff line change
@@ -387,7 +387,7 @@ def wrapper(self, *args, **kwargs):
class Process:
"""Wrapper class around underlying C implementation."""

__slots__ = ["pid", "_name", "_ppid", "_procfs_path", "_cache"]
__slots__ = ["_cache", "_name", "_ppid", "_procfs_path", "pid"]

def __init__(self, pid):
self.pid = pid
2 changes: 1 addition & 1 deletion psutil/_pswindows.py
Original file line number Diff line number Diff line change
@@ -762,7 +762,7 @@ def wrapper(self, *args, **kwargs):
class Process:
"""Wrapper class around underlying C implementation."""

__slots__ = ["pid", "_name", "_ppid", "_cache"]
__slots__ = ["_cache", "_name", "_ppid", "pid"]

def __init__(self, pid):
self.pid = pid
Loading
Loading