New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix some unicode bugs on Python 2. #63
Conversation
…re/with_name_unicode
@ppentchev I think your patch only makes sense if we also do this: What test case triggered your original issue? |
Hi, Sorry, I pushed one additional commit into my branch before I saw that you closed #62 - take a look at ppentchev@7899f60 to see my test case. Of course, it is entirely possible that it is not complete or comprehensive, and it is absolutely, 100% possible that I do not yet fully understand the internal workings of pathlib2 - I completely defer to you on that. Still, the test_unicode.py file that I added in the above-mentioned commit seems to work without your _py2_fsencode() changes, but, again, it is entirely possible that I've missed something... come to think of it, yes, it's kind of obvious that I did not really test with characters that are outside the US-ASCII range! Aaaaaaargh! :) Thanks A LOT for actually taking the time to come up with a real test, not my lame excuse for one! :) G'luck, |
To clarify my comment above: it's true that I did not really test with characters outside the US-ASCII range. The reasons for that are twofold:
So..... yeah, once again, thanks a lot for 1. agreeing to reopen pathlib2, 2. taking the time to look into my code, and 3. actually going in and making a better fix yourself before I could get around to providing you with my test case! G'luck, |
Lovely, thanks for sharing! It's now part of the test suite. I'll run a few more tests and then cut a release on pypi. |
BTW, the |
Ah... and I just realized that carrying your own *.pyi file would help for the public API, but not for the internal functions - for those, you may want to add type hints by hand..... which might very well not be something you want to do right now. |
Sure, for now, I'm happy for typeshed to carry these. And many thanks for adding type checking to the library! ❤️ |
To reproduce some issues reported by @ppentchev.