Projects
openEuler:Mainline
pygobject3
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
_service:tar_scm:pygobject3.spec
Changed
@@ -1,10 +1,10 @@ Name: pygobject3 -Version: 3.42.2 +Version: 3.44.1 Release: 1 Summary: Provides bindings for GObject based libraries License: LGPLv2+ and MIT URL: https://wiki.gnome.org/Projects/PyGObject -Source0: https://download.gnome.org/sources/pygobject/3.42/pygobject-%{version}.tar.xz +Source0: https://download.gnome.org/sources/pygobject/3.44/pygobject-%{version}.tar.xz BuildRequires: glib2-devel >= 2.56.0 gobject-introspection-devel >= 1.56.0 BuildRequires: meson cairo-gobject-devel @@ -87,6 +87,9 @@ %{_libdir}/pkgconfig/pygobject-3.0.pc %changelog +* Thu Jul 13 2023 niuyaru <niuyaru@kylinos.cn> - 3.44.1-1 +- update version to 3.44.1 + * Thu Nov 17 2022 fuanan <fuanan3@h-partners.com> - 3.42.2-1 - update version to 3.42.2
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci.yml -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci.yml
Changed
@@ -1,4 +1,4 @@ -image: registry.gitlab.gnome.org/gnome/pygobject/main:v15 +image: registry.gitlab.gnome.org/gnome/pygobject/main:v19 stages: - build_and_test @@ -35,9 +35,10 @@ paths: - coverage/ variables: - PYENV_VERSION: "3.6.12" + PYENV_VERSION: "3.8.16-debug" script: - bash -x ./.gitlab-ci/coverage-docker.sh + coverage: '/^\s+lines\.+:\s+(\d.+\%)\s+/' pages: stage: deploy @@ -62,40 +63,40 @@ MSYSTEM: "MINGW64" <<: *mingw-defaults -python3.6: - variables: - PYENV_VERSION: "3.6.12" - <<: *defaults - python3.7: variables: - PYENV_VERSION: "3.7.9-debug" + PYENV_VERSION: "3.7.16-debug" <<: *defaults python3.8: variables: - PYENV_VERSION: "3.8.5-debug" + PYENV_VERSION: "3.8.16-debug" <<: *defaults python3.9: variables: - PYENV_VERSION: "3.9.0-debug" + PYENV_VERSION: "3.9.16-debug" <<: *defaults python3.10: variables: - PYENV_VERSION: "3.10.5-debug" + PYENV_VERSION: "3.10.9-debug" <<: *defaults -pypy3.6: +python3.11: + variables: + PYENV_VERSION: "3.11.1-debug" + <<: *defaults + +pypy3.8: allow_failure: true variables: - PYENV_VERSION: "pypy3.6-7.3.1" + PYENV_VERSION: "pypy3.8-7.3.11" <<: *defaults old-i386-py3: stage: build_and_test - image: registry.gitlab.gnome.org/gnome/pygobject/old:v4 + image: registry.gitlab.gnome.org/gnome/pygobject/old:v5 artifacts: paths: - coverage/ @@ -105,20 +106,24 @@ gnome-master: allow_failure: true stage: build_and_test - image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master + image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master tags: - flatpak script: - - xvfb-run -a flatpak run --filesystem=host --share=network --socket=x11 --command=bash org.gnome.Sdk//master -x .gitlab-ci/test-flatpak.sh + # https://gitlab.gnome.org/GNOME/gnome-runtime-images/-/issues/7 + - export DBUS_SYSTEM_BUS_ADDRESS="$(dbus-daemon --session --print-address --fork)" + - xvfb-run -a flatpak run --user --filesystem=host --share=network --socket=x11 --command=bash org.gnome.Sdk//master -x .gitlab-ci/test-flatpak.sh gnome-master-gtk4: allow_failure: true stage: build_and_test - image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master + image: quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master tags: - flatpak script: - - xvfb-run -a flatpak run --filesystem=host --share=network --socket=x11 --command=bash org.gnome.Sdk//master -x .gitlab-ci/test-flatpak-gtk4.sh + # https://gitlab.gnome.org/GNOME/gnome-runtime-images/-/issues/7 + - export DBUS_SYSTEM_BUS_ADDRESS="$(dbus-daemon --session --print-address --fork)" + - xvfb-run -a flatpak run --user --filesystem=host --share=network --socket=x11 --command=bash org.gnome.Sdk//master -x .gitlab-ci/test-flatpak-gtk4.sh artifacts: paths: - - coverage/ \ No newline at end of file + - coverage/
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/Dockerfile -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/Dockerfile
Changed
@@ -20,6 +20,7 @@ libreadline-dev \ libsqlite3-dev \ libssl-dev \ + liblzma-dev \ ninja-build \ python3-pip \ xauth \ @@ -41,11 +42,11 @@ RUN curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash -RUN pyenv install pypy3.6-7.3.1 -RUN pyenv install 3.6.12 -RUN pyenv install --debug 3.7.9 -RUN pyenv install --debug 3.8.5 -RUN pyenv install --debug 3.9.0 -RUN pyenv install --debug 3.10.5 +RUN pyenv install pypy3.8-7.3.11 +RUN pyenv install --debug 3.7.16 +RUN pyenv install --debug 3.8.16 +RUN pyenv install --debug 3.9.16 +RUN pyenv install --debug 3.10.9 +RUN pyenv install --debug 3.11.1 ENV PATH="/usr/lib/ccache:${PATH}"
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/Dockerfile.old -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/Dockerfile.old
Changed
@@ -1,4 +1,4 @@ -FROM i386/ubuntu:bionic +FROM i386/debian:buster ENV DEBIAN_FRONTEND=noninteractive
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/coverage-docker.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/coverage-docker.sh
Changed
@@ -2,11 +2,8 @@ set -e -python -m pip install coverage - # Make the Windows paths match our current layout python ./.gitlab-ci/fixup-lcov-paths.py coverage/*.lcov -python ./.gitlab-ci/fixup-covpy-paths.py coverage/.coverage* # Remove external headers (except gi tests) for path in coverage/*.lcov; do @@ -17,25 +14,9 @@ lcov --config-file .gitlab-ci/lcovrc -r "${path}" '*tmp-introspect*' -o "${path}" done -python -m coverage combine coverage -python -m coverage html --show-contexts --ignore-errors -d coverage/report-python genhtml --ignore-errors=source --config-file .gitlab-ci/lcovrc \ - coverage/*.lcov -o coverage/report-c + coverage/*.lcov -o coverage/ cd coverage rm -f .coverage* rm -f *.lcov - -ln -s report-python/index.html index-python.html -ln -s report-c/index.html index-c.html - -cat >index.html <<EOL -<html> -<body> -<ul> -<li><a href="report-c/index.html">C Coverage</a></li> -<li><a href="report-python/index.html">Python Coverage</a></li> -</ul> -</body> -</html> -EOL
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/fixup-lcov-paths.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/fixup-lcov-paths.py
Changed
@@ -1,6 +1,5 @@ import sys import os -import io import re @@ -11,15 +10,33 @@ for path in paths: print("cov-fixup:", path) - text = io.open(path, "r", encoding="utf-8").read() - text = text.replace("\\\\", "/") + with open(path, "r", encoding="utf-8") as h: + text = h.read() + + text = text.replace("\\\\", "/").replace("\\", "/") new_root = os.getcwd() + + def make_abs(m): + p = m.group(1) + if p.startswith("C:/"): + p = p.replace("C:/", "/c/") + if not p.startswith("/"): + p = os.path.join(new_root, p) + return "SF:" + p + + text = re.sub("SF:(.*?)$", make_abs, text, 0, re.MULTILINE) + + canidate = None for old_root in set(re.findall(":(.*?)/gi/.*?$", text, re.MULTILINE)): - if old_root != new_root: - print("replacing %r with %r" % (old_root, new_root)) - text = text.replace(old_root, new_root) - with io.open(path, "w", encoding="utf-8") as h: - h.write(text) + if canidate is None or len(old_root) < len(canidate): + canidate = old_root + + if canidate: + print("replacing %r with %r" % (canidate, new_root)) + text = text.replace(canidate, new_root) + + with open(path, "w", encoding="utf-8") as h: + h.write(text) if __name__ == "__main__":
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/run-docker-old.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/run-docker-old.sh
Changed
@@ -2,7 +2,7 @@ set -e -TAG="registry.gitlab.gnome.org/gnome/pygobject/old:v4" +TAG="registry.gitlab.gnome.org/gnome/pygobject/old:v5" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "Dockerfile.old" .
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/run-docker.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/run-docker.sh
Changed
@@ -2,10 +2,10 @@ set -e -TAG="registry.gitlab.gnome.org/gnome/pygobject/main:v15" +TAG="registry.gitlab.gnome.org/gnome/pygobject/main:v19" sudo docker build --build-arg HOST_USER_ID="$UID" --tag "${TAG}" \ --file "Dockerfile" . -sudo docker run -e PYENV_VERSION='3.8.5-debug' --rm --security-opt label=disable \ +sudo docker run -e PYENV_VERSION='3.8.16-debug' --rm --security-opt label=disable \ --volume "$(pwd)/..:/home/user/app" --workdir "/home/user/app" \ --tty --interactive "${TAG}" bash
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/test-docker-old.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/test-docker-old.sh
Changed
@@ -20,3 +20,4 @@ python -m pip install pycairo pytest pytest-faulthandler coverage python setup.py build_tests xvfb-run -a python -m coverage run --context "${COV_KEY}" tests/runtests.py +python -m coverage lcov -o "${COV_DIR}/${COV_KEY}.py.lcov"
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/test-docker.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/test-docker.sh
Changed
@@ -52,6 +52,7 @@ "${COV_DIR}/${CI_JOB_NAME}-baseline.lcov" xvfb-run -a python -m coverage run --context "${COV_KEY}" tests/runtests.py +python -m coverage lcov -o "${COV_DIR}/${COV_KEY}.py.lcov" # COLLECT GCOV COVERAGE lcov --config-file .gitlab-ci/lcovrc --directory . --capture --output-file \
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/test-flatpak-gtk4.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/test-flatpak-gtk4.sh
Changed
@@ -8,7 +8,10 @@ mkdir -p "${COV_DIR}" export TEST_GTK_VERSION=4.0 -python3 -m pip install --user pytest pytest-faulthandler coverage +python3 -m venv _venv +. _venv/bin/activate +python3 -m pip install pytest pytest-faulthandler coverage python3 setup.py build_tests python3 -m coverage run --context "${COV_KEY}" tests/runtests.py -chmod -R 777 "${COV_DIR}" \ No newline at end of file +python3 -m coverage lcov -o "${COV_DIR}/${COV_KEY}.py.lcov" +chmod -R 777 "${COV_DIR}"
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/test-flatpak.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/test-flatpak.sh
Changed
@@ -2,8 +2,7 @@ set -e -python3 -m pip install --user pytest pytest-faulthandler -# for some reason pip3 fails the first time now.. -# https://gitlab.com/freedesktop-sdk/freedesktop-sdk/issues/776 -python3 -m pip install --user pytest pytest-faulthandler -python3 setup.py test -s \ No newline at end of file +python3 -m venv _venv +. _venv/bin/activate +python3 -m pip install pytest pytest-faulthandler +python3 setup.py test -s
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/.gitlab-ci/test-msys2.sh -> _service:tar_scm:pygobject-3.44.1.tar.xz/.gitlab-ci/test-msys2.sh
Changed
@@ -47,6 +47,7 @@ "${COV_DIR}/${COV_KEY}-baseline.lcov" MSYSTEM= python -m coverage run --context "${COV_KEY}" tests/runtests.py +MSYSTEM= python -m coverage lcov -o "${COV_DIR}/${COV_KEY}.py.lcov" lcov \ --config-file .gitlab-ci/lcovrc \
View file
_service:tar_scm:pygobject-3.44.1.tar.xz/.readthedocs.yaml
Added
@@ -0,0 +1,9 @@ +version: 2 + +sphinx: + configuration: docs/conf.py + +python: + version: '3.8' + install: + - requirements: docs/requirements.txt \ No newline at end of file
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/MANIFEST.in -> _service:tar_scm:pygobject-3.44.1.tar.xz/MANIFEST.in
Changed
@@ -7,12 +7,13 @@ include pygobject.doap include README.rst include .gitlab-ci.yml +include *.yaml include subprojects/*.wrap include meson.build include meson_options.txt recursive-include examples *.py *.png *.css *.ui *.gif *.gresource *.jpg *.xml recursive-include gi *.h meson.build recursive-include tests *.py *.c *.h *.xml *.supp meson.build -recursive-include docs *.rst *.svg LICENSE *.ico *.png *.css *.py *.dia Makefile +recursive-include docs *.rst *.svg LICENSE *.ico *.png *.css *.py *.dia Makefile *.txt recursive-include .gitlab-ci *.sh *.rst *.py Dockerfile* lcovrc recursive-include pygtkcompat meson.build
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/NEWS -> _service:tar_scm:pygobject-3.44.1.tar.xz/NEWS
Changed
@@ -1,3 +1,33 @@ +3.44.1 - 2023-03-24 +------------------- + +* Fix tests with glib 2.76 :mr:`240` + + +3.44.0 - 2023-03-19 +------------------- + +No changes compared to 3.43.1 + + +3.43.1 - 2023-01-28 +------------------- + +* Note: PyGObject is in need of more maintainers, please read + https://www.bassi.io/articles/2022/12/02/on-pygobject/ +* Note: This is an unstable release. + +* Drop support for Python 3.6 :mr:`184` +* meson: bump minimum version to 0.53.0 and update subprojects :mr:`227` +* gimodule: fix floating state of python objects created with g_object_new :mr:`129` +* Gtk.Template: Accept PathLike objects as a filename :mr:`195` +* info: Show which type/object callables are bound to :mr:`194` +* IntrospectionModule: handle two threads loading type at same time :mr:`149` +* Port to Py_TRASHCAN_BEGIN :mr:`226` +* Other cleanups/improvements: :mr:`181` :mr:`173` +* This release also includes all changes from 3.42.1 and 3.42.2 + + 3.42.2 - 2022-07-16 -------------------
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/PKG-INFO -> _service:tar_scm:pygobject-3.44.1.tar.xz/PKG-INFO
Changed
@@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: PyGObject -Version: 3.42.2 +Version: 3.44.1 Summary: Python bindings for GObject Introspection Home-page: https://pygobject.readthedocs.io Author: James Henstridge @@ -17,7 +17,7 @@ Classifier: Programming Language :: C Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.6, <4 +Requires-Python: >=3.7, <4 License-File: COPYING .. image:: https://pygobject.readthedocs.io/en/latest/_images/pygobject.svg @@ -34,7 +34,7 @@ <https://developer.gnome.org/glib/stable/>`__, `GIO <https://developer.gnome.org/gio/stable/>`__ and many more. -It supports Linux, Windows and macOS and works with **Python 3.6+** and +It supports Linux, Windows and macOS and works with **Python 3.7+** and **PyPy3**. PyGObject, including this documentation, is licensed under the **LGPLv2.1+**. @@ -42,5 +42,3 @@ ---- For more information visit https://pygobject.readthedocs.io - -
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/PKG-INFO.in -> _service:tar_scm:pygobject-3.44.1.tar.xz/PKG-INFO.in
Changed
@@ -18,4 +18,4 @@ Classifier: Programming Language :: C Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.6, <4 +Requires-Python: >=3.7, <4
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/PyGObject.egg-info/PKG-INFO -> _service:tar_scm:pygobject-3.44.1.tar.xz/PyGObject.egg-info/PKG-INFO
Changed
@@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: PyGObject -Version: 3.42.2 +Version: 3.44.1 Summary: Python bindings for GObject Introspection Home-page: https://pygobject.readthedocs.io Author: James Henstridge @@ -17,7 +17,7 @@ Classifier: Programming Language :: C Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=3.6, <4 +Requires-Python: >=3.7, <4 License-File: COPYING .. image:: https://pygobject.readthedocs.io/en/latest/_images/pygobject.svg @@ -34,7 +34,7 @@ <https://developer.gnome.org/glib/stable/>`__, `GIO <https://developer.gnome.org/gio/stable/>`__ and many more. -It supports Linux, Windows and macOS and works with **Python 3.6+** and +It supports Linux, Windows and macOS and works with **Python 3.7+** and **PyPy3**. PyGObject, including this documentation, is licensed under the **LGPLv2.1+**. @@ -42,5 +42,3 @@ ---- For more information visit https://pygobject.readthedocs.io - -
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/PyGObject.egg-info/SOURCES.txt -> _service:tar_scm:pygobject-3.44.1.tar.xz/PyGObject.egg-info/SOURCES.txt
Changed
@@ -1,4 +1,5 @@ .gitlab-ci.yml +.readthedocs.yaml COPYING MANIFEST.in NEWS @@ -44,6 +45,7 @@ docs/index.rst docs/maintguide.rst docs/packagingguide.rst +docs/requirements.txt docs/devguide/building_testing.rst docs/devguide/dev_environ.rst docs/devguide/index.rst
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/README.rst -> _service:tar_scm:pygobject-3.44.1.tar.xz/README.rst
Changed
@@ -12,7 +12,7 @@ <https://developer.gnome.org/glib/stable/>`__, `GIO <https://developer.gnome.org/gio/stable/>`__ and many more. -It supports Linux, Windows and macOS and works with **Python 3.6+** and +It supports Linux, Windows and macOS and works with **Python 3.7+** and **PyPy3**. PyGObject, including this documentation, is licensed under the **LGPLv2.1+**.
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/docs/getting_started.rst -> _service:tar_scm:pygobject-3.44.1.tar.xz/docs/getting_started.rst
Changed
@@ -34,7 +34,7 @@ Tutorial <https://python-gtk-3-tutorial.readthedocs.io>`__" for more examples on how to create GTK apps and the "`PyGObject API Reference <https://lazka.github.io/pgi-docs>`__" for API documentation for all supported -libraries. +libraries. There are also typing stubs available here `PyGObject-stubs <https://pypi.org/project/PyGObject-stubs/>`_. .. _windows-getting-started:
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/docs/guide/deploy.rst -> _service:tar_scm:pygobject-3.44.1.tar.xz/docs/guide/deploy.rst
Changed
@@ -44,9 +44,11 @@ * `MyPaint <http://mypaint.org/>`__ provides a Windows installer based on MSYS2 and Inno Setup. It uses SCons for building/installing the application. -* ...? +* `Passphraser <https://github.com/zevlee/passphraser>`__ uses the Hello World + GTK template build system (see below). Other options ------------- * `PyInstaller <http://www.pyinstaller.org/>`_ is a program that freezes (packages) Python programs into stand-alone executables, under Windows, Linux, Mac OS X, and more. PyInstaller's packager has built-in support for automatically including PyGObject dependencies with your application without requiring additional configuration. +* `Hello World GTK <https://github.com/zevlee/hello-world-gtk>`_ is a template build system for distributing Python-based GTK applications on Windows, macOS, and Linux. First, an application directory is assembled using PyInstaller. Then, a different program is used to package the resulting directory. For Windows, NSIS3 is used. For macOS, the built-in hdiutil is used. For Linux, AppImageKit is used.
View file
_service:tar_scm:pygobject-3.44.1.tar.xz/docs/requirements.txt
Added
@@ -0,0 +1,2 @@ +sphinx>=4.0,<5.0 +sphinx-rtd-theme>=0.5,<2.0 \ No newline at end of file
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/examples/demo/demos/combobox.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/examples/demo/demos/combobox.py
Changed
@@ -209,7 +209,7 @@ path = tree_model.get_path(treeiter) indices = path.get_indices() - sensitive = not(indices0 == 1) + sensitive = not (indices0 == 1) cell.set_property('sensitive', sensitive)
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/_gtktemplate.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/_gtktemplate.py
Changed
@@ -17,6 +17,7 @@ # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 # USA +import os from collections import abc from functools import partial @@ -296,7 +297,7 @@ return cls else: assert self.filename is not None - file_ = Gio.File.new_for_path(self.filename) + file_ = Gio.File.new_for_path(os.fspath(self.filename)) bytes_ = GLib.Bytes.new(file_.load_contents()1) cls.set_template(bytes_) register_template(cls)
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/gimodule.c -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/gimodule.c
Changed
@@ -1091,9 +1091,18 @@ /* this looks like a python object created through * g_object_new -> we have no python wrapper, so create it * now */ - wrapper = pygobject_new_full(object, - /*steal=*/ FALSE, - g_class); + + if (g_object_is_floating (object)) { + g_object_ref (object); + wrapper = pygobject_new_full(object, + /*steal=*/ TRUE, + g_class); + g_object_force_floating (object); + } else { + wrapper = pygobject_new_full(object, + /*steal=*/ FALSE, + g_class); + } /* float the wrapper ref here because we are going to orphan it * so we don't destroy the wrapper. The next call to pygobject_new_full @@ -1316,7 +1325,7 @@ /* store pointer to the class with the GType */ Py_INCREF(class); - g_type_set_qdata(instance_type, g_quark_from_string("PyGObject::class"), + g_type_set_qdata(instance_type, pygobject_class_key, class); /* Mark this GType as a custom python type */
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/module.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/module.py
Changed
@@ -21,6 +21,7 @@ # USA import importlib +from threading import Lock import gi @@ -117,6 +118,8 @@ if self._version is None: self._version = repository.get_version(self._namespace) + self._lock = Lock() + def __getattr__(self, name): info = repository.find_by_name(self._namespace, name) if not info: @@ -125,39 +128,41 @@ if isinstance(info, EnumInfo): g_type = info.get_g_type() - wrapper = g_type.pytype - if wrapper is None: - if info.is_flags(): - if g_type.is_a(TYPE_FLAGS): - wrapper = flags_add(g_type) - else: - assert g_type == TYPE_NONE - wrapper = flags_register_new_gtype_and_add(info) - else: - if g_type.is_a(TYPE_ENUM): - wrapper = enum_add(g_type) + with self._lock: + wrapper = g_type.pytype + + if wrapper is None: + if info.is_flags(): + if g_type.is_a(TYPE_FLAGS): + wrapper = flags_add(g_type) + else: + assert g_type == TYPE_NONE + wrapper = flags_register_new_gtype_and_add(info) else: - assert g_type == TYPE_NONE - wrapper = enum_register_new_gtype_and_add(info) - - wrapper.__info__ = info - wrapper.__module__ = 'gi.repository.' + info.get_namespace() - - # Don't use upper() here to avoid locale specific - # identifier conversion (e. g. in Turkish 'i'.upper() == 'i') - # see https://bugzilla.gnome.org/show_bug.cgi?id=649165 - ascii_upper_trans = ''.maketrans( - 'abcdefgjhijklmnopqrstuvwxyz', - 'ABCDEFGJHIJKLMNOPQRSTUVWXYZ') - for value_info in info.get_values(): - value_name = value_info.get_name_unescaped().translate(ascii_upper_trans) - setattr(wrapper, value_name, wrapper(value_info.get_value())) - for method_info in info.get_methods(): - setattr(wrapper, method_info.__name__, method_info) - - if g_type != TYPE_NONE: - g_type.pytype = wrapper + if g_type.is_a(TYPE_ENUM): + wrapper = enum_add(g_type) + else: + assert g_type == TYPE_NONE + wrapper = enum_register_new_gtype_and_add(info) + + wrapper.__info__ = info + wrapper.__module__ = 'gi.repository.' + info.get_namespace() + + # Don't use upper() here to avoid locale specific + # identifier conversion (e. g. in Turkish 'i'.upper() == 'i') + # see https://bugzilla.gnome.org/show_bug.cgi?id=649165 + ascii_upper_trans = ''.maketrans( + 'abcdefgjhijklmnopqrstuvwxyz', + 'ABCDEFGJHIJKLMNOPQRSTUVWXYZ') + for value_info in info.get_values(): + value_name = value_info.get_name_unescaped().translate(ascii_upper_trans) + setattr(wrapper, value_name, wrapper(value_info.get_value())) + for method_info in info.get_methods(): + setattr(wrapper, method_info.__name__, method_info) + + if g_type != TYPE_NONE: + g_type.pytype = wrapper elif isinstance(info, RegisteredTypeInfo): g_type = info.get_g_type() @@ -188,27 +193,28 @@ else: raise NotImplementedError(info) - # Check if there is already a Python wrapper that is not a parent class - # of the wrapper being created. If it is a parent, it is ok to clobber - # g_type.pytype with a new child class wrapper of the existing parent. - # Note that the return here never occurs under normal circumstances due - # to caching on the __dict__ itself. - if g_type != TYPE_NONE: - type_ = g_type.pytype - if type_ is not None and type_ not in bases: - self.__dict__name = type_ - return type_ - - dict_ = { - '__info__': info, - '__module__': 'gi.repository.' + self._namespace, - '__gtype__': g_type - } - wrapper = metaclass(name, bases, dict_) - - # Register the new Python wrapper. - if g_type != TYPE_NONE: - g_type.pytype = wrapper + with self._lock: + # Check if there is already a Python wrapper that is not a parent class + # of the wrapper being created. If it is a parent, it is ok to clobber + # g_type.pytype with a new child class wrapper of the existing parent. + # Note that the return here never occurs under normal circumstances due + # to caching on the __dict__ itself. + if g_type != TYPE_NONE: + type_ = g_type.pytype + if type_ is not None and type_ not in bases: + self.__dict__name = type_ + return type_ + + dict_ = { + '__info__': info, + '__module__': 'gi.repository.' + self._namespace, + '__gtype__': g_type + } + wrapper = metaclass(name, bases, dict_) + + # Register the new Python wrapper. + if g_type != TYPE_NONE: + g_type.pytype = wrapper elif isinstance(info, FunctionInfo): wrapper = info
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/pygi-closure.c -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/pygi-closure.c
Changed
@@ -630,10 +630,8 @@ PyGILState_Release (py_state); } -void _pygi_invoke_closure_free (gpointer data) +void _pygi_invoke_closure_free (PyGICClosure* invoke_closure) { - PyGICClosure* invoke_closure = (PyGICClosure *) data; - g_callable_info_free_closure (invoke_closure->info, invoke_closure->closure); @@ -653,7 +651,7 @@ PyGIClosureCache *cache, GIScopeType scope, PyObject *py_function, - gpointer py_user_data) + PyObject *py_user_data) { PyGICClosure *closure; ffi_closure *fficlosure;
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/pygi-closure.h -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/pygi-closure.h
Changed
@@ -47,13 +47,13 @@ void _pygi_closure_handle (ffi_cif *cif, void *result, void **args, void *userdata); -void _pygi_invoke_closure_free (gpointer user_data); +void _pygi_invoke_closure_free (PyGICClosure* invoke_closure); PyGICClosure* _pygi_make_native_closure (GICallableInfo* info, PyGIClosureCache *cache, GIScopeType scope, PyObject *function, - gpointer user_data); + PyObject *user_data); PyGIArgCache *pygi_arg_callback_new_from_info (GITypeInfo *type_info, GIArgInfo *arg_info, /* may be null */
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/pygi-info.c -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/pygi-info.c
Changed
@@ -560,6 +560,33 @@ } } +static PyObject * +_callable_info_repr (PyGICallableInfo *self) +{ + PyObject *bound_repr_o = NULL; + const char *bound_repr = "None"; + PyObject *res = NULL; + + if (self->py_bound_arg) { + bound_repr_o = PyObject_Repr(self->py_bound_arg); + if (bound_repr_o == NULL) + goto out; + + bound_repr = PyUnicode_AsUTF8(bound_repr_o); + if (bound_repr == NULL) + goto out; + } + + res = PyUnicode_FromFormat ("%s(%s, bound=%s)", + Py_TYPE( (PyObject *) self)->tp_name, + _safe_base_info_get_name (self->base.info), + bound_repr); + +out: + Py_XDECREF(bound_repr_o); + + return res; +} /* _function_info_call: * @@ -2303,6 +2330,7 @@ } PyGICallableInfo_Type.tp_call = (ternaryfunc) _callable_info_call; + PyGICallableInfo_Type.tp_repr = (reprfunc) _callable_info_repr; PyGICallableInfo_Type.tp_dealloc = (destructor) _callable_info_dealloc; _PyGI_REGISTER_TYPE (m, PyGICallableInfo_Type, CallableInfo, PyGIBaseInfo_Type);
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/pygi-resulttuple.c -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/pygi-resulttuple.c
Changed
@@ -309,7 +309,7 @@ Py_ssize_t i, len; PyObject_GC_UnTrack (self); - Py_TRASHCAN_SAFE_BEGIN (self) + CPy_TRASHCAN_BEGIN (self, resulttuple_dealloc) /* Free the tuple items and, if there is space, save the tuple object * pointer to the front of the free list for its size. Otherwise free it. @@ -331,7 +331,7 @@ Py_TYPE (self)->tp_free (self); done: - Py_TRASHCAN_SAFE_END (self) + CPy_TRASHCAN_END (self) } #endif
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/gi/pygi-util.h -> _service:tar_scm:pygobject-3.44.1.tar.xz/gi/pygi-util.h
Changed
@@ -16,6 +16,14 @@ # define Py_SET_TYPE(obj, type) ((Py_TYPE(obj) = (type)), (void)0) #endif +#if PY_VERSION_HEX >= 0x03080000 +# define CPy_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_BEGIN(op, dealloc) +# define CPy_TRASHCAN_END(op) Py_TRASHCAN_END +#else +# define CPy_TRASHCAN_BEGIN(op, dealloc) Py_TRASHCAN_SAFE_BEGIN(op) +# define CPy_TRASHCAN_END(op) Py_TRASHCAN_SAFE_END(op) +#endif + #define PYGI_DEFINE_TYPE(typename, symbol, csymbol) \ PyTypeObject symbol = { \ PyVarObject_HEAD_INIT(NULL, 0) \
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/meson.build -> _service:tar_scm:pygobject-3.44.1.tar.xz/meson.build
Changed
@@ -1,6 +1,6 @@ project('pygobject', 'c', - version : '3.42.2', - meson_version : '>= 0.47.0', + version : '3.44.1', + meson_version : '>= 0.53.0', default_options : 'warning_level=1', 'buildtype=debugoptimized') @@ -15,8 +15,8 @@ pymod = import('python') python = pymod.find_installation(get_option('python')) -if python.language_version().version_compare('< 3.6') - error('Requires Python >= 3.6') +if python.language_version().version_compare('< 3.7') + error('Requires Python >= 3.7') endif python_dep = python.dependency()
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/pygobject.doap -> _service:tar_scm:pygobject-3.44.1.tar.xz/pygobject.doap
Changed
@@ -31,13 +31,6 @@ </maintainer> <maintainer> <foaf:Person> - <foaf:name>Martin Pitt</foaf:name> - <foaf:mbox rdf:resource="mailto:martinpitt@gnome.org" /> - <gnome:userid>martinpitt</gnome:userid> - </foaf:Person> - </maintainer> - <maintainer> - <foaf:Person> <foaf:name>Paolo Borelli</foaf:name> <foaf:mbox rdf:resource="mailto:pborelli@gnome.org" /> <gnome:userid>pborelli</gnome:userid>
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/pyproject.toml -> _service:tar_scm:pygobject-3.44.1.tar.xz/pyproject.toml
Changed
@@ -1,19 +1,19 @@ tool.poetry name = "PyGObject" -version = "3.42.2" +version = "3.44.1" description = "Python bindings for GObject Introspection" authors = "Christoph Reiter" tool.poetry.dependencies -python = "^3.6" +python = "^3.7" pycairo = "^1.16" tool.poetry.dev-dependencies -pytest = "^6.0.0" +pytest = "^7.0.0" flake8 = "^3.9.1" -Sphinx = "^3.5.4" -sphinx-rtd-theme = "^0.5.2" -coverage = "^5.5" +Sphinx = "^3.5.4|^4.2.0" +sphinx-rtd-theme = "^0.5.2|^1.0.0" +coverage = "^6.3.2" build-system requires = "setuptools", "wheel", "pycairo"
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/setup.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/setup.py
Changed
@@ -36,7 +36,7 @@ from distutils.spawn import find_executable -PYGOBJECT_VERSION = "3.42.2" +PYGOBJECT_VERSION = "3.44.1" GLIB_VERSION_REQUIRED = "2.56.0" GI_VERSION_REQUIRED = "1.56.0" PYCAIRO_VERSION_REQUIRED = "1.16.0"
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/subprojects/libffi.wrap -> _service:tar_scm:pygobject-3.44.1.tar.xz/subprojects/libffi.wrap
Changed
@@ -1,5 +1,8 @@ wrap-git directory=libffi -url=https://github.com/centricular/libffi.git +url=https://gitlab.freedesktop.org/gstreamer/meson-ports/libffi.git revision=meson depth=1 + +provide +libffi = ffi_dep
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/subprojects/pycairo.wrap -> _service:tar_scm:pygobject-3.44.1.tar.xz/subprojects/pycairo.wrap
Changed
@@ -1,5 +1,5 @@ wrap-git directory=pycairo url=https://github.com/pygobject/pycairo.git -revision=pycairo-1.18 +revision=main depth=1
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/tests/test_gi.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/tests/test_gi.py
Changed
@@ -637,7 +637,7 @@ errors = (AttributeError,) if platform.python_implementation() == "PyPy": - # https://bitbucket.org/pypy/pypy/issues/2788 + # https://foss.heptapod.net/pypy/pypy/-/issues/2788 errors = (AttributeError, TypeError) self.assertRaises(errors, check_readonly, GObject.TYPE_NONE)
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/tests/test_overrides_gio.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/tests/test_overrides_gio.py
Changed
@@ -256,7 +256,7 @@ def do_set(count, key, new_count): if count == 0 and key.step is not None \ and platform.python_implementation() == "PyPy": - # https://bitbucket.org/pypy/pypy/issues/2804 + # https://foss.heptapod.net/pypy/pypy/-/issues/2804 return store = Gio.ListStore.new(Item) source = Item() for i in range(count)
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/tests/test_properties.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/tests/test_properties.py
Changed
@@ -688,7 +688,7 @@ # we test known-bad values here which cause Gtk-WARNING logs. # Explicitly allow these for this test. - with capture_glib_warnings(allow_warnings=True): + with capture_glib_warnings(allow_warnings=True, allow_criticals=True): o = C() self.assertEqual(o.prop_int, 1)
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/tests/test_repository.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/tests/test_repository.py
Changed
@@ -364,7 +364,7 @@ # also raise a RuntimeError. GIMarshallingTests.NoTypeFlags # cause flags registration info = repo.find_by_name('GIMarshallingTests', 'NoTypeFlags') - with capture_glib_warnings(allow_warnings=True): + with capture_glib_warnings(allow_warnings=True, allow_criticals=True): self.assertRaises(RuntimeError, GIRepository.flags_register_new_gtype_and_add, info) @@ -374,7 +374,7 @@ # also raise a RuntimeError. GIMarshallingTests.Enum # cause enum registration info = repo.find_by_name('GIMarshallingTests', 'Enum') - with capture_glib_warnings(allow_warnings=True): + with capture_glib_warnings(allow_warnings=True, allow_criticals=True): self.assertRaises(RuntimeError, GIRepository.enum_register_new_gtype_and_add, info)
View file
_service:tar_scm:pygobject-3.42.2.tar.xz/tests/test_signal.py -> _service:tar_scm:pygobject-3.44.1.tar.xz/tests/test_signal.py
Changed
@@ -365,7 +365,7 @@ self.count += 1 def _callback_invalid_stop_emission_name(self, obj, prop): - with capture_glib_warnings(allow_warnings=True) as warn: + with capture_glib_warnings(allow_warnings=True, allow_criticals=True) as warn: obj.stop_emission_by_name('notasignal::baddetail') self.emission_error = True self.assertTrue(warn)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2