Closed effigies closed 6 months ago
Anything that's on the sys.meta_path
can/should have a find_spec
ever since Python 3.4 (2013). It not being there is deprecated since Python 3.10 (2021), and indeed six added this back in 2021.
boto is using a vendored six
version from 2018, so you most likely want to switch to boto3 instead which is actively maintained (as also recommended by boto, which hasn't been touched in the past 2 years).
Not sure if pytest should try to paint over this. If I'm not mistaken, this code was around since pytest 6 in 2020 (ab6dacf1d1e1ff0c5be70a3c5f48e63168168721), and I don't think the recent move (4dea18308bafafb0be0b2d07e02328051c3095d5) changed anything?
I don't disagree, but I have very limited control over when a dependency upgrades from boto to boto3. I am using this to encourage them to prioritize it. I haven't looked into what change in 8.1 caused this; possibly you removed a suppression of this error, but it does seem like a good idea to guard against a bad importer that some other library stuck into sys.meta_path
.
Happy to say that we're not going to "fix" this, and your other dependency should.
Pytest 8.1.1 on Ubuntu 22.04.
Observed in https://github.com/OpenNeuroOrg/openneuro/pull/3020, which attempted to auto-update dependencies.