AFAICT, when profiling native extensions, py-spy includes symbols from third-party shared objects, but not from libpython (PyFoo_...) itself. This can be desirable sometimes, and was provided e.g. by the (now somewhat dormant?) vmprof profiler.
(An example application is profiling an extension that calls back into libpython and where these calls are suspected to take a significant amount of time.)