-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'lockfile' is deprecated. #109
Comments
Can you provide a reference for it's deprecation? |
https://pypi.python.org/pypi/lockfile "This package is deprecated". |
@dsully Thanks for bringing this up. Did you run into an issue with lockfile that is fixed with fasteners? |
@ionrock: No, I ran into a dependency issue regarding 'pbr', which is declared as setup_requires for lockfile, but is actually used at package install time. I notice that there is no equivalent to lockfile's MkDirLockFile class as well. |
I attempted to implement this, but I ran into an issue where it doesn't appear to actually be locking so I punted on it for the time being. However handling this in a compatible way might be tricky. There are a few scenarios that someone could be in currently:
For the people in group 1, the main backwards compatibility concerns is whether or not cachecontrol wants to support compatibility with people running older and newer versions of the code at the same time. If it does not, then great, you can just switch to fasteners and not think about it. However if you do, then you'll need to be concerned about how to ensure that the existing lock file actually continues to cause a lock to happen, even with the new code. For the people in group 2, you either have to remove this parameter or continue to support pylockfile when this parameter is chosen. This one is easy because you either continue to use the old code, or you just stop supporting it. However if fasteners ever gets something like For the people in group 3, you don't have a lot of specific compatibility concerns as long as you ensure the lock API that you're using is compatible amongst both pylockfile and fasteners or you drop support for using specific pylockfile classes. Finally, across all of these groups of people, anytime you allow mixing of pylockfile and fasteners based locks you'll run into another possible problem which isn't super hard to work around but you'll need to be aware. For Lockfile the API is |
Ok, I've got fasteners to work now, however the backwards compatibility questions still apply. I went ahead and pushed my branch to #114 but it's unlikely I'm going to spend anytime working on it in the near future, at least without answers to the above questions, some of which will require playing around with both pylockfile and fasteners and seeing what happens if both of them attempt to lock the same file (but even then, that won't solve things like the SQLiteLock). |
There's also https://pypi.org/project/filelock that seems to have a similar API as lockfile. |
Are any news here? |
This is closed by #284 |
The 'lockfile' package required for file caching is deprecated.
https://pypi.python.org/pypi/fasteners is the recommended alternative.
The text was updated successfully, but these errors were encountered: