Hello community,

here is the log from the commit of package python-pycairo for openSUSE:Factory 
checked in at 2020-04-19 21:40:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pycairo (Old)
 and      /work/SRC/openSUSE:Factory/.python-pycairo.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pycairo"

Sun Apr 19 21:40:52 2020 rev:3 rq:785536 version:1.19.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pycairo/python-pycairo.changes    
2019-11-22 10:18:54.969368829 +0100
+++ /work/SRC/openSUSE:Factory/.python-pycairo.new.2738/python-pycairo.changes  
2020-04-19 21:41:02.651066466 +0200
@@ -1,0 +2,13 @@
+Mon Mar 16 09:47:12 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Add missing dep on setuptools
+
+-------------------------------------------------------------------
+Mon Mar 16 09:33:07 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 1.19.1:
+  * support for new python
+  * remove support for python 2.x
+- Remove patch python38.patch
+
+-------------------------------------------------------------------

Old:
----
  pycairo-1.18.1.tar.gz
  python38.patch

New:
----
  pycairo-1.19.1.tar.gz

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

Other differences:
------------------
++++++ python-pycairo.spec ++++++
--- /var/tmp/diff_new_pack.ugVWd6/_old  2020-04-19 21:41:04.035069244 +0200
+++ /var/tmp/diff_new_pack.ugVWd6/_new  2020-04-19 21:41:04.039069251 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pycairo
 #
-# 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
@@ -17,25 +17,22 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define skip_python2 1
 %define         oldpython python
 Name:           python-pycairo
-Version:        1.18.1
+Version:        1.19.1
 Release:        0
 Summary:        Python Bindings for Cairo
 License:        LGPL-2.1-or-later OR MPL-1.1
 URL:            https://github.com/pygobject/pycairo
 Source:         
https://github.com/pygobject/pycairo/releases/download/v%{version}/pycairo-%{version}.tar.gz
-Patch0:         python38.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  cairo-devel >= 1.13.1
 BuildRequires:  python-rpm-macros
 Provides:       python-cairo = %{version}
 Obsoletes:      python-cairo < %{version}
-%ifpython2
-Provides:       %{oldpython}-cairo = %{version}
-Obsoletes:      %{oldpython}-cairo < %{version}
-%endif
 %python_subpackages
 
 %description
@@ -48,10 +45,6 @@
 Requires:       python-pycairo-common-devel = %{version}
 Provides:       python-cairo-devel = %{version}
 Obsoletes:      python-cairo-devel < %{version}
-%ifpython2
-Provides:       %{oldpython}-cairo-devel = %{version}
-Obsoletes:      %{oldpython}-cairo-devel < %{version}
-%endif
 
 %description   devel
 Pycairo is a Python module providing bindings for the cairo graphics library.
@@ -76,7 +69,6 @@
 
 %prep
 %setup -q -n pycairo-%{version}
-%patch0 -p1
 
 %build
 %python_build
@@ -95,9 +87,6 @@
 
 %files %{python_files devel}
 %license COPYING COPYING-LGPL-2.1 COPYING-MPL-1.1
-%ifpython2
-%{_libdir}/pkgconfig/pycairo.pc
-%endif
 %ifpython3
 %{_libdir}/pkgconfig/py3cairo.pc
 %endif

++++++ pycairo-1.18.1.tar.gz -> pycairo-1.19.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/COPYING new/pycairo-1.19.1/COPYING
--- old/pycairo-1.18.1/COPYING  2017-04-06 16:55:04.000000000 +0200
+++ new/pycairo-1.19.1/COPYING  2019-12-11 21:20:56.000000000 +0100
@@ -15,3 +15,5 @@
 
 Please see each file in the implementation for Copyright and licensing
 information.
