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
FileCookieJar constructor don't accept PathLike #80224
Comments
FileCookieJar and it's subclasses don't accept Paths and DirEntrys. === import pathlib
from http.cookiejar import FileCookieJar
saved_cookies = pathlib.Path('my_cookies.txt')
jar = FileCookieJar(saved_cookies) === Results in: "ValueError: filename must be string-like". I also did quick and dirty patch which silently converts filename argument using os.fspath(). This way it won't break any existing code relying on FileCookieJar.filename being string. |
This seems like a good change to me. GitHub PRs are accepted please see https://devguide.python.org/ . Since this is an enhancement it can only go as part of Python 3.8 if accepted. |
sorry, but I have already worked on this issue :/ can I publish my PR? |
in fact, I have published my PR because I have already the tests and I have another approach for this issue. |
Oh sorry, I just thought that everybody has forgotten about this part of library. Nevermind my patch then, your work is certainly better, matrixise. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: