From the project page (emphasis mine):
Note: This package is deprecated. It is highly preferred that instead of using this code base that instead fasteners or oslo.concurrency is used instead. For any questions or comments or further help needed please email openstack-dev and prefix your email subject with [oslo][pylockfile] (for a faster response).
Last update of lockfile was at Nov 25, 2015 (version 0.12.2).
Please consider using an alternative library.
This was also briefly mentioned in #4.
Thanks for you work on python-daemon. It is a great piece of software.
I've been happily using python-daemon without lockfile for years now. It wasn't until recently that I noticed the lockfile dependency. I only use DaemonContext. I guess that lockfile is not used for that.
DaemonContext
Maybe the lockfile dependency can be made optional depending on which features of python-daemon are in use?
Thanks for raising this issue.
You're correct that lockfile is deprecated by its maintainers. I have asked for a replacement which maintains the same functionality on all supported systems, without success.
lockfile
How would that be declared? To my knowledge, the PyPA standard formats allow only an absolute dependency (with requires). I don't know how to specify “to use the supported features of this library, you need lockfile or something equivalent” such that the Python packaging tools will understand.
requires
Thanks for looking at this issue and for the quick reply.
How would that be declared? To my knowledge, the PyPA standard formats allow only an absolute dependency (with requires).
I can't say for the PyPA standard as I'm not well-versed with it.
I do know that setuptools provides the extras_require keyword as a way to declare optional dependencies. See also [1] and [2].
setuptools
extras_require
I see that you are already using extras_require for tests.
Assume you move the lockfile dependency to extras_require as follows:
setup( name="python-daemon", extras_require={ 'runner': ["lockfile"] } )
Then say that my-project wants to use the DaemonRunner class from python-daemon. my-project would then declare its dependencies as follows:
my-project
DaemonRunner
python-daemon
setup( name="my-project", install_requires=["python-daemon[runner]"], ... )
Thanks again for taking your time to look at this issue.
~Frederik
@jameshilliard, thank you for suggesting some other libraries. I would be interested to see merge requests that adapt one (or more) of those libraries to support daemon.pidfile.
daemon.pidfile
Metadata Update from @bignose: - Issue tagged with: confirmed, help-wanted, more-info
One could use - https://pypi.org/project/pid/ - https://py-filelock.readthedocs.io/en/latest/index.html
As possible replacements
The first project even referes to this one.
It's possible to take into account the new PR to remove lockfile?