+
+SPDX-License-Identifier: LGPL-2.1-only OR MPL-1.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/NEWS new/pycairo-1.19.1/NEWS
--- old/pycairo-1.18.1/NEWS     2019-04-19 17:49:15.000000000 +0200
+++ new/pycairo-1.19.1/NEWS     2020-02-16 16:38:41.000000000 +0100
@@ -1,5 +1,36 @@
 Since version 1.11.0 Pycairo uses `Semantic Versioning
 <http://semver.org/>`__ i.e. the newest version is the latest stable one.
+The last version supporting Python 2.7 is 1.18.x.
+
+
+.. _v1.19.1:
+
+1.19.1 - 2020-02-16
+-------------------
+
+* docs: Add moderngl in the integration section. :pr:`174` (:user:`Einar 
Forselv <einarf>`)
+* Support os.PathLike with PyPy3 >= 7.3.0
+
+
+.. _v1.19.0:
+
+1.19.0 - 2020-01-23
+-------------------
+
+* Python 2 is no longer supported :pr:`172`
+* Add machine-readable license statement :pr:`158` (:user:`Maxim Ivanov 
<ulidtko>`)
+* travis-ci: Manually set sysroot so correct SDK is used (:user:`Stuart Axon 
<stuaxo>`)
+* Support Python 3.8 on Windows (because of DLL lookup changes)
+* Fix wrong type for set_dash() offset parameter in the docs/types.
+
+
+.. _v1.18.2:
+
+1.18.2 - 2019-10-24
+-------------------
+
+* Fix a minor compatibility issue with Python 3.8 (fixes the test suite)
+
 
 .. _v1.18.1:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/PKG-INFO new/pycairo-1.19.1/PKG-INFO
--- old/pycairo-1.18.1/PKG-INFO 2019-04-19 18:09:20.000000000 +0200
+++ new/pycairo-1.19.1/PKG-INFO 2020-02-16 16:41:01.552966800 +0100
@@ -1,11 +1,11 @@
 Metadata-Version: 1.2
 Name: pycairo
-Version: 1.18.1
+Version: 1.19.1
 Summary: Python interface for cairo
 Home-page: https://pycairo.readthedocs.io
 Maintainer: Christoph Reiter
 Maintainer-email: reiter.christ...@gmail.com
-License: UNKNOWN
+License: LGPL-2.1-only OR MPL-1.1
 Description: .. image:: 
https://cdn.rawgit.com/pygobject/pycairo/master/docs/images/pycairo.svg
            :align: center
            :width: 370px
@@ -13,9 +13,9 @@
         |
         
         Pycairo is a Python module providing bindings for the `cairo graphics 
library
-        <https://cairographics.org/>`__. It depends on **cairo >= 1.13.1** and
-        works with **Python 2.7+** as well as **Python 3.4+**. Pycairo, 
including this
-        documentation, is licensed under the **LGPLv2.1** as well as the 
**MPLv1.1**.
+        <https://cairographics.org/>`__. It depends on **cairo >= 1.13.1** and 
works
+        with **Python 3.5+**. Pycairo, including this documentation, is 
licensed under
+        the `LGPL-2.1-only OR MPL-1.1 <https://spdx.org/ids-how>`__.
         
         The Pycairo bindings are designed to match the cairo C API as closely 
as
         possible, and to deviate only in cases which are clearly better 
implemented in
@@ -84,14 +84,13 @@
         
 Platform: UNKNOWN
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 
(LGPLv2)
 Classifier: License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)
