[issue38295] test_relative_path of test_py_compile fails on macOS 10.15 Catalina

Bo Anderson report at bugs.python.org
Tue Dec 17 05:59:08 EST 2019


Bo Anderson <mail at boanderson.me> added the comment:

Indeed. The issue can be trivially reproduced with:

```
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>

int main()
{
  char buf[255];
  printf("Current dir: %s\n", getcwd(buf, 255));

  int fd = open("../../tmp/test.txt", O_WRONLY | O_CREAT);
  if (fd < 0)
  {
    printf("errno %d\n", errno);
    return 1;
  }
  close(fd);
  printf("Success\n");
  return 0;
}
```

and running it in /private/tmp.

I filed FB7467762 at the end of November. Downstream projects meanwhile are working around the issue by resolving the file path before passing it into `open`.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38295>
_______________________________________


More information about the Python-bugs-list mailing list