This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rpointel
Recipients rpointel
Date 2011-08-23.11:30:56
SpamBayes Score 0.042267654
Marked as misclassified No
Message-id <1314099057.22.0.804371186211.issue12827@psf.upfronthosting.co.za>
In-reply-to
Content
Hello,

/usr/tmp is not (used) on OpenBSD.

We have specific patch to do this, but I prefer to have this modification upstream.

2.5: http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.5/patches/patch-Lib_tempfile_py
2.7: http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python/2.7/patches/patch-Lib_tempfile_py
3.2: http://www.openbsd.org/cgi-bin/cvsweb/ports/lang/python3/3.2/patches/patch-Lib_tempfile_py

Is it possible to add a specific location to remove /usr/tmp of the dirlist?

Attached file is the patch to do this:
--- Lib/tempfile.py.orig        Thu Aug  4 17:05:24 2011
+++ Lib/tempfile.py     Tue Aug 23 12:55:40 2011
@@ -138,6 +138,8 @@
     # Failing that, try OS-specific locations.
     if _os.name == 'nt':
         dirlist.extend([ r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ])
+    elif _sys.platform.startswith('openbsd'):
+        dirlist.extend([ '/tmp', '/var/tmp' ])
     else:
         dirlist.extend([ '/tmp', '/var/tmp', '/usr/tmp' ])
, '/var/tmp' ])

Thanks,
Remi.
History
Date User Action Args
2011-08-23 11:30:57rpointelsetrecipients: + rpointel
2011-08-23 11:30:57rpointelsetmessageid: <1314099057.22.0.804371186211.issue12827@psf.upfronthosting.co.za>
2011-08-23 11:30:56rpointellinkissue12827 messages
2011-08-23 11:30:56rpointelcreate