An easy library for Python file locking. It works on Windows, Linux, BSD and Unix systems and can even perform distributed locking. Naturally it also supports the with statement.
BSD-3-CLAUSE License
Published by wolph 4 months ago
fixed typo thanks to @harmstyler
Published by wolph 4 months ago
Properly propagating exceptions for NFS read-only lock issues and added support for being able to choose between lockf and flock thanks to @oliver-s-lee
Published by wolph about 1 year ago
Removed docs from build to fix #88 again
Published by wolph about 1 year ago
Removed docs from build to fix #88
Published by wolph about 1 year ago
Added support for Python 3.11 and 3.12 thanks to @hugovk. Made the package fully ruff, pyright and mypy compliant with automated testsing using both tox and Github actions
Published by wolph almost 2 years ago
Added fail_when_locked=False
support to BoundedSemaphore
thanks to @flaviens
Published by wolph about 2 years ago
Added fileno() support. Fixes #80 on posix systems
Published by wolph over 2 years ago
Added clear warning when locking in non-blocking mode without specifying either EXCLUSIVE or SHARED mode. Fixes #77
Published by wolph over 2 years ago
Fixed shared locks on Windows and simplified locking mechanism
Published by wolph over 2 years ago
Added warning when trying to use a timeout in blocking mode. And removed deprecated testing code and checks
Published by wolph about 3 years ago
commit 5590a941f915904846593745ec632d2e42259534
Merge: 4257ced 0806422
Author: Rick van Hattem [email protected]
Date: Fri Aug 27 15:44:10 2021 +0200
Merge tag 'v2.3.2' into develop
Added semver indicator and specified needed Python release thanks to @rayluo v2.3.2
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEFJMl/RWQTpxOuJ6V6BRE6c4faV0FAmEo7CoACgkQ6BRE6c4f
# aV3OJA/+O4ck6qU/Tf7yudYCYK+xh+dpZ4A3kfxX/Ed5K0Q/1CQhQee1hqO7p4NE
# aTQbLpjsIBrpNNKjgHkz7qKXFDLhjygji0R6YRE4dxXbEbEdC98NY907FMOEO0kM
# cKZt/3FFBpW/LgTYnJ12cIw5Cwh+kHGnRIyisdUZuMcp3sTpANhMZ9eySyhrdh5k
# T3eROMZ+b0qItGnJcMPcyGz/UkkyKWdFH9cN63wMq1doh3nETdib761h47p/hmBz
# FYuYb5rmA9O2OORLJ1D06Q5d/KxIWG5u4XNYoNQ3BWBIPf53bcqkvcnztu5IyJmd
# ojEW8WAMRPp5m4tdS1Y/DrsplQxU5A83VW7Hu0DGB3xv4y0vsO9TIlEPgKCMu/jG
# Je2RQOMJarmLNin4MYs8DCn4p97mQBOyX+HKr4wa2IV+0lJd0+TaTqtKAx626HMQ
# Dq/d58g2n+F0vTjr0+2VeJAhsIXdbgDyAC2NN8rS6DEInmLZgDnHmu57VomEeR7Q
# NcClcO5O2dEtjBLt1SnKkXpjc8VqU1yHMwCnI8KUo40Iq7hLrSBqBGbHP7Jp7rRz
# cWuNdRtRmWTjHnA9JeH327ScC6Ikzuv7rbPRZttHliuGMxxHSLKc48S2xL1k7Cq4
# 5edh7gW5VDvA6e5cevt9PAHLeQRECecWEASkd1ca8AUNkZ+dheE=
# =FmXv
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Aug 27 15:44:10 2021 CEST
# gpg: using RSA key 149325FD15904E9C4EB89E95E81444E9CE1F695D
# gpg: Good signature from "/Rick van Hattem <[email protected]>"/ [ultimate]
# gpg: aka "/[jpeg image of size 9662]"/ [ultimate]
Published by wolph about 3 years ago
commit d0eab0512b6640beca9f702f9ea6965ac9d686d5
Merge: 90d267a 248e450
Author: Rick van Hattem [email protected]
Date: Sat Aug 21 11:22:36 2021 +0200
Merge tag 'v2.3.1' into develop
Removed Python 2 classifier thanks to @rayluo v2.3.1
# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCgAdFiEEFJMl/RWQTpxOuJ6V6BRE6c4faV0FAmEgxdwACgkQ6BRE6c4f
# aV28wA/+I2QuCx+G+Dqqo6ofvaSVe41f9nkgq+ce8v0guaLXptsZ478uuRMPG+1E
# 6TnuIb4bi0nUJp0C4Qj5ET5554OoD+wEE9t77H8Z18pYMT3Jdm6ZqSAAN+Hrl50/
# AtcP9B3l32Bj9wViaoo/9xt4vL0EDBPqpDo6q/xB/0OPUfMcWAvYky3yIGs61rLQ
# nQIlTqEFjz12dHCh+0uBTJ5AUbKRGYDj5VMufXS56U5jSMcAaIgTRAtPjbJJHTAL
# xoVcO7zgz/4uoAUtEuw+VEqVYMWE88hxnl9jS/KNyZv+QANA0vkRsiEssRw5QFh+
# ftzxZ4PzXDv7WzwF82XVU2c7JwPX9PxlZhtwSRZ00q3Uit2fhTVRXPwbPQ7rb3Is
# tUcT0wxYuIarA53iQEgbfeyWz3Hhi6ayBJeap/OC9KfyXBZiic2tOTTwhOXkBGw6
# w3uJdj8ZDhOLJbtnOaJi51xwlmA861YJODkr3vP2HjjgepgCcQMK0nLPnYHUXYe/
# qKFC9Z1CArgA+1lic4pKC402gpGoG7tJgyldoagKsbDgbz5nTKt/BQLhjT3vPavJ
# bYTphyQ4H3WUkK6ac5M6gN4exSBACYaKWyL7DltPoBrP8CyOzFexTCkoUw9WYCwv
# 8ut8Y7cqN9Da++Xgnfj6sdrY9IuCpPQJZCWJ1NOhMAORN1sMw+g=
# =YDYj
# -----END PGP SIGNATURE-----
# gpg: Signature made Sat Aug 21 11:22:36 2021 CEST
# gpg: using RSA key 149325FD15904E9C4EB89E95E81444E9CE1F695D
# gpg: Good signature from "/Rick van Hattem <[email protected]>"/ [ultimate]
# gpg: aka "/[jpeg image of size 9662]"/ [ultimate]
Published by wolph over 3 years ago
commit 631352fbfd9f2b780a6d5f9da39646f4088910aa
Merge: e99c2d6 ec9f5da
Author: Rick van Hattem [email protected]
Date: Sun Mar 28 04:18:59 2021 +0200
Merge tag 'v2.3.0' into develop
enabled PEP 561 compliance v2.3.0
# gpg: Signature made Sun 28 Mar 04:18:59 2021 CEST
# gpg: using RSA key 149325FD15904E9C4EB89E95E81444E9CE1F695D
# gpg: Good signature from "/Rick van Hattem <[email protected]>"/ [ultimate]
# gpg: aka "/[jpeg image of size 9662]"/ [ultimate]
Published by wolph over 3 years ago
commit 638f67af428413ef6b2a45633b6e4f034b11f272
Merge: ad33bc1 061837e
Author: Rick van Hattem [email protected]
Date: Wed Feb 3 02:10:59 2021 +0100
Merge tag 'v2.2.1' into develop
removed debug statement v2.2.1
# gpg: Signature made Wed Feb 3 02:10:59 2021 CET
# gpg: using RSA key 149325FD15904E9C4EB89E95E81444E9CE1F695D
# gpg: Good signature from Rick van Hattem <[email protected]> [ultimate]
# gpg: aka [jpeg image of size 9662] [ultimate]
Published by wolph over 3 years ago
commit 3c5ea798a5bb8163a5deabc866934ff3d08b3191
Author: Rick van Hattem [email protected]
Date: Sat Jan 30 02:27:50 2021 +0100
updated travis location
Published by wolph almost 4 years ago
v1.0.1 Changed default for fail_when_locked to be more logical
Published by wolph almost 4 years ago
v0.6.1 Updated wheel
Published by wolph almost 4 years ago
v0.5.6 Added atomic_write utility function
Published by wolph almost 4 years ago
v2.1.0 Added Redis based distributed lock which gracefully handles connection loss and dying applications. Added full type hinting support. Fixed bug where the file handle was not always explicitly closed with errors
Published by wolph about 4 years ago
v2.0.0 Removed support for old Python versions. Versions 3.5 and above are supported. Added BoundedSemaphore class