
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-02-19 18:26 bykapsh, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| cookiejar_straightforward_convert.patch | kapsh,2019-02-19 18:26 | one minute patch | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 11945 | merged | matrixise,2019-02-19 18:54 | |
| Messages (6) | |||
|---|---|---|---|
| msg335993 -(view) | Author: Alexander Kapshuna (kapsh) | Date: 2019-02-19 18:26 | |
FileCookieJar and it's subclasses don't accept Paths and DirEntrys.Minimal code to reproduce:===import pathlibfrom http.cookiejar import FileCookieJarsaved_cookies = pathlib.Path('my_cookies.txt')jar = FileCookieJar(saved_cookies)===Results in: "ValueError: filename must be string-like".Workaround is to convert Path explicitly or call load() which doesn't check for type, but it would be nice to see all APIs in standard library consistent.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. | |||
| msg335996 -(view) | Author: Karthikeyan Singaravelan (xtreak)*![]() | Date: 2019-02-19 18:44 | |
This seems like a good change to me. GitHub PRs are accepted please seehttps://devguide.python.org/ . Since this is an enhancement it can only go as part of Python 3.8 if accepted. | |||
| msg335997 -(view) | Author: Stéphane Wirtel (matrixise)*![]() | Date: 2019-02-19 18:52 | |
@xtreaksorry, but I have already worked on this issue :/can I publish my PR? | |||
| msg335998 -(view) | Author: Stéphane Wirtel (matrixise)*![]() | Date: 2019-02-19 18:55 | |
in fact, I have published my PR because I have already the tests and I have another approach for this issue. | |||
| msg336238 -(view) | Author: Alexander Kapshuna (kapsh) | Date: 2019-02-21 17:09 | |
Oh sorry, I just thought that everybody has forgotten about this part of library. Nevermind my patch then, your work is certainly better, matrixise. | |||
| msg336955 -(view) | Author: miss-islington (miss-islington) | Date: 2019-03-01 20:40 | |
New changeset4b219ce81ed04234648a4ce4f0cb0865818abb38 by Miss Islington (bot) (Stéphane Wirtel) in branch 'master':bpo-36043: FileCookieJar supports os.PathLike (GH-11945)https://github.com/python/cpython/commit/4b219ce81ed04234648a4ce4f0cb0865818abb38 | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:11 | admin | set | github: 80224 |
| 2019-03-01 20:41:46 | brett.cannon | set | status: open -> closed resolution: fixed stage: resolved |
| 2019-03-01 20:40:58 | miss-islington | set | nosy: +miss-islington messages: +msg336955 |
| 2019-02-21 17:09:12 | kapsh | set | messages: +msg336238 |
| 2019-02-19 18:55:40 | matrixise | set | messages: +msg335998 stage: patch review -> (no value) |
| 2019-02-19 18:54:44 | matrixise | set | stage: patch review pull_requests: +pull_request11969 |
| 2019-02-19 18:52:28 | matrixise | set | nosy: +matrixise messages: +msg335997 versions: + Python 3.6, Python 3.7 |
| 2019-02-19 18:44:58 | xtreak | set | nosy: +xtreak messages: +msg335996 versions: - Python 3.6, Python 3.7 |
| 2019-02-19 18:26:02 | kapsh | create | |