classification
Title: os.environ was modified by test_packaging
Type: Stage:
Components: Tests Versions: Python 3.3
process
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:
http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2723/steps/test/logs/stdio

There is also a resource warning:

.../Lib/packaging/pypi/simple.py:86: 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 test_command_build_ext.py:

diff --git a/Lib/packaging/tests/test_command_build_ext.py b/Lib/packaging/tests/test_command_build_ext.py
--- a/Lib/packaging/tests/test_command_build_ext.py
+++ b/Lib/packaging/tests/test_command_build_ext.py
@@ -20,7 +20,10 @@ def _get_source_filename():
 
 class BuildExtTestCase(support.TempdirManager,
                        support.LoggingCatcher,
+                       support.EnvironRestorer,
                        unittest.TestCase):
+    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.
History
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