summaryrefslogtreecommitdiffstats
path: root/Lib/venv
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2013-07-12 20:13:01 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2013-07-12 20:13:01 (GMT)
commitad644e011f1ac9066ff03cc9d8407cb7301f31ca (patch)
treec16ab3666370dc743624f009470c264bbe4e15c3 /Lib/venv
parent62926eed680b0d926befa137bf184f5c0f6dbd34 (diff)
parentc07aa9e41f17c0821b811c52865a527785877287 (diff)
downloadcpython-ad644e011f1ac9066ff03cc9d8407cb7301f31ca.zip
cpython-ad644e011f1ac9066ff03cc9d8407cb7301f31ca.tar.gz
cpython-ad644e011f1ac9066ff03cc9d8407cb7301f31ca.tar.bz2
Closes #18435: Merged fix from 3.3.
Diffstat (limited to 'Lib/venv')
-rw-r--r--Lib/venv/__init__.py9
1 files changed, 2 insertions, 7 deletions
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
index ecdb68e..4adde5f 100644
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -37,15 +37,10 @@ try:
import threading
except ImportError:
threading = None
+import types
logger = logging.getLogger(__name__)
-class Context:
- """
- Holds information about a current venv creation/upgrade request.
- """
- pass
-
class EnvBuilder:
"""
@@ -116,7 +111,7 @@ class EnvBuilder:
if os.path.exists(env_dir) and self.clear:
self.clear_directory(env_dir)
- context = Context()
+ context = types.SimpleNamespace()
context.env_dir = env_dir
context.env_name = os.path.split(env_dir)[1]
context.prompt = '(%s) ' % context.env_name