Open michaelweinold opened 1 month ago
Would it be possible to add a no-op for the FileLock variable on the Web Assembly platform here:
if os.name == "nt": FileLock = MsvcrtLock else: FileLock = FcntlLock
Otherwise, using whoosh in Pyodide will throw an error of the kind:
File /lib/python3.11/site-packages/whoosh/util/filelock.py:100, in FcntlLock.acquire(self, blocking) 97 flags = os.O_CREAT | os.O_WRONLY 98 self.fd = os.open(self.filename, flags) --> 100 mode = fcntl.LOCK_EX 101 if not blocking: 102 mode |= fcntl.LOCK_NB AttributeError: module 'fcntl' has no attribute 'LOCK_EX'
This was suggested here:
and is related to:
Hello! Thank you for filing an issue.
If this is a bug report, please include relevant logs to help us debug the problem.
Would it be possible to add a no-op for the FileLock variable on the Web Assembly platform here:
Otherwise, using whoosh in Pyodide will throw an error of the kind:
This was suggested here:
and is related to: