[issue37491] IndexError in get_bare_quoted_string

2019-08-01 Thread R. David Murray
Change by R. David Murray : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37491] IndexError in get_bare_quoted_string

2019-08-01 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: @barry the 3 PR have been merged, do you think we could close this issue? Thank you -- nosy: +matrixise ___ Python tracker ___

[issue37491] IndexError in get_bare_quoted_string

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14614 pull_request: https://github.com/python/cpython/pull/14819 ___ Python tracker ___

[issue37491] IndexError in get_bare_quoted_string

2019-07-17 Thread miss-islington
Change by miss-islington : -- pull_requests: +14613 pull_request: https://github.com/python/cpython/pull/14820 ___ Python tracker ___

[issue37491] IndexError in get_bare_quoted_string

2019-07-17 Thread Abhilash Raj
Change by Abhilash Raj : -- pull_requests: +14607 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14813 ___ Python tracker ___

[issue37491] IndexError in get_bare_quoted_string

2019-07-09 Thread Abhilash Raj
Abhilash Raj added the comment: I just wanted to report before I forgot and hence missed some details, turns out the bug report was slightly wrong too. The testcase I provided wasn't right. Here is the right test case to reproduce the exception with master: # bpo_37491.py from email.parser

[issue37491] IndexError in get_bare_quoted_string

2019-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: Also, quotes should be attributed to a file and patch snipped should indicate the target. As for the bug, the author(s) of the expressions "value[1:]" and "value[0]" presumably *expected* value to initially have length 2 so that it would be be non-empty

[issue37491] IndexError in get_bare_quoted_string

2019-07-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: To avoid such questions, bug reports should contain exception messages and usually at least some of the tracebacks. >>> ''[0] Traceback (most recent call last): File "", line 1, in ''[0] IndexError: string index out of range >>> x=None >>> x[0]

[issue37491] IndexError in get_bare_quoted_string

2019-07-09 Thread Abhilash Raj
Abhilash Raj added the comment: Thanks for the explanation Terry! In this case, value becomes None (I think), which causes the IndexError. -- ___ Python tracker ___

[issue37491] IndexError in get_bare_quoted_string

2019-07-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: An Python exception is not a crash; a crash is the program stopping without an exception and proper cleanup. If s is a string (rather than, for instance, None), s and (s[0] == char) is equivalent to s[0:1] == char -- nosy: +terry.reedy type: crash

[issue37491] IndexError in get_bare_quoted_string

2019-07-03 Thread Abhilash Raj
New submission from Abhilash Raj : from email.parser import BytesParser, Parser from email.policy import default payload = 'Content-Type:x;\x1b*="\'G\'\\"' msg = Parser(policy=default).parsestr(payload) print(msg.get('content-type')) When trying to review PR for BPO 37461, I found