[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-26 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.6

___
Python tracker 

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



[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 415cc1fa57710614ed3384d0cafc58ccf7adee8c by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad 
__name__ global. (GH-3717) (#3730)
https://github.com/python/cpython/commit/415cc1fa57710614ed3384d0cafc58ccf7adee8c


--

___
Python tracker 

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



[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Roundup Robot

Changes by Roundup Robot :


--
pull_requests: +3716

___
Python tracker 

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



[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:


New changeset 5d3e80021ab33360191eb0fbff34e0246c913884 by Serhiy Storchaka 
(Oren Milman) in branch 'master':
bpo-31566: Fix an assertion failure in _warnings.warn() in case of a bad 
__name__ global. (#3717)
https://github.com/python/cpython/commit/5d3e80021ab33360191eb0fbff34e0246c913884


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Oren Milman

Changes by Oren Milman :


--
keywords: +patch
pull_requests: +3701
stage:  -> patch review

___
Python tracker 

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



[issue31566] assertion failure in _warnings.warn() in case of a bad __name__ global

2017-09-24 Thread Oren Milman

New submission from Oren Milman:

The following code causes an assertion failure:
__name__ = b'foo'
__file__ = None
import _warnings
_warnings.warn('bar')

This is because setup_context() (in Python/_warnings.c) assumes that __name__
is a string, and so it passes it to _PyUnicode_EqualToASCIIString(), which
asserts it is a string.

--
components: Extension Modules
messages: 302829
nosy: Oren Milman
priority: normal
severity: normal
status: open
title: assertion failure in _warnings.warn() in case of a bad __name__ global
type: crash
versions: Python 3.7

___
Python tracker 

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