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 akira
Recipients Arfrever, akira, blueyed, ned.deily, serhiy.storchaka, vstinner
Date 2014-02-28.05:02:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1393563729.71.0.670628395628.issue20658@psf.upfronthosting.co.za>
In-reply-to
Content
Related: issue4926 "putenv() accepts names containing '=', return value of unsetenv() not checked" 

`os.environ.clear()` also fails if the environment contains names with `=`:

  >>> import os
  >>> os.environ['a=b'] = 'c'
  >>> os.environ.clear()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/.../lib/python3.4/_collections_abc.py", line 558, in clear
      self.popitem()
    File "/.../lib/python3.4/_collections_abc.py", line 551, in popitem
      del self[key]
    File "/.../lib/python3.4/os.py", line 662, in __delitem__
      self.unsetenv(encodedkey)
  OSError: [Errno 22] Invalid argument
History
Date User Action Args
2014-02-28 05:02:09akirasetrecipients: + akira, vstinner, blueyed, ned.deily, Arfrever, serhiy.storchaka
2014-02-28 05:02:09akirasetmessageid: <1393563729.71.0.670628395628.issue20658@psf.upfronthosting.co.za>
2014-02-28 05:02:09akiralinkissue20658 messages
2014-02-28 05:02:09akiracreate