durusmail: durus-users: Durus 3.7 and Windows
Durus 3.7 and Windows
2007-08-08
2007-08-08
2007-08-08
2007-08-13
2007-08-14
2007-08-14
2007-08-14
2007-08-14
2007-08-15
2007-08-15
2007-08-15
2007-08-15
2007-08-15
Durus 3.7 and Windows
David K. Hess
2007-08-08
I collected up the various issues related to 3.7 for Windows that
popped up on the list into the following patch. Does this seem to
folks to be the changes necessary for 3.7 on Windows?

Thanks.

Dave

------
David K. Hess
dhess@fishsoftware.com


--- /cygdrive/c/Python25/Lib/site-packages/durus-3.7-py2.5-win32.egg/
durus/file.py   2007-08-07 21:40:25.592289600 +0200
+++ file.py     2007-08-07 22:01:01.963150400 +0200
@@ -2,11 +2,13 @@
$URL: svn+ssh://svn.mems-exchange.org/repos/trunk/durus/file.py $
$Id: file.py 29734 2007-04-13 22:25:18Z dbinger $
"""
-import os, os.path, fcntl
+import os, os.path
from os.path import exists
from tempfile import NamedTemporaryFile, _TemporaryFileWrapper
if os.name == 'nt':
      import win32con, win32file, pywintypes # http://sf.net/projects/
pywin32/
+else:
+    import fcntl
class File (object):
      """
--- /cygdrive/c/Python25/Lib/site-packages/durus-3.7-py2.5-win32.egg/
durus/file_storage.py   2007-08-07 21:40:25.592289600 +0200
+++ file_storage.py     2007-08-07 22:03:03.445281600 +0200
@@ -25,7 +25,7 @@
          # and by examining the prefix string in the file itself.
          # The first class in the "implementations" list is the
default.
          implementations = [FileStorage2, ShelfStorage]
-        file = File(filename)
+        file = File(filename, readonly=readonly)
          storage_class = implementations[0]
          for implementation in implementations:
              if implementation.has_format(file):
--- /cygdrive/c/Python25/Lib/site-packages/durus-3.7-py2.5-win32.egg/
durus/storage_server.py 2007-08-07 21:40:25.612318400 +0200
+++ storage_server.py   2007-08-07 22:02:15.602763200 +0200
@@ -8,10 +8,14 @@
from durus.serialize import extract_class_name, split_oids
from durus.utils import int4_to_str, str_to_int4, str_to_int8, read,
write
from durus.utils import read_int4, read_int4_str, write_int4_str
-from grp import getgrnam, getgrgid
-from os import unlink, stat, chown, geteuid, getegid, umask, getpid
+
+import os
+if os.name != 'nt':
+    from grp import getgrnam, getgrgid
+    from os import unlink, stat, chown, geteuid, getegid, umask, getpid
+    from pwd import getpwnam, getpwuid
+
from os.path import exists
-from pwd import getpwnam, getpwuid
from time import sleep
import errno
import select



This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by reply email and
delete and destroy all copies of the original message.
reply