These changes were made to the name lookup algorithm:

Lookup for unqualified names is change from one pass to two pass. The first pass goes through the scopes but does not check import declarations. If not found, the second pass goes through the scopes and only looks at import declarations. Qualified name lookups, base class lookups, and WithStatement lookups no longer search import declarations, unless a module is the subject of the lookup, where the behavior remains as before.

This can break existing code, although reliance on the previous behavior tends to be unintended, and fixing it improves the comprehensibility of the code. Breakage tends to take the form of a symbol now being flagged as undefined. Fixing the breakage can be done by fully qualifying the name, or adding an alias to the import declaration.

The old lookup behavior can be restored using the -transition=import compiler switch. With -transition=checkimports the compiler will issue deprecation warnings when the old and new lookup find different symbols. You can combine both switches to use the old lookup and still get deprecation warnings.

See also Bugzilla 10378