+Requires-Python: >=3.5, <4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/PKG-INFO.in 
new/pycairo-1.19.1/PKG-INFO.in
--- old/pycairo-1.18.1/PKG-INFO.in      2018-11-04 11:16:30.000000000 +0100
+++ new/pycairo-1.19.1/PKG-INFO.in      2019-08-24 23:37:20.000000000 +0200
@@ -12,10 +12,10 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 
(LGPLv2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/README.rst 
new/pycairo-1.19.1/README.rst
--- old/pycairo-1.18.1/README.rst       2019-02-24 16:20:12.000000000 +0100
+++ new/pycairo-1.19.1/README.rst       2020-01-28 21:08:45.000000000 +0100
@@ -5,9 +5,9 @@
 |
 
 Pycairo is a Python module providing bindings for the `cairo graphics library
-<https://cairographics.org/>`__. It depends on **cairo >= 1.13.1** and
-works with **Python 2.7+** as well as **Python 3.4+**. Pycairo, including this
-documentation, is licensed under the **LGPLv2.1** as well as the **MPLv1.1**.
+<https://cairographics.org/>`__. It depends on **cairo >= 1.13.1** and works
+with **Python 3.5+**. Pycairo, including this documentation, is licensed under
+the `LGPL-2.1-only OR MPL-1.1 <https://spdx.org/ids-how>`__.
 
 The Pycairo bindings are designed to match the cairo C API as closely as
 possible, and to deviate only in cases which are clearly better implemented in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/cairo/__init__.pyi 
new/pycairo-1.19.1/cairo/__init__.pyi
--- old/pycairo-1.18.1/cairo/__init__.pyi       2018-11-04 10:52:42.000000000 
+0100
+++ new/pycairo-1.19.1/cairo/__init__.pyi       2020-01-19 10:57:15.000000000 
+0100
@@ -472,7 +472,7 @@
     def scale(self, sx: float, sy: float) -> None: ...
     def select_font_face(self, family: Text, slant: FontSlant=..., weight: 
FontWeight=...) -> None: ...
     def set_antialias(self, antialias: Antialias) -> None: ...
-    def set_dash(self, dashes: Sequence[float], offset: int=0) -> None: ...
+    def set_dash(self, dashes: Sequence[float], offset: float=0) -> None: ...
     def set_fill_rule(self, fill_rule: FillRule) -> None: ...
     def set_font_face(self, font_face: FontFace) -> None: ...
     def set_font_matrix(self, matrix: Matrix) -> None: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/cairo/enums.c 
new/pycairo-1.19.1/cairo/enums.c
--- old/pycairo-1.18.1/cairo/enums.c    2018-11-03 10:30:34.000000000 +0100
+++ new/pycairo-1.19.1/cairo/enums.c    2019-08-24 23:37:20.000000000 +0200
@@ -257,6 +257,7 @@
     PyObject *ev;
 
     Pycairo_IntEnum_Type.tp_repr = (reprfunc)int_enum_repr;
+    Pycairo_IntEnum_Type.tp_str = PYCAIRO_PyLong_Type.tp_repr;
     Pycairo_IntEnum_Type.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE;
     Pycairo_IntEnum_Type.tp_methods = int_enum_methods;
     Pycairo_IntEnum_Type.tp_base = &PYCAIRO_PyLong_Type;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/cairo/misc.c 
new/pycairo-1.19.1/cairo/misc.c
--- old/pycairo-1.18.1/cairo/misc.c     2019-03-02 18:59:19.000000000 +0100
+++ new/pycairo-1.19.1/cairo/misc.c     2020-02-09 11:49:34.000000000 +0100
@@ -33,6 +33,11 @@
 
 #include "private.h"
 
+/* PyOS_FSPath() was missing in PyPy for some time:
+ * https://bitbucket.org/pypy/pypy/issues/2961 */
+#if PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 6 && (!defined(PYPY_VERSION) 
|| PYPY_VERSION_NUM >= 0x07030000)
+#define HAS_FSPATH_SUPPORT
+#endif
 
 /* Returns 1 if the object has the correct file type for a filesystem path.
  * Parsing it with Pycairo_fspath_converter() might still fail.
@@ -41,9 +46,7 @@
 Pycairo_is_fspath (PyObject *obj) {
 #if PY_MAJOR_VERSION < 3
     return (PyString_Check (obj) || PyUnicode_Check (obj));
-#elif PY_MAJOR_VERSION >= 3 && PY_MINOR_VERSION >= 6 && !defined(PYPY_VERSION)
-    /* PyOS_FSPath() is missing in PyPy:
-     * https://bitbucket.org/pypy/pypy/issues/2961 */
+#elif defined(HAS_FSPATH_SUPPORT)
     PyObject *real = PyOS_FSPath (obj);
     if (real == NULL) {
         PyErr_Clear ();
@@ -57,6 +60,47 @@
 #endif
 }
 
