Using the maven plugin with the default VirtualFileSystem leads to pathlib.Path.exists not working
Offen
@tstupka arbeitet bereits daran.
Seit 21.6.2024.
good first issue
- Vorherrschende Sprache
- Python
- Sterne
- 1.6k
- Forks
- 155
- Ø Merge
- 9 Std. 42 Min.
- Gemergte PRs (30 T.)
- 36
Beschreibung
This can be observed when using pyfiglet with the maven plugin. The code of pyfiglet has this
path = importlib.resources.files('pyfiglet.fonts').joinpath(fn)
if path.exists():
...
path.exists() uses a stat call, and we raise (correctly) OSError for non-existing paths. But pathlib checks that the errno of that error is in a list of allowed errors, and otherwise just throws the exception upwards. The OSError raised from the VirtualFileSystem is errno 5: EIO, it should probably be errno 2: ENOENT.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.