WojciechMula / pyahocorasick

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

Get the temporary directory with the stdlib #156

Closed smancill closed 3 years ago

smancill commented 3 years ago

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

See NixOS/nixpkgs#146838 for context.

WojciechMula commented 3 years ago

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

smancill commented 3 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.