pylint #22277 Fragile reimport warning false positives [validation pending]

The following examples demonstrate the problem:

== bad.py ==
from package import util as local_util
import someother
import util

== Reimport 'util' (imported line 3) ==

== good.py ==
from package import util as localutil
import someother
import util

== No (relevant) errors ==

Basically, the problem comes down to the non-deterministic dict order and the use of context.values() in the get_first_import() function. Changing context.values() => context.asList() fixes this problem.

priorityimportant
typebug
done in0.27.0
load0.500
load left0.000
closed by<not specified>