+#if !defined(MS_WINDOWS) && PY_MAJOR_VERSION >= 3
+/* Broken in PyPy: https://bitbucket.org/pypy/pypy/issues/3168 */
+static int
+Pycairo_PyUnicode_FSConverter(PyObject* obj, void* result) {
+    int res;
+    PyObject *real = NULL;
+#ifdef HAS_FSPATH_SUPPORT
+    real = PyOS_FSPath (obj);
+#endif
+    if (real == NULL) {
+        PyErr_Clear ();
+        return PyUnicode_FSConverter (obj, result);
+    } else {
+        res = PyUnicode_FSConverter (real, result);
+        Py_DECREF (real);
+        return res;
+    }
+}
+#endif
+
+#if defined(MS_WINDOWS) && PY_MAJOR_VERSION >= 3
+/* Broken in PyPy: https://bitbucket.org/pypy/pypy/issues/3168 */
+static int
+Pycairo_PyUnicode_FSDecoder(PyObject* obj, void* result) {
+    int res;
+    PyObject *real = NULL;
+#ifdef HAS_FSPATH_SUPPORT
+    real = PyOS_FSPath (obj);
+#endif
+    if (real == NULL) {
+        PyErr_Clear ();
+        return PyUnicode_FSDecoder (obj, result);
+    } else {
+        res = PyUnicode_FSDecoder (real, result);
+        Py_DECREF (real);
+        return res;
+    }
+}
+#endif
+
+
 /* Converts a Python object to a cairo path. The result needs to be freed with
  * PyMem_Free().
  */
@@ -130,7 +174,7 @@
 #elif defined(MS_WINDOWS) && PY_MAJOR_VERSION >= 3
     PyObject *uni;
 
-    if (PyUnicode_FSDecoder (obj, &uni) == 0)
+    if (Pycairo_PyUnicode_FSDecoder (obj, &uni) == 0)
         return 0;
 
     if (cairo_version() >= CAIRO_VERSION_ENCODE(1, 15, 10)) {
@@ -166,7 +210,7 @@
         return 0;
     }
 #elif !defined(MS_WINDOWS) && PY_MAJOR_VERSION >= 3
-    if (PyUnicode_FSConverter (obj, &bytes) == 0)
+    if (Pycairo_PyUnicode_FSConverter (obj, &bytes) == 0)
         return 0;
 
     if (PyBytes_AsStringAndSize (bytes, &internal, NULL) == -1) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/docs/conf.py 
new/pycairo-1.19.1/docs/conf.py
--- old/pycairo-1.18.1/docs/conf.py     2018-11-02 12:56:31.000000000 +0100
+++ new/pycairo-1.19.1/docs/conf.py     2020-01-28 21:08:45.000000000 +0100
@@ -5,7 +5,6 @@
     'sphinx.ext.extlinks',
 ]
 intersphinx_mapping = {
-    'python': ('https://docs.python.org/2', None),
     'python3': ('https://docs.python.org/3', None),
 }
 source_suffix = '.rst'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/docs/getting_started.rst 
new/pycairo-1.19.1/docs/getting_started.rst
--- old/pycairo-1.18.1/docs/getting_started.rst 2019-01-27 10:16:12.000000000 
+0100
+++ new/pycairo-1.19.1/docs/getting_started.rst 2020-01-28 21:08:45.000000000 
+0100
@@ -4,8 +4,7 @@
 
 Installation:
 
-* Python 2: ``pip2 install pycairo``
-* Python 3: ``pip3 install pycairo``
+* ``pip3 install pycairo``
 
 Installing Pycairo requires pkg-config and cairo including its headers. Here
 are some examples on how to install those for some platforms:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/docs/index.rst 
