[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel
Bar Harel added the comment: Patch done, ready for upload. No http experts for nosy, triage needed. -- type: -> behavior ___ Python tracker ___ __

[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel
Bar Harel added the comment: For reference, docs already state: "On encountering an invalid cookie, CookieError is raised, so if your cookie data comes from a browser you should always prepare for invalid data and catch CookieError on parsing." -- __

[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel
Bar Harel added the comment: The only issue I fear is breakage if people count on it silently ignoring errors. But then again it's inconsistent, and sometimes it will throw errors either way, so I still believe this issue should be addressed. -- _

[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel
Change by Bar Harel : -- pull_requests: +18412 pull_request: https://github.com/python/cpython/pull/19059 ___ Python tracker ___ ___

[issue40002] Cookie load error inconsistency

2020-03-18 Thread Aviram
Change by Aviram : -- keywords: +patch nosy: +aviramha nosy_count: 1.0 -> 2.0 pull_requests: +18411 stage: -> patch review pull_request: https://github.com/python/cpython/pull/19058 ___ Python tracker __

[issue40002] Cookie load error inconsistency

2020-03-18 Thread Bar Harel
New submission from Bar Harel : ATM loading cookies is inconsistent. If you encounter an invalid cookie, BaseCookie.load will sometimes raise CookieError and sometimes silently ignore the load: from http.cookies import SimpleCookie s = SimpleCookie() s.load("invalid\x00=cookie") # Silently ig