Hello community,

here is the log from the commit of package python-immutables for 
openSUSE:Factory checked in at 2020-03-10 09:51:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-immutables (Old)
 and      /work/SRC/openSUSE:Factory/.python-immutables.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-immutables"

Tue Mar 10 09:51:12 2020 rev:3 rq:782830 version:0.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-immutables/python-immutables.changes      
2019-09-11 10:40:06.587223084 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-immutables.new.26092/python-immutables.changes
   2020-03-10 09:51:12.984019255 +0100
@@ -1,0 +2,8 @@
+Mon Mar  9 08:33:40 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 0.11:
+  * Python 3.8 fixes
+- Add one more py38 patch:
+  * py38.patch
+
+-------------------------------------------------------------------

Old:
----
  immutables-0.9.tar.gz

New:
----
  immutables-0.11.tar.gz
  py38.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-immutables.spec ++++++
--- /var/tmp/diff_new_pack.l0dfFn/_old  2020-03-10 09:51:14.276019916 +0100
+++ /var/tmp/diff_new_pack.l0dfFn/_new  2020-03-10 09:51:14.308019933 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-immutables
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,13 +19,13 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-immutables
-Version:        0.9
+Version:        0.11
 Release:        0
 Summary:        Immutable collections for Python
 License:        Apache-2.0
-Group:          Development/Languages/Python
 URL:            https://github.com/MagicStack/immutables
 Source:         
https://files.pythonhosted.org/packages/source/i/immutables/immutables-%{version}.tar.gz
+Patch0:         py38.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
@@ -37,6 +37,7 @@
 
 %prep
 %setup -q -n immutables-%{version}
+%patch0 -p1
 sed -i 's/\.system//' setup.py
 
 %build

++++++ immutables-0.9.tar.gz -> immutables-0.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/MANIFEST.in 
new/immutables-0.11/MANIFEST.in
--- old/immutables-0.9/MANIFEST.in      2018-12-13 22:51:45.000000000 +0100
+++ new/immutables-0.11/MANIFEST.in     2019-10-15 15:59:09.000000000 +0200
@@ -1,3 +1,4 @@
 recursive-include tests *.py
-recursive-include immutables *.py *.c *.h
+recursive-include immutables *.py *.c *.h *.pyi
 include LICENSE README.rst
+include immutables/py.typed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/PKG-INFO new/immutables-0.11/PKG-INFO
--- old/immutables-0.9/PKG-INFO 2018-12-13 22:52:21.000000000 +0100
+++ new/immutables-0.11/PKG-INFO        2019-10-15 15:59:44.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: immutables
-Version: 0.9
+Version: 0.11
 Summary: Immutable Collections
 Home-page: https://github.com/MagicStack/immutables
 Author: MagicStack Inc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/immutables/__init__.py 
new/immutables-0.11/immutables/__init__.py
--- old/immutables-0.9/immutables/__init__.py   2018-12-13 22:51:45.000000000 
+0100
+++ new/immutables-0.11/immutables/__init__.py  2019-10-15 15:59:09.000000000 
+0200
@@ -8,4 +8,4 @@
 
 
 __all__ = 'Map',
-__version__ = '0.9'
+__version__ = '0.11'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/immutables/_map.c 
new/immutables-0.11/immutables/_map.c
--- old/immutables-0.9/immutables/_map.c        2018-12-13 22:51:45.000000000 
+0100
+++ new/immutables-0.11/immutables/_map.c       2019-10-15 15:59:09.000000000 
+0200
@@ -3363,6 +3363,12 @@
     return tup;
 }
 
