kcc icon indicating copy to clipboard operation
kcc copied to clipboard

Fix program to work with new dependency versions

Open bamless opened this issue 2 years ago • 4 comments

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).

bamless avatar May 28 '22 19:05 bamless

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

darodi avatar May 30 '22 19:05 darodi

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.

bamless avatar May 30 '22 20:05 bamless

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?

bamless avatar May 30 '22 20:05 bamless

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?

no reason, just an oversight I guess

https://github.com/ciromattia/kcc/pull/411/commits/4b3588dccd04e244bce12463b01a7cdf046f1f88

darodi avatar May 31 '22 11:05 darodi

merged in #457

darodi avatar Jan 14 '23 15:01 darodi

@bamless

Thanks a lot!

darodi avatar Jan 14 '23 15:01 darodi