pyutils / line_profiler

Line-by-line profiling for Python
Other
2.74k stars 119 forks source link

CIBuildWheel Failure on OSX #258

Closed Erotemic closed 6 months ago

Erotemic commented 8 months ago

Recent dashboards on OSX are failing.

I don't think anything significant in the scripts themselves changed. I'm wondering if it is a cibuildwheel or pytest thing?

Any help on debugging this would be appreciated.

https://github.com/pyutils/line_profiler/actions/runs/7879877647/job/21500958831

Theelx commented 8 months ago

The specific error says: "ERROR ../../../../../../../../../Users/runner/work/line_profiler/line_profiler/::private::var - PermissionError: [Errno 13] Permission denied: '/private/var/agentx/init.py'" I think this could be for one of 2 reasons:

  1. Because the newest version of OSX/MacOS makes certain directories private by default. This can be tested by seeing if pinning the OSX version to one that used to work, still works.
  2. Because agentx may have updated something in their OSX config. If pinning the OSX version lower doesn't work, this is likely the culprit.

Unfortunately, I don't own an OSX machine so I don't think I can test this.

Erotemic commented 6 months ago

I believe this error is caused by pytest 8.x. I've mentioned it here: https://github.com/pytest-dev/pytest/issues/11904

In https://github.com/pyutils/line_profiler/pull/257 I update cibuildwheel to test with "strict" requirements, meaning that pytest will be pinned to 7.x at wheel build time.

Later at wheel test time, it does test with 8.x outside of the cibuildwheel environment, and that works, but inside cibuildwheel pytest seems to try to scan files it doesn't have permission to access.

Going to mark this resolved on our end, but hopefully pytest will get fixed in later versions.