+static PyObject *
+map_py_class_getitem(PyObject *type, PyObject *item)
+{
+    Py_INCREF(type);
+    return type;
+}
 
 static PyMethodDef Map_methods[] = {
     {"set", (PyCFunction)map_py_set, METH_VARARGS, NULL},
@@ -3375,6 +3381,12 @@
     {"update", (PyCFunction)map_py_update, METH_VARARGS | METH_KEYWORDS, NULL},
     {"__reduce__", (PyCFunction)map_reduce, METH_NOARGS, NULL},
     {"__dump__", (PyCFunction)map_py_dump, METH_NOARGS, NULL},
+    {
+        "__class_getitem__",
+        (PyCFunction)map_py_class_getitem,
+        METH_O|METH_CLASS,
+        NULL
+    },
     {NULL, NULL}
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/immutables/_map.pyi 
new/immutables-0.11/immutables/_map.pyi
--- old/immutables-0.9/immutables/_map.pyi      1970-01-01 01:00:00.000000000 
+0100
+++ new/immutables-0.11/immutables/_map.pyi     2019-10-15 15:59:09.000000000 
+0200
@@ -0,0 +1,87 @@
+from typing import Any
+from typing import Generic
+from typing import Hashable
+from typing import Iterable
+from typing import Iterator
+from typing import Literal
+from typing import Mapping
+from typing import MutableMapping
+from typing import NoReturn
+from typing import Tuple
+from typing import Type
+from typing import TypeVar
+from typing import Union
+
+
+K = TypeVar('K', bound=Hashable)
+V = TypeVar('V', bound=Any)
+D = TypeVar('D', bound=Any)
+
+
+class BitmapNode: ...
+
+
+class MapKeys(Generic[K]):
+    def __init__(self, c: int, m: BitmapNode) -> None: ...
+    def __len__(self) -> int: ...
+    def __iter__(self) -> Iterator[K]: ...
+
+
+class MapValues(Generic[V]):
+    def __init__(self, c: int, m: BitmapNode) -> None: ...
+    def __len__(self) -> int: ...
+    def __iter__(self) -> Iterator[V]: ...
+
+
+class MapItems(Generic[K, V]):
+    def __init__(self, c: int, m: BitmapNode) -> None: ...
+    def __len__(self) -> int: ...
+    def __iter__(self) -> Iterator[Tuple[K, V]]: ...
+
+
+class Map(Mapping[K, V]):
+    def __init__(
+        self, col: Union[Mapping[K, V], Iterable[Tuple[K, V]]] = ..., **kw: V
+    ): ...
+    def __reduce__(self) -> NoReturn: ...
+    def __len__(self) -> int: ...
+    def __eq__(self, other: Any) -> bool: ...
+    def update(
+        self, col: Union[Mapping[K, V], Iterable[Tuple[K, V]]] = ..., **kw: V
+    ) -> Map[K, V]: ...
+    def mutate(self) -> MapMutation[K, V]: ...
+    def set(self, key: K, val: V) -> Map[K, V]: ...
+    def delete(self, key: K) -> Map[K, V]: ...
+    def get(self, key: K, default: D = ...) -> Union[V, D]: ...
+    def __getitem__(self, key: K) -> V: ...
+    def __contains__(self, key: object) -> bool: ...
+    def __iter__(self) -> Iterator[K]: ...
+    def keys(self) -> MapKeys[K]: ...
+    def values(self) -> MapValues[V]: ...
+    def items(self) -> MapItems[K, V]: ...
+    def __hash__(self) -> int: ...
+    def __dump__(self) -> str: ...
+    def __class_getitem__(cls, item: Any) -> Type[Map]: ...
+
+
+S = TypeVar('S', bound='MapMutation')
+
+
+class MapMutation(MutableMapping[K, V]):
+    def __init__(self, count: int, root: BitmapNode) -> None: ...
+    def set(self, key: K, val: V) -> None: ...
+    def __enter__(self: S) -> S: ...
+    def __exit__(self, *exc: Any) -> Literal[False]: ...
+    def __iter__(self) -> NoReturn: ...
+    def __delitem__(self, key: K) -> None: ...
+    def __setitem__(self, key: K, val: V) -> None: ...
+    def pop(self, __key: K, __default: D = ...) -> Union[V, D]: ...
+    def get(self, key: K, default: D = ...) -> Union[V, D]: ...
+    def __getitem__(self, key: K) -> V: ...
+    def __contains__(self, key: Any) -> bool: ...
+    def update(
+        self, col: Union[Mapping[K, V], Iterable[Tuple[K, V]]] = ..., **kw: V
+    ): ...
+    def finish(self) -> Map[K, V]: ...
+    def __len__(self) -> int: ...
+    def __eq__(self, other: Any) -> bool: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/immutables/map.py 
new/immutables-0.11/immutables/map.py
--- old/immutables-0.9/immutables/map.py        2018-12-13 22:51:45.000000000 
+0100
+++ new/immutables-0.11/immutables/map.py       2019-10-15 15:59:09.000000000 
+0200
@@ -630,6 +630,9 @@
         self.__root.dump(buf, 0)
         return '\n'.join(buf)
 
+    def __class_getitem__(cls, item):
+        return cls
+
 
 class MapMutation:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/immutables/py.typed 
new/immutables-0.11/immutables/py.typed
--- old/immutables-0.9/immutables/py.typed      1970-01-01 01:00:00.000000000 
+0100
+++ new/immutables-0.11/immutables/py.typed     2019-10-15 15:59:09.000000000 
+0200
@@ -0,0 +1 @@
+partial
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/immutables.egg-info/PKG-INFO 
new/immutables-0.11/immutables.egg-info/PKG-INFO
--- old/immutables-0.9/immutables.egg-info/PKG-INFO     2018-12-13 
22:52:21.000000000 +0100
+++ new/immutables-0.11/immutables.egg-info/PKG-INFO    2019-10-15 
15:59:44.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: immutables
-Version: 0.9
+Version: 0.11
 Summary: Immutable Collections
 Home-page: https://github.com/MagicStack/immutables
 Author: MagicStack Inc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/immutables.egg-info/SOURCES.txt 
new/immutables-0.11/immutables.egg-info/SOURCES.txt
--- old/immutables-0.9/immutables.egg-info/SOURCES.txt  2018-12-13 
22:52:21.000000000 +0100
+++ new/immutables-0.11/immutables.egg-info/SOURCES.txt 2019-10-15 
15:59:44.000000000 +0200
@@ -5,7 +5,9 @@
 immutables/__init__.py
 immutables/_map.c
 immutables/_map.h
+immutables/_map.pyi
 immutables/map.py
+immutables/py.typed
 immutables.egg-info/PKG-INFO
 immutables.egg-info/SOURCES.txt
 immutables.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/setup.py new/immutables-0.11/setup.py
--- old/immutables-0.9/setup.py 2018-12-13 22:51:45.000000000 +0100
+++ new/immutables-0.11/setup.py        2019-10-15 15:59:09.000000000 +0200
@@ -57,6 +57,7 @@
     url='https://github.com/MagicStack/immutables',
     license='Apache License, Version 2.0',
     packages=['immutables'],
+    package_data={"immutables": ["py.typed", "*.pyi"]},
     provides=['immutables'],
     include_package_data=True,
     ext_modules=ext_modules,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/immutables-0.9/tests/test_map.py 
new/immutables-0.11/tests/test_map.py
--- old/immutables-0.9/tests/test_map.py        2018-12-13 22:51:45.000000000 
+0100
+++ new/immutables-0.11/tests/test_map.py       2019-10-15 15:59:09.000000000 
+0200
@@ -2,6 +2,7 @@
 import gc
 import pickle
 import random
+import sys
 import unittest
 import weakref
 
@@ -1296,6 +1297,10 @@
         with self.assertRaisesRegex(TypeError, "can't pickle"):
             pickle.dumps(h.mutate())
 
+    @unittest.skipIf(sys.version_info < (3, 7, 0), "__class_getitem__ is not 
available")
+    def test_map_is_subscriptable(self):
+        self.assertIs(self.Map[int, str], self.Map)
+
 
 class PyMapTest(BaseMapTest, unittest.TestCase):
 

++++++ py38.patch ++++++
>From 2b52677fdde34b1c89bdf4411ef95bd1ed0f343d Mon Sep 17 00:00:00 2001
From: Bruno Oliveira <nicodde...@gmail.com>
Date: Sat, 2 Nov 2019 17:56:24 -0300
Subject: [PATCH] Add Python 3.8 support (#16)

Fix #15
---
 tests/test_map.py |  2 +-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/tests/test_map.py b/tests/test_map.py
index 8d629f84..0b464cf2 100644
--- a/tests/test_map.py
+++ b/tests/test_map.py
@@ -1294,7 +1294,7 @@ def test_map_pickle(self):
             self.assertTrue(isinstance(uh, self.Map))
             self.assertEqual(h, uh)
 
-        with self.assertRaisesRegex(TypeError, "can't pickle"):
+        with self.assertRaisesRegex(TypeError, "can('t|not) pickle"):
             pickle.dumps(h.mutate())
 
     @unittest.skipIf(sys.version_info < (3, 7, 0), "__class_getitem__ is not 
available")

Reply via email to