I have been running a 12000 line pure python (core language with no extra packages) database program successfully on many machines (Windows,Debian Jessie,Debian Stretch, Ubuntu,Raspbian Jessie, Raspbian Stretch) for the last 7 years. I am absolutely confident in the code.
After latest upgrade of Raspbian Stretch I got a number of spurious errors related to string handling - I think after several hundred operations
Downgrading from kernel 4.14.98 to kernel 4.14.79 had not effect
After comparing the package lists before and after upgrade I discovered that raspi-copies-and-fills was upgraded from 0.6 to 0.10
Unable to easily revert to the 0.6 version I removed raspi-copies-and-fills 0.10 and my program works perfectly again.