Comments (8)
@rayluo: sorry, indeed there is the typo here. I had to close it before closing the file.
Fixed the it in the description.
from portalocker.
@rayluo yes, version 1.6.0
indeed. It seems I forgot to do a git push
. It's added now :)
from portalocker.
Looking at the code my theory would be that it's not unlocking because self._fh
is not cleared. At least, that's the only difference I can see between their code and the one I'm using: https://github.com/WoLpH/portalocker/blob/e5e7d760488539857fdeff65231d40c2a1dcdd88/portalocker/utils.py#L165-L169
Having that said, I think the entire CrossPlatLock
could be replaced with portalocker.Lock
. They do roughly the same and I'm guessing that portalocker.Lock
has been tested by many more people :)
from portalocker.
Hi @olegver , in your investigation, did you have to "explicitly call portalocker.unlock
AFTER or BEFORE closing the file"? Your description in this thread and the other thread happens to be different. One of them must be a typo.
@wolph , based on the latest conversation on that thread, will you consider adding that explicitly call portalocker.unlock
into portalocker.Lock
? That alone would become a big selling point for us adopting your Lock
. :-)
from portalocker.
@wolph , to be clear, I was not suggesting you to include all the non-standard behavior into portalocker.Lock
. Instead, only one new line, portalocker.unlock(self._fh)
, is needed to be inserted into between line 167 and line 168 here.
Let me know if you prefer I create a PR for that.
CC: @olegver
from portalocker.
@rayluo no need, I'll create a new release right away :)
from portalocker.
The new release is online
from portalocker.
Thanks @wolph for prompt response!
Just want to double check, is this improvement released in version 1.6.0? I need to be sure, when/if we would choose to make a dependence on this version.
I deduce that version number from this process:
- There was no new version in Github release page or in tags
- The source code contains an old version number (which you might consider to change it soon, and then release a 1.6.1, otherwise
import portalocker; print(portalocker.__version__)
would probably display an incorrect version number. - There was a 1.6.0 released on PyPI just now
from portalocker.
Related Issues (20)
- Rlock - with limit? HOT 6
- What are the different locking mechanisms? HOT 2
- Fix `ResourceWarning` when `AlreadyLocked` HOT 6
- Declare PEP 561 compliance (type checking support) HOT 3
- Sorry for OT HOT 2
- Neither exclusive nor shared locks working as expected on Windows HOT 2
- Windows shared lock with Python 3 HOT 11
- redis submodule cannot be imported due to circular import HOT 4
- race condition for⦠file metadata? HOT 4
- Setting the DenyMode against a file HOT 2
- is lock reenterable? HOT 2
- distutils was depreacted in Python 3.10 HOT 2
- Timeout not working with SHARED flag HOT 4
- Better Examples Needed HOT 3
- LockException(OSError(22, 'Invalid argument')) when using NON_BLOCKING flag on Linux HOT 2
- DLL load failed while importing win32file HOT 1
- What is the actual license for this project? HOT 1
- fileno support HOT 2
- Mismatch between documentation and implementation HOT 3
- How to lock a file but be able to read it HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portalocker.