summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2012-06-24 04:07:41 (GMT)
committerÉric Araujo <merwok@netwok.org>2012-06-24 04:07:41 (GMT)
commit859aad6a36262383b98ddd45fe3253a882b87ce8 (patch)
tree1cc50af4fc88c650fe997a2e72f5f26d92a1986c /Lib/test/regrtest.py
parentdc44f55cc9dc1d016799362c344958baab328ff4 (diff)
downloadcpython-859aad6a36262383b98ddd45fe3253a882b87ce8.zip
cpython-859aad6a36262383b98ddd45fe3253a882b87ce8.tar.gz
cpython-859aad6a36262383b98ddd45fe3253a882b87ce8.tar.bz2
Remove packaging from the standard library.
Distutils2 will live on on PyPI and be included in the stdlib when it is ready. See discussion starting at http://mail.python.org/pipermail/python-dev/2012-June/120430.html
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 8161b94..f528e63 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -172,8 +172,6 @@ import io
import json
import logging
import os
-import packaging.command
-import packaging.database
import platform
import random
import re
@@ -969,7 +967,6 @@ class saved_test_environment:
'sys.warnoptions', 'threading._dangling',
'multiprocessing.process._dangling',
'sysconfig._CONFIG_VARS', 'sysconfig._SCHEMES',
- 'packaging.command._COMMANDS', 'packaging.database_caches',
'support.TESTFN',
)
@@ -1075,44 +1072,6 @@ class saved_test_environment:
# Can't easily revert the logging state
pass
- def get_packaging_command__COMMANDS(self):
- # registry mapping command names to full dotted path or to the actual
- # class (resolved on demand); this check only looks at the names, not
- # the types of the values (IOW, if a value changes from a string
- # (dotted path) to a class it's okay but if a key (i.e. command class)
- # is added we complain)
- id_ = id(packaging.command._COMMANDS)
- keys = set(packaging.command._COMMANDS)
- return id_, keys
- def restore_packaging_command__COMMANDS(self, saved):
- # if command._COMMANDS was bound to another dict object, we can't
- # restore the previous object and contents, because the get_ method
- # above does not return the dict object (to ignore changes in values)
- for key in packaging.command._COMMANDS.keys() - saved[1]:
- del packaging.command._COMMANDS[key]
-
- def get_packaging_database_caches(self):
- # caching system used by the PEP 376 implementation
- # we have one boolean and four dictionaries, initially empty
- switch = packaging.database._cache_enabled
- saved = []
- for name in ('_cache_name', '_cache_name_egg',
- '_cache_path', '_cache_path_egg'):
- cache = getattr(packaging.database, name)
- saved.append((id(cache), cache, cache.copy()))
- return switch, saved
- def restore_packaging_database_caches(self, saved):
- switch, saved_caches = saved
- packaging.database._cache_enabled = switch
- for offset, name in enumerate(('_cache_name', '_cache_name_egg',
- '_cache_path', '_cache_path_egg')):
- _, cache, items = saved_caches[offset]
- # put back the same object in place
- setattr(packaging.database, name, cache)
- # now restore its items
- cache.clear()
- cache.update(items)
-
def get_sys_warnoptions(self):
return id(sys.warnoptions), sys.warnoptions, sys.warnoptions[:]
def restore_sys_warnoptions(self, saved_options):