This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Oren Milman
Recipients Oren Milman
Date 2017-09-14.16:42:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505407330.91.0.814127825372.issue31471@psf.upfronthosting.co.za>
In-reply-to
Content
The following code causes an assertion failure on Windows:
class BadEnv(dict):
    keys = None

import subprocess

import sys

subprocess.Popen([sys.executable, "-c", "pass"], env=BadEnv())


this is because getenvironment() (in Modules/_winapi.c) calls PyMapping_Values()
immediately after calling PyMapping_Keys().
calling PyMapping_Values() ultimately leads to calling _PyObject_FastCallDict(),
which does 'assert(!PyErr_Occurred());'.
thus, in case of an error in PyMapping_Keys(), the assertion fails.
History
Date User Action Args
2017-09-14 16:42:10Oren Milmansetrecipients: + Oren Milman
2017-09-14 16:42:10Oren Milmansetmessageid: <1505407330.91.0.814127825372.issue31471@psf.upfronthosting.co.za>
2017-09-14 16:42:10Oren Milmanlinkissue31471 messages
2017-09-14 16:42:10Oren Milmancreate