Author gumnos
Recipients bignose, ethan.furman, georg.brandl, gumnos, serhiy.storchaka
Date 2017-05-01.02:48:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
As requested by Ben Finney[1], adding my use-case here.  I'm attempting to make a hard-link from "a" to "b", but if "b" exists, will fail with an EEXISTS.  I don't want to do

 # power-outage here means "b" is gone"a", "b")

I can do something like

  temp_name = tempfile.mktemp(dir=".")"a", temp_name)
    os.rename(temp_name, "b") # docs guarantee this is atomic
  except OSError:

but mktemp() is marked as deprecated.

I'm okay with the stray temp-file floating around to clean up in the event of power-loss after the but before the os.unlink() call, as is new info, not disposing of existing file-names

Date User Action Args
2017-05-01 02:48:06gumnossetrecipients: + gumnos, georg.brandl, ethan.furman, bignose, serhiy.storchaka
2017-05-01 02:48:05gumnossetmessageid: <>
2017-05-01 02:48:05gumnoslinkissue26362 messages
2017-05-01 02:48:05gumnoscreate