Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There is inconsistency in dependency management in the project. Some processes use
setup.py
with almost no version restrictions and some userequirements.txt
with exact versions (that is too tight).Workflow to build the package relies on direct invocation of
setup.py
, and that is deprecated.In that PR I address that two issues by replacing
setup.py
+setuptools
bypyproject.toml
+poetry
.Details/explanations of the changes
Required python wasn't be specified so I took it from
.github/workflows/ci.yaml
(meaning3.6+
)Dependency versions I took from the
requirements.txt
, but replaced==
for^
because it should be safe enough and not restrict user to outdated versions of the dependencies.Exact dependencies versions proven to work should be managed by poetry.lock file, that is created/updated on changing (adding, removing, updating) dependencies.
The only version restriction in
setup.py
was "pycryptodomex=>3.6.2" and I replaced it with "pycryptodomex^3.6.2" because I think it is safer.I removed
__version__
from theinit.py
because it would require to use some library like importlib.metadata (available from python 3.8) to get version from the package metadata and there could be different options depending on the python version. As I understand, the library by itself doesn't need that functionality and if someone who uses the library wants to get it's version he can use such a library instead ofpykeepass.__version__
.As it was used in the
make pypi
command, I made it upload all new releases to the PyPI instead of just current one. Probably it will be replaced bypoetry publish
in the future.Current (
1.7.1
) version ofpoetry
doesn't supportpython < 3.8
, andpoetry 1.1.13
is the last version withpython 3.6
support. So in thegithub CI
I usepoetry 1.1.13
for bothpython 3.6
and3.7
, so It will be fine to use it for use the library, but for development current version ofpoetry
expected.