From: Vinay Sajip Date: Fri, 12 Jul 2013 20:10:19 +0000 (+0100) Subject: Issue #18435: Replaced simple attribute container class Context with types.SimpleName... X-Git-Tag: v3.4.0a1~229^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c07aa9e41f17c0821b811c52865a527785877287;p=thirdparty%2FPython%2Fcpython.git Issue #18435: Replaced simple attribute container class Context with types.SimpleNamespace. --- diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py index 392074793111..272a887216e5 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: """ @@ -108,7 +103,7 @@ class EnvBuilder: raise ValueError('Directory exists: %s' % env_dir) if os.path.exists(env_dir) and self.clear: shutil.rmtree(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