fix: match new extension discovery with changes to classic discovery (#2640)

* fix: match new extension discovery with changes to classic discovery

Followup to #2638 - this was fixed in 2.6.0, but only for classic Python

* fix: followup to avoid warnings
2 files changed