kcc
kcc copied to clipboard
Fix program to work with new dependency versions
The script was crashing in two places due to changes in behaviour of two dependecies (pillow and slugify).
The crash concerning slugify
was caused by a moved __version__
variable, which in turn caused the script to fail during dependency checks.
The crash in PIL was due to a lambda that did not round the returned value to int, thus causing PIL to raise an exception (TypeError float object cannot be interpreted as an integer).
https://github.com/ciromattia/kcc/blob/master/requirements.txt https://github.com/ciromattia/kcc/blob/master/setup.py should be updated too in your pull request for consistency
slugify >= 3.0.0
Duplicate of https://github.com/ciromattia/kcc/pull/411 Duplicate of https://github.com/ciromattia/kcc/issues/410 Duplicate of #417
Pillow >= 8.4.0
Duplicate of #406
Actually, I tested the changes with the versions specified in requirements.txt on a conversion using c2e
and they seem to work fine.
Maybe we could leave the old versions as to not cut off platforms without access to the newest ones?
I would further test the code to make sure no other regressions have been introduced, but without unit tests in place its pretty difficult to check every possible execution path. Maybe someone with an in-depth knowledge of the codebase could answer me on that.
Also, I'm noticing some inconsistencies in the versions. For example the requirements file specifies a slugify version >=1.2.1 and <3.0.0, but this info does not match the dependency check inside the code (shared.py::dependencyCheck
, >=1.2.1) nor the dependencies listed in setup.py
.
Any reasons for that?
Also, I'm noticing some inconsistencies in the versions. For example the requirements file specifies a slugify version >=1.2.1 and <3.0.0, but this info does not match the dependency check inside the code (
shared.py::dependencyCheck
, >=1.2.1) nor the dependencies listed insetup.py
. Any reasons for that?
no reason, just an oversight I guess
https://github.com/ciromattia/kcc/pull/411/commits/4b3588dccd04e244bce12463b01a7cdf046f1f88
merged in #457
@bamless
Thanks a lot!