Hello community, here is the log from the commit of package python-six for openSUSE:Factory checked in at 2015-10-19 22:47:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-six (Old) and /work/SRC/openSUSE:Factory/.python-six.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-six" Changes: -------- --- /work/SRC/openSUSE:Factory/python-six/python-six-doc.changes 2015-04-22 01:14:40.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-six.new/python-six-doc.changes 2015-10-19 22:47:17.000000000 +0200 @@ -1,0 +2,11 @@ +Fri Oct 9 08:17:49 UTC 2015 - mci...@suse.cz + +- Update to 1.10.0: + - Issue #122: Improve the performance of `six.int2byte` on Python 3. + - Pull request #55 and issue #99: Don't add the `winreg` module to `six.moves` + on non-Windows platforms. + - Pull request #60 and issue #108: Add `six.moves.getcwd` and + `six.moves.getcwdu`. + - Pull request #64: Add `create_unbound_method` to create unbound methods. + +------------------------------------------------------------------- python-six.changes: same change Old: ---- six-1.9.0.tar.gz New: ---- six-1.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-six-doc.spec ++++++ --- /var/tmp/diff_new_pack.Sd0y1X/_old 2015-10-19 22:47:18.000000000 +0200 +++ /var/tmp/diff_new_pack.Sd0y1X/_new 2015-10-19 22:47:18.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-six-doc -Version: 1.9.0 +Version: 1.10.0 Release: 0 Url: http://pypi.python.org/pypi/six/ Summary: Python 2 and 3 compatibility utilities ++++++ python-six.spec ++++++ --- /var/tmp/diff_new_pack.Sd0y1X/_old 2015-10-19 22:47:18.000000000 +0200 +++ /var/tmp/diff_new_pack.Sd0y1X/_new 2015-10-19 22:47:18.000000000 +0200 @@ -21,7 +21,7 @@ %bcond_with test Name: python-six -Version: 1.9.0 +Version: 1.10.0 Release: 0 Url: http://pypi.python.org/pypi/six/ Summary: Python 2 and 3 compatibility utilities ++++++ six-1.9.0.tar.gz -> six-1.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/CHANGES new/six-1.10.0/CHANGES --- old/six-1.9.0/CHANGES 2015-01-02 17:34:00.000000000 +0100 +++ new/six-1.10.0/CHANGES 2015-10-07 05:13:01.000000000 +0200 @@ -3,6 +3,19 @@ This file lists the changes in each six version. +1.10.0 +------ + +- Issue #122: Improve the performance of `six.int2byte` on Python 3. + +- Pull request #55 and issue #99: Don't add the `winreg` module to `six.moves` + on non-Windows platforms. + +- Pull request #60 and issue #108: Add `six.moves.getcwd` and + `six.moves.getcwdu`. + +- Pull request #64: Add `create_unbound_method` to create unbound methods. + 1.9.0 ----- @@ -26,6 +39,9 @@ - Pull request #51: Add `six.view(keys|values|itmes)`, which provide dictionary views on Python 2.7+. +- Issue #112: `six.moves.reload_module` now uses the importlib module on + Python 3.4+. + 1.8.0 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/PKG-INFO new/six-1.10.0/PKG-INFO --- old/six-1.9.0/PKG-INFO 2015-01-02 17:37:53.000000000 +0100 +++ new/six-1.10.0/PKG-INFO 2015-10-07 05:17:36.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: six -Version: 1.9.0 +Version: 1.10.0 Summary: Python 2 and 3 compatibility utilities Home-page: http://pypi.python.org/pypi/six/ Author: Benjamin Peterson @@ -11,17 +11,17 @@ writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided. - Six supports every Python version since 2.5. It is contained in only one Python + Six supports every Python version since 2.6. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.) - Online documentation is at http://pythonhosted.org/six/. + Online documentation is at https://pythonhosted.org/six/. Bugs can be reported to https://bitbucket.org/gutworth/six. The code can also be found there. For questions about six or porting in general, email the python-porting mailing - list: http://mail.python.org/mailman/listinfo/python-porting + list: https://mail.python.org/mailman/listinfo/python-porting Platform: UNKNOWN Classifier: Programming Language :: Python :: 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/README new/six-1.10.0/README --- old/six-1.9.0/README 2014-12-09 16:41:48.000000000 +0100 +++ new/six-1.10.0/README 2015-04-30 20:10:14.000000000 +0200 @@ -3,14 +3,14 @@ writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided. -Six supports every Python version since 2.5. It is contained in only one Python +Six supports every Python version since 2.6. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.) -Online documentation is at http://pythonhosted.org/six/. +Online documentation is at https://pythonhosted.org/six/. Bugs can be reported to https://bitbucket.org/gutworth/six. The code can also be found there. For questions about six or porting in general, email the python-porting mailing -list: http://mail.python.org/mailman/listinfo/python-porting +list: https://mail.python.org/mailman/listinfo/python-porting diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/documentation/index.rst new/six-1.10.0/documentation/index.rst --- old/six-1.9.0/documentation/index.rst 2015-01-02 17:11:56.000000000 +0100 +++ new/six-1.10.0/documentation/index.rst 2015-10-07 05:05:52.000000000 +0200 @@ -232,6 +232,13 @@ requires the *obj*'s class to be passed. +.. function:: create_unbound_method(func, cls) + + Return an unbound method object wrapping *func*. In Python 2, this will + return a :func:`py2:types.MethodType` object. In Python 3, unbound methods + do not exist and this wrapper will simply return *func*. + + .. class:: Iterator A class for making portable iterators. The intention is that it be subclassed @@ -383,7 +390,7 @@ .. note:: In Python 3.3, the ``u`` prefix has been reintroduced. Code that only - supports Python 3 versions greater than 3.3 thus does not need + supports Python 3 versions of 3.3 and higher thus does not need :func:`u`. .. note:: @@ -570,6 +577,10 @@ +------------------------------+-------------------------------------+-------------------------------------+ | ``filterfalse`` | :func:`py2:itertools.ifilterfalse` | :func:`py3:itertools.filterfalse` | +------------------------------+-------------------------------------+-------------------------------------+ +| ``getcwd`` | :func:`py2:os.getcwdu` | :func:`py3:os.getcwd` | ++------------------------------+-------------------------------------+-------------------------------------+ +| ``getcwdb`` | :func:`py2:os.getcwd` | :func:`py3:os.getcwdb` | ++------------------------------+-------------------------------------+-------------------------------------+ | ``http_cookiejar`` | :mod:`py2:cookielib` | :mod:`py3:http.cookiejar` | +------------------------------+-------------------------------------+-------------------------------------+ | ``http_cookies`` | :mod:`py2:Cookie` | :mod:`py3:http.cookies` | @@ -598,7 +609,9 @@ +------------------------------+-------------------------------------+-------------------------------------+ | ``reduce`` | :func:`py2:reduce` | :func:`py3:functools.reduce` | +------------------------------+-------------------------------------+-------------------------------------+ -| ``reload_module`` | :func:`py2:reload` | :func:`py3:imp.reload` | +| ``reload_module`` | :func:`py2:reload` | :func:`py3:imp.reload`, | +| | | :func:`py3:importlib.reload` | +| | | on Python 3.4+ | +------------------------------+-------------------------------------+-------------------------------------+ | ``reprlib`` | :mod:`py2:repr` | :mod:`py3:reprlib` | +------------------------------+-------------------------------------+-------------------------------------+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/setup.cfg new/six-1.10.0/setup.cfg --- old/six-1.9.0/setup.cfg 2015-01-02 17:37:53.000000000 +0100 +++ new/six-1.10.0/setup.cfg 2015-10-07 05:17:36.000000000 +0200 @@ -1,8 +1,22 @@ [wheel] universal = 1 +[flake8] +max-line-length = 100 +ignore = F821 + +[pytest] +minversion = 2.2.0 +pep8ignore = + documentation/*.py ALL + test_six.py ALL +flakes-ignore = + documentation/*.py ALL + test_six.py ALL + six.py UndefinedName + [egg_info] -tag_build = -tag_svn_revision = 0 tag_date = 0 +tag_svn_revision = 0 +tag_build = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/six.egg-info/PKG-INFO new/six-1.10.0/six.egg-info/PKG-INFO --- old/six-1.9.0/six.egg-info/PKG-INFO 2015-01-02 17:37:53.000000000 +0100 +++ new/six-1.10.0/six.egg-info/PKG-INFO 2015-10-07 05:17:36.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: six -Version: 1.9.0 +Version: 1.10.0 Summary: Python 2 and 3 compatibility utilities Home-page: http://pypi.python.org/pypi/six/ Author: Benjamin Peterson @@ -11,17 +11,17 @@ writing Python code that is compatible on both Python versions. See the documentation for more information on what is provided. - Six supports every Python version since 2.5. It is contained in only one Python + Six supports every Python version since 2.6. It is contained in only one Python file, so it can be easily copied into your project. (The copyright and license notice must be retained.) - Online documentation is at http://pythonhosted.org/six/. + Online documentation is at https://pythonhosted.org/six/. Bugs can be reported to https://bitbucket.org/gutworth/six. The code can also be found there. For questions about six or porting in general, email the python-porting mailing - list: http://mail.python.org/mailman/listinfo/python-porting + list: https://mail.python.org/mailman/listinfo/python-porting Platform: UNKNOWN Classifier: Programming Language :: Python :: 2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/six.py new/six-1.10.0/six.py --- old/six-1.9.0/six.py 2015-01-02 17:33:48.000000000 +0100 +++ new/six-1.10.0/six.py 2015-10-07 05:12:22.000000000 +0200 @@ -29,12 +29,13 @@ import types __author__ = "Benjamin Peterson <benja...@python.org>" -__version__ = "1.9.0" +__version__ = "1.10.0" # Useful for very coarse version differentiation. PY2 = sys.version_info[0] == 2 PY3 = sys.version_info[0] == 3 +PY34 = sys.version_info[0:2] >= (3, 4) if PY3: string_types = str, @@ -57,6 +58,7 @@ else: # It's possible to have sizeof(long) != sizeof(Py_ssize_t). class X(object): + def __len__(self): return 1 << 31 try: @@ -88,7 +90,7 @@ def __get__(self, obj, tp): result = self._resolve() - setattr(obj, self.name, result) # Invokes __set__. + setattr(obj, self.name, result) # Invokes __set__. try: # This is a bit ugly, but it avoids running this again by # removing this descriptor. @@ -160,12 +162,14 @@ class _SixMetaPathImporter(object): + """ A meta path importer to import six.moves and its submodules. This class implements a PEP302 finder and loader. It should be compatible with Python 2.5 and all existing versions of Python3 """ + def __init__(self, six_module_name): self.name = six_module_name self.known_modules = {} @@ -223,6 +227,7 @@ class _MovedItems(_LazyModule): + """Lazy loading of moved objects""" __path__ = [] # mark as package @@ -234,8 +239,10 @@ MovedAttribute("input", "__builtin__", "builtins", "raw_input", "input"), MovedAttribute("intern", "__builtin__", "sys"), MovedAttribute("map", "itertools", "builtins", "imap", "map"), + MovedAttribute("getcwd", "os", "os", "getcwdu", "getcwd"), + MovedAttribute("getcwdb", "os", "os", "getcwd", "getcwdb"), MovedAttribute("range", "__builtin__", "builtins", "xrange", "range"), - MovedAttribute("reload_module", "__builtin__", "imp", "reload"), + MovedAttribute("reload_module", "__builtin__", "importlib" if PY34 else "imp", "reload"), MovedAttribute("reduce", "__builtin__", "functools"), MovedAttribute("shlex_quote", "pipes", "shlex", "quote"), MovedAttribute("StringIO", "StringIO", "io"), @@ -245,7 +252,6 @@ MovedAttribute("xrange", "__builtin__", "builtins", "xrange", "range"), MovedAttribute("zip", "itertools", "builtins", "izip", "zip"), MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"), - MovedModule("builtins", "__builtin__"), MovedModule("configparser", "ConfigParser"), MovedModule("copyreg", "copy_reg"), @@ -292,8 +298,13 @@ MovedModule("urllib_robotparser", "robotparser", "urllib.robotparser"), MovedModule("xmlrpc_client", "xmlrpclib", "xmlrpc.client"), MovedModule("xmlrpc_server", "SimpleXMLRPCServer", "xmlrpc.server"), - MovedModule("winreg", "_winreg"), ] +# Add windows specific modules. +if sys.platform == "win32": + _moved_attributes += [ + MovedModule("winreg", "_winreg"), + ] + for attr in _moved_attributes: setattr(_MovedItems, attr.name, attr) if isinstance(attr, MovedModule): @@ -307,6 +318,7 @@ class Module_six_moves_urllib_parse(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_parse""" @@ -346,6 +358,7 @@ class Module_six_moves_urllib_error(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_error""" @@ -365,6 +378,7 @@ class Module_six_moves_urllib_request(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_request""" @@ -414,6 +428,7 @@ class Module_six_moves_urllib_response(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_response""" @@ -434,6 +449,7 @@ class Module_six_moves_urllib_robotparser(_LazyModule): + """Lazy loading of moved objects in six.moves.urllib_robotparser""" @@ -451,6 +467,7 @@ class Module_six_moves_urllib(types.ModuleType): + """Create a six.moves.urllib namespace that resembles the Python 3 namespace""" __path__ = [] # mark as package parse = _importer._get_module("moves.urllib_parse") @@ -521,6 +538,9 @@ create_bound_method = types.MethodType + def create_unbound_method(func, cls): + return func + Iterator = object else: def get_unbound_function(unbound): @@ -529,6 +549,9 @@ def create_bound_method(func, obj): return types.MethodType(func, obj, obj.__class__) + def create_unbound_method(func, cls): + return types.MethodType(func, None, cls) + class Iterator(object): def next(self): @@ -567,16 +590,16 @@ viewitems = operator.methodcaller("items") else: def iterkeys(d, **kw): - return iter(d.iterkeys(**kw)) + return d.iterkeys(**kw) def itervalues(d, **kw): - return iter(d.itervalues(**kw)) + return d.itervalues(**kw) def iteritems(d, **kw): - return iter(d.iteritems(**kw)) + return d.iteritems(**kw) def iterlists(d, **kw): - return iter(d.iterlists(**kw)) + return d.iterlists(**kw) viewkeys = operator.methodcaller("viewkeys") @@ -595,15 +618,13 @@ if PY3: def b(s): return s.encode("latin-1") + def u(s): return s unichr = chr - if sys.version_info[1] <= 1: - def int2byte(i): - return bytes((i,)) - else: - # This is about 2x faster than the implementation above on 3.2+ - int2byte = operator.methodcaller("to_bytes", 1, "big") + import struct + int2byte = struct.Struct(">B").pack + del struct byte2int = operator.itemgetter(0) indexbytes = operator.getitem iterbytes = iter @@ -611,18 +632,25 @@ StringIO = io.StringIO BytesIO = io.BytesIO _assertCountEqual = "assertCountEqual" - _assertRaisesRegex = "assertRaisesRegex" - _assertRegex = "assertRegex" + if sys.version_info[1] <= 1: + _assertRaisesRegex = "assertRaisesRegexp" + _assertRegex = "assertRegexpMatches" + else: + _assertRaisesRegex = "assertRaisesRegex" + _assertRegex = "assertRegex" else: def b(s): return s # Workaround for standalone backslash + def u(s): return unicode(s.replace(r'\\', r'\\\\'), "unicode_escape") unichr = unichr int2byte = chr + def byte2int(bs): return ord(bs[0]) + def indexbytes(buf, i): return ord(buf[i]) iterbytes = functools.partial(itertools.imap, ord) @@ -650,7 +678,6 @@ if PY3: exec_ = getattr(moves.builtins, "exec") - def reraise(tp, value, tb=None): if value is None: value = tp() @@ -671,7 +698,6 @@ _locs_ = _globs_ exec("""exec _code_ in _globs_, _locs_""") - exec_("""def reraise(tp, value, tb=None): raise tp, value, tb """) @@ -699,13 +725,14 @@ fp = kwargs.pop("file", sys.stdout) if fp is None: return + def write(data): if not isinstance(data, basestring): data = str(data) # If the file has an encoding, encode unicode with it. if (isinstance(fp, file) and - isinstance(data, unicode) and - fp.encoding is not None): + isinstance(data, unicode) and + fp.encoding is not None): errors = getattr(fp, "errors", None) if errors is None: errors = "strict" @@ -748,6 +775,7 @@ write(end) if sys.version_info[:2] < (3, 3): _print = print_ + def print_(*args, **kwargs): fp = kwargs.get("file", sys.stdout) flush = kwargs.pop("flush", False) @@ -768,12 +796,14 @@ else: wraps = functools.wraps + def with_metaclass(meta, *bases): """Create a base class with a metaclass.""" # This requires a bit of explanation: the basic idea is to make a dummy # metaclass for one level of class instantiation that replaces itself with # the actual metaclass. class metaclass(meta): + def __new__(cls, name, this_bases, d): return meta(name, bases, d) return type.__new__(metaclass, 'temporary_class', (), {}) @@ -830,7 +860,7 @@ # the six meta path importer, since the other six instance will have # inserted an importer with different class. if (type(importer).__name__ == "_SixMetaPathImporter" and - importer.name == __name__): + importer.name == __name__): del sys.meta_path[i] break del i, importer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/six-1.9.0/test_six.py new/six-1.10.0/test_six.py --- old/six-1.9.0/test_six.py 2015-01-02 17:07:03.000000000 +0100 +++ new/six-1.10.0/test_six.py 2015-03-21 15:15:30.000000000 +0100 @@ -390,7 +390,7 @@ monkeypatch.undo() -@py.test.mark.skipif(sys.version_info[:2] < (2, 7), +@py.test.mark.skipif("sys.version_info[:2] < (2, 7)", reason="view methods on dictionaries only available on 2.7+") def test_dictionary_views(): def stock_method_name(viewwhat): @@ -456,6 +456,20 @@ assert b() is x +def test_create_unbound_method(): + class X(object): + pass + + def f(self): + return self + u = six.create_unbound_method(f, X) + py.test.raises(TypeError, u) + if six.PY2: + assert isinstance(u, types.MethodType) + x = X() + assert f(x) is x + + if six.PY3: def test_b(): @@ -497,7 +511,7 @@ def test_int2byte(): assert six.int2byte(3) == six.b("\x03") - py.test.raises((OverflowError, ValueError), six.int2byte, 256) + py.test.raises(Exception, six.int2byte, 256) def test_byte2int(): @@ -799,7 +813,7 @@ assert type(MySlotsWeakref) is Meta -@py.test.mark.skipif("sys.version_info[:2] < (2, 7)") +@py.test.mark.skipif("sys.version_info[:2] < (2, 7) or sys.version_info[:2] in ((3, 0), (3, 1))") def test_assertCountEqual(): class TestAssertCountEqual(unittest.TestCase): def test(self):