WojciechMula / pyahocorasick

Python module (C extension and plain python) implementing Aho-Corasick algorithm
BSD 3-Clause "New" or "Revised" License
914 stars 122 forks source link

Get the temporary directory with the stdlib #156

Closed smancill closed 2 years ago

smancill commented 2 years ago

Do not hardcode the temporary directory to /tmp, because it may not be writable.

See NixOS/nixpkgs#146838 for context.

WojciechMula commented 2 years ago

Oh my, how /tmp cannot be writable?... Wasn't aware of such a case, thanks a lot.

smancill commented 2 years ago

It's just the way the nixpkgs CI sandbox is configured for darwin (not sure how), but I think it is better not to hardcode /tmp anyway. gettempdir is more robust.