Title: os.environ was modified by test_packaging
Type: Stage:
Components: Tests Versions: Python 3.3
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: eric.araujo, nadeem.vawda, tarek, vstinner
Priority: normal Keywords:

Created on 2011-06-10 09:02 by vstinner, last changed 2013-01-03 01:59 by vstinner. This issue is now closed.

Messages (4)
msg138058 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-06-10 09:02
[ 20/356] test_packaging
Warning -- os.environ was modified by test_packaging

Seen on x86 Tiger buildbot:

There is also a resource warning:

.../Lib/packaging/pypi/ ResourceWarning: unclosed <socket.socket object, fd=14, family=2, type=1, proto=6>
  return wrapped(self, *args, **kwargs)
msg138099 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-06-10 16:14
If you don’t add the distutils2 component or our name to the nosy field, we can’t react quickly :)

I don’t know our networking code enough to track down the socket-related resource warnings; I’ll look into the os.environ issue.
msg138503 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2011-06-17 12:17
A patch fixing os.environ warning for

diff --git a/Lib/packaging/tests/ b/Lib/packaging/tests/
--- a/Lib/packaging/tests/
+++ b/Lib/packaging/tests/
@@ -20,7 +20,10 @@ def _get_source_filename():
 class BuildExtTestCase(support.TempdirManager,
+                       support.EnvironRestorer,
+    restore_environ = ['LIB', 'INCLUDE', 'PATH']
     def setUp(self):
         # Create a simple test environment
         # Note that we're making changes to sys.path

It is not enough.
msg178895 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2013-01-03 01:59
The packaging modules has been removed from Python, so I close the issue.
Date User Action Args
2013-01-03 01:59:21vstinnersetstatus: open -> closed
resolution: out of date
dependencies: - regrtest checks (os.environ, sys.path, etc.) are hard to use
messages: + msg178895
2011-06-17 12:17:51vstinnersetmessages: + msg138503
2011-06-10 16:19:18eric.araujosetdependencies: + regrtest checks (os.environ, sys.path, etc.) are hard to use
2011-06-10 16:14:19eric.araujosetassignee: eric.araujo

messages: + msg138099
nosy: + eric.araujo
2011-06-10 09:07:22nadeem.vawdasetnosy: + nadeem.vawda
2011-06-10 09:02:03vstinnercreate