]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148932: Docs / `profiling.sampling` Windows limitations (#150272)
authorEduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
Sun, 24 May 2026 11:54:36 +0000 (04:54 -0700)
committerGitHub <noreply@github.com>
Sun, 24 May 2026 11:54:36 +0000 (12:54 +0100)
Doc/library/profiling.sampling.rst

index aeb1a429b58515ac4deb5f153f309aae4b33c0da..39b6ea4e31cde7293de676af4f819ba35f6a5ed3 100644 (file)
@@ -387,6 +387,11 @@ This requires one of:
 On Windows, the profiler requires administrative privileges or the
 ``SeDebugPrivilege`` privilege to read another process's memory.
 
+*Note*: On Windows, ``python -m profiling.sampling`` fails inside a virtual
+environment because the venv's ``python.exe`` is just a launcher shim that
+re-executes the base interpreter as a child process. The shim itself isn't
+a Python process and has no ``PyRuntime`` section to attach to. Instead,
+run it from the global Python installation.
 
 Version compatibility
 ---------------------