[Python-checkins] cpython (3.3): Issue #18435: Replaced simple attribute container class Context with
vinay.sajip
python-checkins at python.org
Fri Jul 12 22:20:13 CEST 2013
http://hg.python.org/cpython/rev/fc340fcd43d2
changeset: 84591:fc340fcd43d2
branch: 3.3
parent: 84585:1641a03dbe7b
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Fri Jul 12 21:10:19 2013 +0100
summary:
Issue #18435: Replaced simple attribute container class Context with types.SimpleNamespace.
files:
Lib/venv/__init__.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/Lib/venv/__init__.py b/Lib/venv/__init__.py
--- a/Lib/venv/__init__.py
+++ b/Lib/venv/__init__.py
@@ -37,15 +37,10 @@
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 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list