Update to 3.32.2

This commit is contained in:
Kalev Lember 2019-06-24 12:22:06 +02:00
parent 69f1f9f6aa
commit 2a9f733972
6 changed files with 6 additions and 210 deletions

View File

@ -1,44 +0,0 @@
From 1c78286f8aef7ed411efc159a7abb1edcf744102 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 7 Jun 2019 16:28:54 +0200
Subject: [PATCH] tests: remove usage of time.clock(), no longer available in
py3.8
---
tests/test_overrides_gtk.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/test_overrides_gtk.py b/tests/test_overrides_gtk.py
index 627d5760..d96d8fe8 100644
--- a/tests/test_overrides_gtk.py
+++ b/tests/test_overrides_gtk.py
@@ -6,10 +6,10 @@ from __future__ import absolute_import
import contextlib
import unittest
-import time
import sys
import gc
import warnings
+import timeit
import pytest
@@ -2260,12 +2260,12 @@ class TestTreeModel(unittest.TestCase):
model = Gtk.ListStore(int, str)
iterations = 2000
- start = time.clock()
+ start = timeit.default_timer()
i = iterations
while i > 0:
model.append([1, 'hello'])
i -= 1
- end = time.clock()
+ end = timeit.default_timer()
sys.stderr.write('[%.0f µs/append] ' % ((end - start) * 1000000 / iterations))
def test_filter_new_default(self):
--
2.21.0

View File

@ -1,67 +0,0 @@
From ab596da7991dc5b91b047fc741c9da23ae051e1a Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 7 Jun 2019 16:50:53 +0200
Subject: [PATCH] build: don't use -Wdeclaration-after-statement with Python 3
The headers of Python 3.8 trigger the warning and PEP7 states that
Python is depending on this now.
As far as I remember this was mostly added to keep the code compatible
with ancient py2 MSVC, so only use it with Python 2.
---
meson.build | 7 ++++++-
setup.py | 6 +++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index 1beda259..2064d254 100644
--- a/meson.build
+++ b/meson.build
@@ -72,7 +72,6 @@ else
'-Wall',
'-Warray-bounds',
'-Wcast-align',
- '-Wdeclaration-after-statement',
'-Wduplicated-branches',
'-Wextra',
'-Wformat=2',
@@ -104,6 +103,12 @@ else
'-Wwrite-strings',
]
+ if python.language_version().split('.')[0] == '2'
+ main_c_args += [
+ '-Wdeclaration-after-statement',
+ ]
+ endif
+
main_c_args += [
'-Wno-incompatible-pointer-types-discards-qualifiers',
'-Wno-missing-field-initializers',
diff --git a/setup.py b/setup.py
index 47cc1050..b9172131 100755
--- a/setup.py
+++ b/setup.py
@@ -975,7 +975,6 @@ def add_ext_compiler_flags(ext, compiler, _cache={}):
"-Wall",
"-Warray-bounds",
"-Wcast-align",
- "-Wdeclaration-after-statement",
"-Wduplicated-branches",
"-Wextra",
"-Wformat=2",
@@ -1007,6 +1006,11 @@ def add_ext_compiler_flags(ext, compiler, _cache={}):
"-Wwrite-strings",
]
+ if sys.version_info[0] == 2:
+ args += [
+ "-Wdeclaration-after-statement",
+ ]
+
args += [
"-Wno-incompatible-pointer-types-discards-qualifiers",
"-Wno-missing-field-initializers",
--
2.21.0

View File

@ -1,31 +0,0 @@
From b99640a50e165e2a241fdbadca8a537c5930bdd1 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 7 Jun 2019 16:31:23 +0200
Subject: [PATCH] Don't use PyTypeObject.tp_print with Python 3
It was only used with Python 2 and unused/reserved with Python 3.
Python 3.8 has renamed the slot and is now using it for something different
which breaks our build.
---
gi/pygobject-object.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gi/pygobject-object.c b/gi/pygobject-object.c
index dbf46e1e..39c03ca3 100644
--- a/gi/pygobject-object.c
+++ b/gi/pygobject-object.c
@@ -878,7 +878,10 @@ pygobject_inherit_slots(PyTypeObject *type, PyObject *bases, gboolean check_for_
offsetof(PyTypeObject, tp_iter),
offsetof(PyTypeObject, tp_repr),
offsetof(PyTypeObject, tp_str),
- offsetof(PyTypeObject, tp_print) };
+#if PY_VERSION_HEX < 0x03000000
+ offsetof(PyTypeObject, tp_print),
+#endif
+ };
gsize i;
/* Happens when registering gobject.GObject itself, at least. */
--
2.21.0

