@ -3,7 +3,7 @@
# upstream vendored file that we're not going to modify on our own
# pylint: disable=undefined-variable
# Copyright (c) 2010-201 8 Benjamin Peterson
# Copyright (c) 2010-201 9 Benjamin Peterson
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@ -35,10 +35,11 @@ import types
# The following makes it easier for us to script updates of the bundled code. It is not part of
# upstream six
_BUNDLED_METADATA = { " pypi_name " : " six " , " version " : " 1.12.0 " }
# CANT_UPDATE due to py2.6 drop: https://github.com/benjaminp/six/pull/314
_BUNDLED_METADATA = { " pypi_name " : " six " , " version " : " 1.13.0 " }
__author__ = " Benjamin Peterson <benjamin@python.org> "
__version__ = " 1.1 2 .0"
__version__ = " 1.1 3 .0"
# Useful for very coarse version differentiation.
@ -265,8 +266,10 @@ _moved_attributes = [
MovedAttribute ( " zip_longest " , " itertools " , " itertools " , " izip_longest " , " zip_longest " ) ,
MovedModule ( " builtins " , " __builtin__ " ) ,
MovedModule ( " configparser " , " ConfigParser " ) ,
MovedModule ( " collections_abc " , " collections " , " collections.abc " if sys . version_info > = ( 3 , 3 ) else " collections " ) ,
MovedModule ( " copyreg " , " copy_reg " ) ,
MovedModule ( " dbm_gnu " , " gdbm " , " dbm.gnu " ) ,
MovedModule ( " dbm_ndbm " , " dbm " , " dbm.ndbm " ) ,
MovedModule ( " _dummy_thread " , " dummy_thread " , " _dummy_thread " ) ,
MovedModule ( " http_cookiejar " , " cookielib " , " http.cookiejar " ) ,
MovedModule ( " http_cookies " , " Cookie " , " http.cookies " ) ,
@ -648,6 +651,7 @@ if PY3:
import io
StringIO = io . StringIO
BytesIO = io . BytesIO
del io
_assertCountEqual = " assertCountEqual "
if sys . version_info [ 1 ] < = 1 :
_assertRaisesRegex = " assertRaisesRegexp "
@ -835,7 +839,15 @@ def with_metaclass(meta, *bases):
class metaclass ( type ) :
def __new__ ( cls , name , this_bases , d ) :
return meta ( name , bases , d )
if sys . version_info [ : 2 ] > = ( 3 , 7 ) :
# This version introduced PEP 560 that requires a bit
# of extra care (we mimic what is done by __build_class__).
resolved_bases = types . resolve_bases ( bases )
if resolved_bases is not bases :
d [ ' __orig_bases__ ' ] = bases
else :
resolved_bases = bases
return meta ( name , resolved_bases , d )
@classmethod
def __prepare__ ( cls , name , this_bases ) :