How to fix broken upgrade to 3.1

There is no reference to ‘classes.php’ anywhere in the WP codebase, either in the 3.1 branch or in trunk.

You probably have a modified version. Do a ‘svn stat’ and then a ‘svn diff’.