[issue38828] http.cookiejar handle cookie.version to be None

2019-11-19 Thread Alex


Alex  added the comment:

Hi, it looks like this needs a fix - I'll write a patch to fix up the handling 
and add some more testing to cover this scenario.

--
nosy: +alclarks

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38828] http.cookiejar handle cookie.version to be None

2019-11-17 Thread Kovid Goyal


Kovid Goyal  added the comment:

Here's a trivial script to reproduce:

from urllib.request import Request
from http.cookiejar import Cookie, CookieJar

jar = CookieJar()
jar.set_cookie(Cookie(
None, 'test', 'test',
None, False,
'.test.com', True, False,
'/', True,
False, None, False, None, None, None
))
r = Request('http://www.test.com')
jar.add_cookie_header(r)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38828] http.cookiejar handle cookie.version to be None

2019-11-17 Thread Kovid Goyal


Kovid Goyal  added the comment:

It's trivially True that it is a regression from python 2 since in python 2 
comparison to None is fine. Whether it ever worked in any python 3 version 
before 3.8 I'm not sure about.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38828] http.cookiejar handle cookie.version to be None

2019-11-17 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

You specifically mentioned Python 3.8 and I just wanted to understand the issue 
to see if it's a regression. I don't see any version related code changes in 
recent times. Hence this is not necessarily a regression in 3.8 unless there is 
a reproducible script. The code in set_ok_version for cookie.version to be None 
is not tested hence I assume there are no tests for the reported scenario that 
would be good to have. I have also changed the issue title accordingly.

--
title: cookiejar.py broken in 3.8 -> http.cookiejar handle cookie.version to be 
None

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com