new/pycairo-1.19.1/docs/index.rst
--- old/pycairo-1.18.1/docs/index.rst   2019-04-19 18:02:36.000000000 +0200
+++ new/pycairo-1.19.1/docs/index.rst   2020-01-28 21:08:45.000000000 +0100
@@ -49,20 +49,12 @@
 
 To build/install the library::
 
-    python2/3 setup.py build
-    python2/3 setup.py install
+    python3 setup.py build
+    python3 setup.py install
 
 To run the tests::
 
-    python2/3 setup.py test
-
-The Python 2 version supports `xpyb
-<https://xcb.freedesktop.org/XcbPythonBinding/>`__ integration which is
-disabled by default. To enable, build as follows::
-
-    python2 setup.py build --enable-xpyb
-    # and for running tests:
-    python2 setup.py test --enable-xpyb
+    python3 setup.py test
 
 For examples of pycairo code see the 'examples' directory that comes with the
 pycairo distribution.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/docs/integration.rst 
new/pycairo-1.19.1/docs/integration.rst
--- old/pycairo-1.18.1/docs/integration.rst     2017-06-01 10:53:23.000000000 
+0200
+++ new/pycairo-1.19.1/docs/integration.rst     2020-02-09 11:49:34.000000000 
+0100
@@ -48,7 +48,7 @@
 Pyglet & ImageSurface as Texture
 --------------------------------
 
-Creating a pyglet.Texture from an ImageSurface
+Creating a pyglet.Texture from an ImageSurface:
     .. code:: python
     
         import ctypes
@@ -138,3 +138,20 @@
 -------------------
 
 See https://github.com/rougier/freetype-py/tree/master/examples for examples. 
Most of the ``*-cairo.py`` examples illustrate conversion from FreeType bitmaps 
to Cairo surfaces; the two examples, ``glyph-vector-cairo.py`` and 
``glyph-vector-2-cairo.py``, illustrate conversion from FreeType glyph contours 
to Cairo paths.
+
+
+ModernGL & ImageSurface as Texture
+----------------------------------
+
+Creating a moderngl.Texture from an ImageSurface:
+    .. code:: python
+
+        import moderngl
+        import cairo
+        ctx = moderngl.create_context(standalone=True)
+        width, height = 400, 400
+        surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
+        texture = ctx.texture((width, height), 4, data=surface.get_data())
+
+An example can also be found in the ModernGL project:
+https://github.com/moderngl/moderngl/blob/master/examples/integration_pycairo.py
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/docs/pycairo_c_api.rst 
new/pycairo-1.19.1/docs/pycairo_c_api.rst
--- old/pycairo-1.18.1/docs/pycairo_c_api.rst   2018-04-13 18:31:53.000000000 
+0200
+++ new/pycairo-1.19.1/docs/pycairo_c_api.rst   2020-01-28 21:08:45.000000000 
+0100
@@ -48,30 +48,6 @@
 
 .. _api-includes:
 
-To access the Pycairo C API under Python 2
-==========================================
-
-Edit the client module file to add the following lines::
-
-  /* All function, type and macro definitions needed to use the Pycairo/C API
-   * are included in your code by the following line
-   */
-  #include "pycairo.h"
-
-  /* define a variable for the C API */
-  Pycairo_CAPI_t *Pycairo_CAPI;
-
-  /* import pycairo - add to the init<module> function */
-  Pycairo_IMPORT;
-
-In case you want to use the API from another compilation unit::
-
-  #include <pycairo.h>
-
-  extern Pycairo_CAPI_t *Pycairo_CAPI;
-
-  ...
-
 To access the Pycairo C API under Python 3
 ==========================================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/docs/reference/constants.rst 
new/pycairo-1.19.1/docs/reference/constants.rst
--- old/pycairo-1.18.1/docs/reference/constants.rst     2018-11-04 
11:39:05.000000000 +0100
+++ new/pycairo-1.19.1/docs/reference/constants.rst     2020-01-28 
21:08:45.000000000 +0100
@@ -253,7 +253,6 @@
 .. class:: text()
 
     This type only exists for documentation purposes. It represents
