mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Merge 3.2
This commit is contained in:
commit
c8e032006a
11 changed files with 37 additions and 16 deletions
|
@ -177,6 +177,7 @@ import packaging.database
|
|||
import platform
|
||||
import random
|
||||
import re
|
||||
import shutil
|
||||
import signal
|
||||
import sys
|
||||
import sysconfig
|
||||
|
@ -1042,6 +1043,23 @@ class saved_test_environment:
|
|||
asyncore.close_all(ignore_all=True)
|
||||
asyncore.socket_map.update(saved_map)
|
||||
|
||||
def get_shutil_archive_formats(self):
|
||||
# we could call get_archives_formats() but that only returns the
|
||||
# registry keys; we want to check the values too (the functions that
|
||||
# are registered)
|
||||
return shutil._ARCHIVE_FORMATS, shutil._ARCHIVE_FORMATS.copy()
|
||||
def restore_shutil_archive_formats(self, saved):
|
||||
shutil._ARCHIVE_FORMATS = saved[0]
|
||||
shutil._ARCHIVE_FORMATS.clear()
|
||||
shutil._ARCHIVE_FORMATS.update(saved[1])
|
||||
|
||||
def get_shutil_unpack_formats(self):
|
||||
return shutil._UNPACK_FORMATS, shutil._UNPACK_FORMATS.copy()
|
||||
def restore_shutil_unpack_formats(self, saved):
|
||||
shutil._UNPACK_FORMATS = saved[0]
|
||||
shutil._UNPACK_FORMATS.clear()
|
||||
shutil._UNPACK_FORMATS.update(saved[1])
|
||||
|
||||
def get_logging__handlers(self):
|
||||
# _handlers is a WeakValueDictionary
|
||||
return id(logging._handlers), logging._handlers, logging._handlers.copy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue