Use file stem when parsing cached wheel names (#7773)

## Summary

I noticed that we were including `http` (the file extension) in the
platform tags when reading from the cache:

![Screenshot 2024-09-28 at 9 40
15 PM](https://github.com/user-attachments/assets/d80ed351-1257-42b5-8292-0b11a50c767d)

Probably harmless, but wrong.
This commit is contained in:
Charlie Marsh 2024-09-29 12:05:15 -04:00 committed by GitHub
parent 884b5a3c80
commit c415251aa2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,7 @@ impl CachedWheel {
let path = path.as_ref();
// Determine the wheel filename.
let filename = path.file_name()?.to_str()?;
let filename = path.file_stem()?.to_str()?;
let filename = WheelFilename::from_stem(filename).ok()?;
// Read the pointer.
@ -121,7 +121,7 @@ impl CachedWheel {
let path = path.as_ref();
// Determine the wheel filename.
let filename = path.file_name()?.to_str()?;
let filename = path.file_stem()?.to_str()?;
let filename = WheelFilename::from_stem(filename).ok()?;
// Read the pointer.