python 3.10 does stricter type checking
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
anki (Debian) |
New
|
Unknown
|
|||
anki (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Confirmed
|
Undecided
|
Unassigned | ||
Kinetic |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
python 3.10 does stricter type checking and hence anki fails in some cases, for example it is no longer possible to access the preferences of a deck.
[steps to reproduce]
- install and start anki
- choose a deck and click on the gearwheel icon to choose options
- anki crashes with a type error
[regression potential]
Currently, the program crashes for the code-paths in question. The receiving functions expect to be handed an int and casting the parameters of the function calls to int ensures the correct type.
int does not round but truncates towards zero. There is a possibility that the program was written with the assumption that non-int values would be rounded to the nearest integer. It is my understanding that lrnFactor, easyBonus, lapMult and lrnCutoff are numbers to determine how soon flash cards will be shown again for learning. The impact from any "bug" in determining this should be fairly insignificant.
Code inspection was only cursory, though.
[further information]
https:/
https:/
https:/
I have provided a bug-fixed package for jammy in my stable PPA, the package should be usable in later releases, too.
description: | updated |
description: | updated |
Changed in anki (Debian): | |
status: | Unknown → New |
Hi Rolf! Thanks for taking the time to submit a patch for this.
Usually, if the package is in Debian Testing I like to see uploads there first. That being said, this package is not in Testing and it fixes a bug that crashes Anki otherwise, so I won't hesitate to upload this.
Please try to coordinate a fix in Debian, if possible.
Another thing I'll note is that we're working on landing Python 3.11 as the default for Lunar. Will this package require additional fixes for that transition?
Thanks!