diff --git a/HISTORY.rst b/HISTORY.rst index 0c62d823c..30f4338a4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,9 +1,9 @@ *Bug tracker at https://github.com/giampaolo/psutil/issues* -5.9.7 (IN DEVELOPMENT) -====================== +5.9.7 +===== -XXXX-XX-XX +2023-12-17 **Enhancements** diff --git a/Makefile b/Makefile index 862c8b6c4..4e86550f6 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ PY3_DEPS = \ check-manifest \ concurrencytest \ coverage \ + packaging \ pylint \ pyperf \ pypinfo \ @@ -269,11 +270,13 @@ pre-release: ## Check if we're ready to produce a new release. ${MAKE} sdist ${MAKE} check-sdist ${MAKE} install - ${MAKE} download-wheels-github - ${MAKE} download-wheels-appveyor - ${MAKE} check-wheels - ${MAKE} print-hashes - ${MAKE} print-dist + $(PYTHON) -c \ + "import requests, sys; \ + from packaging.version import parse; \ + from psutil import __version__; \ + res = requests.get('https://pypi.org/pypi/psutil/json', timeout=5); \ + versions = sorted(res.json()['releases'], key=parse, reverse=True); \ + sys.exit('version %r already exists on PYPI' % __version__) if __version__ in versions else 0" $(PYTHON) -c \ "from psutil import __version__ as ver; \ doc = open('docs/index.rst').read(); \ @@ -281,6 +284,11 @@ pre-release: ## Check if we're ready to produce a new release. assert ver in doc, '%r not in docs/index.rst' % ver; \ assert ver in history, '%r not in HISTORY.rst' % ver; \ assert 'XXXX' not in history, 'XXXX in HISTORY.rst';" + ${MAKE} download-wheels-github + ${MAKE} download-wheels-appveyor + ${MAKE} check-wheels + ${MAKE} print-hashes + ${MAKE} print-dist release: ## Upload a new release. ${MAKE} check-sdist diff --git a/docs/index.rst b/docs/index.rst index 00a6f6006..cc0f7dcca 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2650,6 +2650,10 @@ PyPy3. Timeline ======== +- 2023-12-17: + `5.9.7 `__ - + `what's new `__ - + `diff `__ - 2023-10-15: `5.9.6 `__ - `what's new `__ - diff --git a/psutil/__init__.py b/psutil/__init__.py index 6a5a5eedf..0c702fc76 100644 --- a/psutil/__init__.py +++ b/psutil/__init__.py @@ -211,7 +211,7 @@ AF_LINK = _psplatform.AF_LINK __author__ = "Giampaolo Rodola'" -__version__ = "5.9.6" +__version__ = "5.9.7" version_info = tuple([int(num) for num in __version__.split('.')]) _timer = getattr(time, 'monotonic', time.time) @@ -1302,9 +1302,9 @@ def wait(self, timeout=None): # The valid attr names which can be processed by Process.as_dict(). _as_dict_attrnames = set( [x for x in dir(Process) if not x.startswith('_') and x not in - ['send_signal', 'suspend', 'resume', 'terminate', 'kill', 'wait', + {'send_signal', 'suspend', 'resume', 'terminate', 'kill', 'wait', 'is_running', 'as_dict', 'parent', 'parents', 'children', 'rlimit', - 'memory_info_ex', 'oneshot']]) + 'memory_info_ex', 'oneshot'}]) # ===================================================================== diff --git a/psutil/_psutil_common.c b/psutil/_psutil_common.c index d78c140ec..2f2edca26 100644 --- a/psutil/_psutil_common.c +++ b/psutil/_psutil_common.c @@ -20,7 +20,7 @@ int PSUTIL_DEBUG = 0; // --- Backward compatibility with missing Python.h APIs // ==================================================================== -// PyPy on Windows +// PyPy on Windows. Missing APIs added in PyPy 7.3.14. #if defined(PSUTIL_WINDOWS) && defined(PYPY_VERSION) #if !defined(PyErr_SetFromWindowsErrWithFilename) PyObject * diff --git a/scripts/internal/print_dist.py b/scripts/internal/print_dist.py index 978e50e2d..740951ac0 100755 --- a/scripts/internal/print_dist.py +++ b/scripts/internal/print_dist.py @@ -103,7 +103,7 @@ def main(): tot_files = 0 tot_size = 0 - templ = "%-100s %7s %7s %7s" + templ = "%-120s %7s %7s %7s" for platf, pkgs in groups.items(): ppn = "%s (%s)" % (platf, len(pkgs)) s = templ % (ppn, "size", "arch", "pyver")