-    :obj:`python:str`/:obj:`python:unicode` under Python 2 and
     :obj:`python3:str` under Python 3.
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/docs/reference/context.rst 
new/pycairo-1.19.1/docs/reference/context.rst
--- old/pycairo-1.18.1/docs/reference/context.rst       2018-11-07 
20:55:40.000000000 +0100
+++ new/pycairo-1.19.1/docs/reference/context.rst       2020-01-19 
10:57:15.000000000 +0100
@@ -980,7 +980,7 @@
         stroke portions as float.
       :param offset: an offset into the dash pattern at which the stroke
         should start, defaults to 0.
-      :type offset: int
+      :type offset: float
       :raises: :exc:`cairo.Error` if any value in *dashes* is negative, or if
         all values are 0.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/meson.build 
new/pycairo-1.19.1/meson.build
--- old/pycairo-1.18.1/meson.build      2019-01-27 10:24:19.000000000 +0100
+++ new/pycairo-1.19.1/meson.build      2020-01-28 21:08:45.000000000 +0100
@@ -1,6 +1,6 @@
 project(
   'pycairo', 'c',
-  version: '1.18.1',
+  version: '1.19.1',
   meson_version: '>= 0.47.0',
   default_options: [
     'warning_level=1',
@@ -13,6 +13,11 @@
 pymod = import('python')
 python = pymod.find_installation(get_option('python'))
 
+pyver = python.language_version()
+if pyver.version_compare('< 3.5')
+  error('Requires Python >= 3.5')
+endif
+
 configure_file(
   input: 'setup.cfg',
   output: 'setup.cfg',
@@ -64,7 +69,6 @@
     '-Warray-bounds',
     '-Wcast-align',
     '-Wconversion',
-    '-Wdeclaration-after-statement',
     '-Wextra',
     '-Wformat=2',
     '-Wformat-nonliteral',
@@ -84,6 +88,7 @@
     '-Wstrict-aliasing',
     '-Wundef',
     '-Wunused-but-set-variable',
+    '-Wswitch-default',
   ]
 
   main_c_args += [
@@ -95,12 +100,6 @@
     '-fno-strict-aliasing',
     '-fvisibility=hidden',
   ]
-
-  if not ['3.3', '3.4'].contains(python.language_version())
-    main_c_args += [
-      '-Wswitch-default',
-    ]
-  endif
 endif
 
 main_c_args = cc.get_supported_arguments(main_c_args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/pycairo.egg-info/PKG-INFO 
new/pycairo-1.19.1/pycairo.egg-info/PKG-INFO
--- old/pycairo-1.18.1/pycairo.egg-info/PKG-INFO        2019-04-19 
18:09:19.000000000 +0200
+++ new/pycairo-1.19.1/pycairo.egg-info/PKG-INFO        2020-02-16 
16:41:01.000000000 +0100
@@ -1,11 +1,11 @@
 Metadata-Version: 1.2
 Name: pycairo
-Version: 1.18.1
+Version: 1.19.1
 Summary: Python interface for cairo
 Home-page: https://pycairo.readthedocs.io
 Maintainer: Christoph Reiter
 Maintainer-email: reiter.christ...@gmail.com
-License: UNKNOWN
+License: LGPL-2.1-only OR MPL-1.1
 Description: .. image:: 
https://cdn.rawgit.com/pygobject/pycairo/master/docs/images/pycairo.svg
            :align: center
            :width: 370px
@@ -13,9 +13,9 @@
         |
         
         Pycairo is a Python module providing bindings for the `cairo graphics 
library
-        <https://cairographics.org/>`__. It depends on **cairo >= 1.13.1** and
-        works with **Python 2.7+** as well as **Python 3.4+**. Pycairo, 
including this
-        documentation, is licensed under the **LGPLv2.1** as well as the 
**MPLv1.1**.
+        <https://cairographics.org/>`__. It depends on **cairo >= 1.13.1** and 
works
+        with **Python 3.5+**. Pycairo, including this documentation, is 
licensed under
+        the `LGPL-2.1-only OR MPL-1.1 <https://spdx.org/ids-how>`__.
         
         The Pycairo bindings are designed to match the cairo C API as closely 
as
         possible, and to deviate only in cases which are clearly better 
implemented in
@@ -84,14 +84,13 @@
         
 Platform: UNKNOWN
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
+Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: Implementation :: CPython
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 
(LGPLv2)
 Classifier: License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)
+Requires-Python: >=3.5, <4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/setup.cfg new/pycairo-1.19.1/setup.cfg
--- old/pycairo-1.18.1/setup.cfg        2019-04-19 18:09:20.000000000 +0200
+++ new/pycairo-1.19.1/setup.cfg        2020-02-16 16:41:01.552966800 +0100
@@ -1,6 +1,7 @@
 [flake8]
 ignore = E402,E741
 builtins = buffer,unichr
+max-line-length = 100
 
 [coverage:run]
 include = 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/setup.py new/pycairo-1.19.1/setup.py
--- old/pycairo-1.18.1/setup.py 2019-02-15 10:04:13.000000000 +0100
+++ new/pycairo-1.19.1/setup.py 2020-02-16 16:38:11.000000000 +0100
@@ -19,7 +19,7 @@
 from distutils import sysconfig
 
 
-PYCAIRO_VERSION = '1.18.1'
+PYCAIRO_VERSION = '1.19.1'
 CAIRO_VERSION_REQUIRED = '1.13.1'
 XPYB_VERSION_REQUIRED = '1.3'
 
@@ -119,7 +119,6 @@
         "-Warray-bounds",
         "-Wcast-align",
         "-Wconversion",
-        "-Wdeclaration-after-statement",
         "-Wextra",
         "-Wformat=2",
         "-Wformat-nonliteral",
@@ -139,13 +138,9 @@
         "-Wstrict-aliasing",
         "-Wundef",
         "-Wunused-but-set-variable",
+        "-Wswitch-default",
     ]
 
-    if sys.version_info[:2] not in [(3, 3), (3, 4)]:
-        args += [
-            "-Wswitch-default",
-        ]
-
     args += [
         "-Wno-missing-field-initializers",
         "-Wno-unused-parameter",
@@ -161,6 +156,10 @@
         "-fvisibility=hidden",
     ]
 
+    args += [
+        "-std=c99",
+    ]
+
     ext.extra_compile_args += filter_compiler_arguments(compiler, args)
 
 
@@ -191,8 +190,6 @@
         cmd.ensure_finalized()
         cmd.run()
 
-        import cairo
-
         tests_dir = os.path.join("tests", "cmodule")
 
         ext = Extension(
@@ -203,11 +200,11 @@
             ],
             include_dirs=[
                 tests_dir,
-                cairo.get_include(),
+                "cairo",
             ],
             depends=[
                 os.path.join(tests_dir, "cmodulelib.h"),
-                os.path.join(cairo.get_include(), "pycairo.h"),
+                os.path.join("cairo", "pycairo.h"),
             ],
             define_macros=[("PY_SSIZE_T_CLEAN", None)],
         )