View File

@ -1,60 +0,0 @@
From dea99de09f273a54244af1f3250f6699cfede637 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Fri, 7 Jun 2019 16:43:38 +0200
Subject: [PATCH] build: drop some checks for unsupported Python versions
---
meson.build | 7 +------
setup.py | 6 +-----
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/meson.build b/meson.build
index 50355814..1beda259 100644
--- a/meson.build
+++ b/meson.build
@@ -98,6 +98,7 @@ else
'-Wsign-compare',
'-Wstrict-aliasing',
'-Wstrict-prototypes',
+ '-Wswitch-default',
'-Wundef',
'-Wunused-but-set-variable',
'-Wwrite-strings',
@@ -118,12 +119,6 @@ else
'-fvisibility=hidden',
]
- if not ['3.3', '3.4'].contains(python.language_version())
- main_c_args += [
- '-Wswitch-default',
- ]
- endif
-
main_c_args = cc.get_supported_arguments(main_c_args)
endif
diff --git a/setup.py b/setup.py
index 1e5fe769..47cc1050 100755
--- a/setup.py
+++ b/setup.py
@@ -1001,16 +1001,12 @@ def add_ext_compiler_flags(ext, compiler, _cache={}):
"-Wsign-compare",
"-Wstrict-aliasing",
"-Wstrict-prototypes",
+ "-Wswitch-default",
"-Wundef",
"-Wunused-but-set-variable",
"-Wwrite-strings",
]
- if sys.version_info[:2] != (3, 4):
- args += [
- "-Wswitch-default",
- ]
-
args += [
"-Wno-incompatible-pointer-types-discards-qualifiers",
"-Wno-missing-field-initializers",
--
2.21.0

View File

@ -11,19 +11,14 @@
%global with_check 0
Name: pygobject3
Version: 3.32.1
Release: 2%{?dist}
Version: 3.32.2
Release: 1%{?dist}
Summary: Python bindings for GObject Introspection
License: LGPLv2+ and MIT
URL: https://wiki.gnome.org/Projects/PyGObject
Source0: https://download.gnome.org/sources/pygobject/3.32/pygobject-%{version}.tar.xz
Patch0: https://gitlab.gnome.org/GNOME/pygobject/commit/1c78286f8aef7ed411efc159a7abb1edcf744102.patch
Patch1: https://gitlab.gnome.org/GNOME/pygobject/commit/b99640a50e165e2a241fdbadca8a537c5930bdd1.patch
Patch2: https://gitlab.gnome.org/GNOME/pygobject/commit/dea99de09f273a54244af1f3250f6699cfede637.patch
Patch3: https://gitlab.gnome.org/GNOME/pygobject/commit/ab596da7991dc5b91b047fc741c9da23ae051e1a.patch
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
BuildRequires: meson
@ -206,6 +201,9 @@ xvfb-run make DESTDIR=$RPM_BUILD_ROOT check V=1
%{_libdir}/pkgconfig/pygobject-3.0.pc
%changelog
* Mon Jun 24 2019 Kalev Lember <klember@redhat.com> - 3.32.2-1
- Update to 3.32.2
* Tue Jun 18 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 3.32.1-2
- Fix build under python3.8 (#1717655)

View File

@ -1 +1 @@
SHA512 (pygobject-3.32.1.tar.xz) = 5b325d0caf4f34f783fc2c664a795809f048eb1639d2f2e375fc147c852d6e29a8ab119438cac76786fb20220c72d5859cc06d6f70c29f976f6a5914e0169915
SHA512 (pygobject-3.32.2.tar.xz) = 50081bfed45e8b5f0b87fe5c95d4cc12d1b31085e869c603bbc70e34bca69059cc44e8a42270f51e7f04e3ecf2c98da524327a982ed7bb594621fb434d4227f6