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 martin.panter
Recipients BreamoreBoy, eric.araujo, exarkun, martin.panter
Date 2014-09-22.02:12:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1411351969.95.0.749948572031.issue4887@psf.upfronthosting.co.za>
In-reply-to
Content
I suspect the $PATH example is a bad example. On my Linux setup, my initial PATH value is a customized path. After popping it and calling system(), I see a simpler default path, which is probably re-initialized somewhere else.

I suspect there is no environ.pop() bug. Everthing works according the documentation if you use another environment variable:

$ TEST_VARIABLE=value python
Python 3.4.0 (default, Mar 17 2014, 23:20:09) 
[GCC 4.8.2 20140206 (prerelease)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system('echo "$TEST_VARIABLE"')
value
0
>>> os.environ.pop("TEST_VARIABLE")
'value'
>>> os.system('echo "$TEST_VARIABLE"')

0

The other point in this report, about synchronizing “os.environ” with the C APIs, is a duplicate of Issue 1159.
History
Date User Action Args
2014-09-22 02:12:50martin.pantersetrecipients: + martin.panter, exarkun, eric.araujo, BreamoreBoy
2014-09-22 02:12:49martin.pantersetmessageid: <1411351969.95.0.749948572031.issue4887@psf.upfronthosting.co.za>
2014-09-22 02:12:49martin.panterlinkissue4887 messages
2014-09-22 02:12:49martin.pantercreate