@@ -413,6 +410,24 @@
         self.outfiles.append(out)
 
 
+def check_setuptools_for_dist():
+    if "setuptools" not in sys.modules:
+        raise Exception("setuptools not available")
+    version = tuple(map(int, sys.modules["setuptools"].__version__.split(".")))
+    if version < (24, 2, 0):
+        raise Exception("setuptools too old")
+
+
+du_sdist = get_command_class("sdist")
+
+
+class sdist(du_sdist):
+
+    def run(self):
+        check_setuptools_for_dist()
+        du_sdist.run(self)
+
+
 du_install_lib = get_command_class("install_lib")
 
 
@@ -516,6 +531,9 @@
 
 def main():
 
+    if sys.version_info[0] < 3:
+        raise Exception("Python 2 no longer supported")
+
     cairo_ext = Extension(
         name='cairo._cairo',
         sources=[
@@ -560,6 +578,7 @@
         "install_pycairo_header": install_pycairo_header,
         "test": test_cmd,
         "build_tests": build_tests,
+        "sdist": sdist,
     }
 
     setup(
@@ -570,6 +589,7 @@
         long_description=long_description,
         maintainer="Christoph Reiter",
         maintainer_email="reiter.christ...@gmail.com",
+        license="LGPL-2.1-only OR MPL-1.1",
         ext_modules=[cairo_ext],
         packages=["cairo"],
         package_data={
@@ -580,13 +600,11 @@
         },
         classifiers=[
             'Operating System :: OS Independent',
-            'Programming Language :: Python :: 2',
-            'Programming Language :: Python :: 2.7',
             'Programming Language :: Python :: 3',
-            'Programming Language :: Python :: 3.4',
             'Programming Language :: Python :: 3.5',
             'Programming Language :: Python :: 3.6',
             'Programming Language :: Python :: 3.7',
+            'Programming Language :: Python :: 3.8',
             'Programming Language :: Python :: Implementation :: CPython',
             'Programming Language :: Python :: Implementation :: PyPy',
             ('License :: OSI Approved :: '
@@ -594,6 +612,7 @@
             'License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)',
         ],
         cmdclass=cmdclass,
+        python_requires='>=3.5, <4',
     )
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/tests/__init__.py 
new/pycairo-1.19.1/tests/__init__.py
--- old/pycairo-1.18.1/tests/__init__.py        2017-08-18 16:49:39.000000000 
+0200
+++ new/pycairo-1.19.1/tests/__init__.py        2020-01-19 10:57:15.000000000 
+0100
@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+
+import os
+
+
+def set_dll_search_path():
+    # Python 3.8 no longer searches for DLLs in PATH, so we have to add
+    # everything in PATH manually. Note that unlike PATH add_dll_directory
+    # has no defined order, so if there are two cairo DLLs in PATH we
+    # might get a random one.
+    if os.name != "nt" or not hasattr(os, "add_dll_directory"):
+        return
+    for p in os.environ.get("PATH", "").split(os.pathsep):
+        try:
+            os.add_dll_directory(p)
+        except OSError:
+            pass
+
+
+set_dll_search_path()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/tests/test_context.py 
new/pycairo-1.19.1/tests/test_context.py
--- old/pycairo-1.18.1/tests/test_context.py    2018-11-03 10:30:34.000000000 
+0100
+++ new/pycairo-1.19.1/tests/test_context.py    2020-01-19 10:57:15.000000000 
+0100
@@ -167,6 +167,9 @@
     assert context.get_dash() == ((0.0, 1.0, 2.0, 3.0), 4.0)
     assert context.get_dash_count() == 4
 
+    context.set_dash([1], 1.25)
+    assert context.get_dash() == ((1.0,), 1.25)
+
     with pytest.raises(TypeError):
         context.set_dash()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycairo-1.18.1/tests/test_hypothesis.py 
new/pycairo-1.19.1/tests/test_hypothesis.py
--- old/pycairo-1.18.1/tests/test_hypothesis.py 2018-11-03 11:34:25.000000000 
+0100
+++ new/pycairo-1.19.1/tests/test_hypothesis.py 2020-02-09 11:49:34.000000000 
+0100
@@ -5,6 +5,7 @@
 import sys
 import tempfile
 import shutil
+import platform
 
 import pytest
 import cairo
@@ -39,6 +40,9 @@
     return tuple(map(int, cairo.cairo_version_string().split(".")))
 
 
+@pytest.mark.skipif(
+    platform.python_implementation() == "PyPy" and sys.pypy_version_info < (7, 
3, 0),
+    reason="PyPy bugs")
 @given(path=fspaths())
 @settings(max_examples=500)
 def test_fspaths(tempdir_path, path):


Reply via email to