#9433: File locking broken on AFP mounts
-------------------------------------+-------------------------------------
     Reporter:  rndblnch             |                    Owner:  anonymous
         Type:  Bug                  |                   Status:  new
    Component:  File                 |                  Version:  1.1
  uploads/storage                    |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:                       |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by rndblnch):

 Replying to [comment:9 lrekucki]:
 > The patch doesn't apply (needs a very simple cleanup)
 i will do that

 > but more importantly this needs checking if it's still a problem on OS X
 10.7, etc.

 yes it is, see the example below where /tmp is local and
 /Volumes/blanch/temp is distant volume (from a MacOSX 10.8 box) mounted
 via afp on the local box (also running 10.8)

 {{{
 [esperluet:Shared/src/Django-1.5a1] blanch% python
 Python 2.7.2 (default, Jun 20 2012, 16:23:33)
 [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on
 darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import django
 >>> django.get_version()
 u'1.5a1'
 >>> from django.core.files import locks
 >>> f = open("/tmp/test.txt", "w") # local file
 >>> locks.lock(f, locks.LOCK_EX)
 >>> f = open("/Volumes/blanch/temp/test.txt", "w") # distant file mounted
 via afp
 >>> locks.lock(f, locks.LOCK_EX)
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "django/core/files/locks.py", line 56, in lock
     fcntl.lockf(fd(file), flags)
 IOError: [Errno 45] Operation not supported
 >>>
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/9433#comment:11>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to