jazzband / jazzband/pathlib2

resolve(strict=True) is not case-sensitive on Windows and Python 2.7

Open
#84 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
86
Forks
30
PR merge metrics
No merged PRs in 30d

Description

Good day ladies and gentlemen,

I have a problem with the `pathlib2.Path().resolve(strict=True)` and `python-2`.
This function is case-sensitive when running with `python-3` but not when run with `python-2`.

In the example in the screenshot I would expect `pathlib2.Path("C:/temp/garbage.txt").resolve(strict=True)` to return `C:/temp/gArbage.txt` instead of `C:/temp/garbage.txt`.

See screenshot (old screenshot where I tested `python-3` agains `pathlib`):
![grafik](https://user-images.githubusercontent.com/17123554/223987293-c21a6c8f-8bb7-4b7e-aef6-a3cd32a33c8c.png)

I tested on Windows 10 with `python-2.7.17`, `pathlib2-2.3.3` and `pathlib2-2.3.7.post1`.

I doublechecked `python-3.7.5` with `pathlib2-2.3.7.post1`. This will resolve correctly. So it is a `python-2` specific problem.

![grafik](https://user-images.githubusercontent.com/17123554/223995112-ab391d45-6a63-4251-97a1-8dfb42fbc5e2.png)

Thanks in advance for looking into it!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.