summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml65
-rw-r--r--.version2
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--MANIFEST1
-rw-r--r--MANIFEST.in1
-rw-r--r--Makefile.am3
-rw-r--r--Makefile.in38
-rw-r--r--NEWS59
-rw-r--r--PKG-INFO2
-rw-r--r--aclocal.m469
-rwxr-xr-xbuild-aux/compile6
-rwxr-xr-xbuild-aux/depcomp2
-rwxr-xr-xbuild-aux/install-sh161
-rwxr-xr-x[-rw-r--r--]build-aux/ltmain.sh10
-rwxr-xr-xbuild-aux/missing2
-rwxr-xr-xbuild-aux/py-compile35
-rwxr-xr-xbuild-aux/tap-driver.sh4
-rwxr-xr-xbuild-aux/test-driver10
-rwxr-xr-xconfigure68
-rw-r--r--configure.ac5
-rw-r--r--dbus-gmain/Makefile.in7
-rw-r--r--dbus/decorators.py11
-rw-r--r--dbus/service.py6
-rw-r--r--dbus_bindings/unixfd.c13
-rw-r--r--dbus_python.egg-info/PKG-INFO2
-rw-r--r--dbus_python.egg-info/SOURCES.txt1
-rw-r--r--debian/changelog14
-rw-r--r--debian/control2
-rw-r--r--debian/python3-dbus-tests.lintian-overrides4
-rw-r--r--debian/python3-dbus.lintian-overrides1
-rwxr-xr-xexamples/example-async-client.py24
-rwxr-xr-xexamples/example-client.py22
-rwxr-xr-xexamples/example-service.py18
-rwxr-xr-xexamples/example-signal-emitter.py14
-rwxr-xr-xexamples/example-signal-recipient.py28
-rwxr-xr-xexamples/gconf-proxy-client.py6
-rwxr-xr-xexamples/gconf-proxy-service2.py28
-rwxr-xr-xexamples/list-system-services.py8
-rwxr-xr-xexamples/unix-fd-client.py16
-rwxr-xr-xexamples/unix-fd-service.py22
-rw-r--r--m4/libtool.m410
-rw-r--r--m4/pkg.m416
-rwxr-xr-xtest/cross-test-client.py6
-rwxr-xr-xtest/cross-test-server.py12
-rwxr-xr-xtest/test-client.py11
-rwxr-xr-xtest/test-p2p.py5
-rwxr-xr-xtest/test-service.py10
-rwxr-xr-xtest/test-signals.py15
-rwxr-xr-xtest/test-standalone.py3
49 files changed, 504 insertions, 376 deletions
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 62e671a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-# Copyright © 2016 Simon McVittie
-#
-# SPDX-License-Identifier: MIT
-#
-# Permission is hereby granted, free of charge, to any person
-# obtaining a copy of this software and associated documentation
-# files (the "Software"), to deal in the Software without
-# restriction, including without limitation the rights to use, copy,
-# modify, merge, publish, distribute, sublicense, and/or sell copies
-# of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-
-sudo: required
-dist: xenial
-language: python
-cache:
- pip: true
- directories:
- - $HOME/.ccache
-install:
- - test -z "$dbus_ci_system_python" || deactivate
- - ./tools/ci-install.sh
-python:
- - "3.6"
- - "3.6-dev"
- - "3.7-dev"
- - "3.8-dev"
- - "nightly"
-script:
- - PATH="/usr/lib/ccache:$PATH" ./tools/ci-build.sh
-
-matrix:
- include:
- - python: "2.7"
- env:
- dbus_ci_system_python=python
- - python: "2.7"
- env:
- dbus_ci_system_python=python-dbg
- - python: "3.5"
- env:
- dbus_ci_system_python=python3
- - python: "3.5"
- env:
- dbus_ci_system_python=python3-dbg
- - python: "3.7"
- env:
- ci_distro=debian ci_docker=debian:buster-slim ci_suite=buster dbus_ci_system_python=python3
- - python: "3.7"
- env:
- ci_distro=debian ci_docker=debian:buster-slim ci_suite=buster dbus_ci_system_python=python3-dbg
-
-# vim:set sw=2 sts=2 et:
diff --git a/.version b/.version
index f69752a..591bdbc 100644
--- a/.version
+++ b/.version
@@ -1 +1 @@
-1.2.16
+1.2.18
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 75937a6..7b1da64 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -165,7 +165,7 @@ so you should have an issue number or a merge request ID to refer to.
#### Pre-release steps
-* Make sure CI (currently Travis-CI and Gitlab) is passing
+* Make sure CI (currently Gitlab-CI) is passing
* Update `NEWS` and the version number in `configure.ac`, and commit them
#### Building and uploading the release
diff --git a/MANIFEST b/MANIFEST
index c328504..50fa752 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,3 @@
-.travis.yml
.version
AUTHORS
CONTRIBUTING.md
diff --git a/MANIFEST.in b/MANIFEST.in
index 3d378dd..42eec34 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,4 +1,3 @@
-include .travis.yml
include .version
include AUTHORS
include CONTRIBUTING.md
diff --git a/Makefile.am b/Makefile.am
index 5780cce..fb5390f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,6 +4,8 @@ installed_testdir = ${libexecdir}/installed-tests/${PACKAGE_TARNAME}
installed_test_testdir = ${installed_testdir}/test
installed_test_metadir = ${datadir}/installed-tests/${PACKAGE_TARNAME}
+AM_DISTCHECK_CONFIGURE_FLAGS = PYTHON=$(PYTHON)
+
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = dbus-gmain .
@@ -11,7 +13,6 @@ CLEANFILES = \
test/test-service.log \
$(NULL)
EXTRA_DIST = \
- .travis.yml \
AUTHORS \
CONTRIBUTING.md \
COPYING \
diff --git a/Makefile.in b/Makefile.in
index cd89230..bb64318 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -339,7 +339,7 @@ am__nobase_dist_installed_test_PYTHON_DIST = test/crosstest.py \
test/dbus_test_utils.py
am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
am__pep3147_tweak = \
- sed -e 's|\.py$$||' -e 's|[^/]*$$|&.*.pyc\n&.*.pyo|'
+ sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.pyc __pycache__/&.*.pyo|'
am__nobase_python_PYTHON_DIST = dbus/bus.py dbus/connection.py \
dbus/_compat.py dbus/_dbus.py dbus/decorators.py \
dbus/exceptions.py dbus/_expat_introspect_parser.py \
@@ -360,8 +360,8 @@ am__recursive_targets = \
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
cscope check recheck distdir distdir-am dist dist-all \
distcheck
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
- $(LISP)config.h.in
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+ config.h.in
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
@@ -536,6 +536,7 @@ am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
RECHECK_LOGS = $(TEST_LOGS)
am__EXEEXT_2 = test/test-client.py test/test-p2p.py \
test/test-signals.py test/test-standalone.py \
@@ -613,6 +614,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -767,16 +770,17 @@ top_srcdir = @top_srcdir@
installed_testdir = ${libexecdir}/installed-tests/${PACKAGE_TARNAME}
installed_test_testdir = ${installed_testdir}/test
installed_test_metadir = ${datadir}/installed-tests/${PACKAGE_TARNAME}
+AM_DISTCHECK_CONFIGURE_FLAGS = PYTHON=$(PYTHON)
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = dbus-gmain .
CLEANFILES = test/test-service.log $(NULL) $(noinst_DATA) \
$(installed_test_test_data) $(installed_test_metadata)
# A hack used for the HTML documentation on dbus.freedesktop.org
-EXTRA_DIST = .travis.yml AUTHORS CONTRIBUTING.md COPYING \
- dbus-python.pc.in doc/_static/.gitignore \
- examples/example-async-client.py examples/example-client.py \
- examples/example-service.py examples/example-signal-emitter.py \
+EXTRA_DIST = AUTHORS CONTRIBUTING.md COPYING dbus-python.pc.in \
+ doc/_static/.gitignore examples/example-async-client.py \
+ examples/example-client.py examples/example-service.py \
+ examples/example-signal-emitter.py \
examples/example-signal-recipient.py \
examples/gconf-proxy-client.py \
examples/gconf-proxy-service2.py \
@@ -1484,7 +1488,7 @@ uninstall-nobase_dist_installed_testPYTHON:
for files in "$$py_files" "$$pyc_files" "$$pyo_files"; do \
$(am__uninstall_files_from_dir) || st=$$?; \
done; \
- dir='$(DESTDIR)$(installed_testdir)/__pycache__'; \
+ dir='$(DESTDIR)$(installed_testdir)'; \
echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \
while read files; do \
$(am__uninstall_files_from_dir) || st=$$?; \
@@ -1526,7 +1530,7 @@ uninstall-nobase_pythonPYTHON:
for files in "$$py_files" "$$pyc_files" "$$pyo_files"; do \
$(am__uninstall_files_from_dir) || st=$$?; \
done; \
- dir='$(DESTDIR)$(pythondir)/__pycache__'; \
+ dir='$(DESTDIR)$(pythondir)'; \
echo "$$py_files" | $(am__pep3147_tweak) | $(am__base_list) | \
while read files; do \
$(am__uninstall_files_from_dir) || st=$$?; \
@@ -1830,7 +1834,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
@@ -1986,6 +1990,10 @@ dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
+dist-zstd: distdir
+ tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+ $(am__post_remove_distdir)
+
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@@ -2028,6 +2036,8 @@ distcheck: dist
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
+ *.tar.zst*) \
+ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
@@ -2043,7 +2053,7 @@ distcheck: dist
$(DISTCHECK_CONFIGURE_FLAGS) \
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
@@ -2295,7 +2305,7 @@ uninstall-am: uninstall-dbusincludeHEADERS \
clean-noinstPROGRAMS clean-pyexecLTLIBRARIES cscope \
cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
- dist-zip distcheck distclean distclean-compile \
+ dist-zip dist-zstd distcheck distclean distclean-compile \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
diff --git a/NEWS b/NEWS
index f1839e4..2ea3ef4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,62 @@
+dbus Python Bindings 1.2.18 (2021-07-20)
+========================================
+
+Build-time configuration changes:
+
+• dbus-python will be built for python3 if neither PYTHON nor
+ PYTHON_VERSION is specified. Use a command like
+
+ ./configure PYTHON=$(command -v python2)
+
+ if installation for Python 2 (EOL 2020-01-01) is required.
+
+Dependencies:
+
+• Python 2 reached end-of-life on 2020-01-01. A future version of
+ dbus-python is likely to remove Python 2 support.
+
+Fixes:
+
+• Move from collections.Sequence to collections.abc.Sequence on
+ Python ≥ 3.3, for Python 3.10 compatibility
+ (dbus-python#37; Simon McVittie)
+
+• Avoid another deprecation warning for inspect.getargspec().
+ This is similar to the one fixed in 1.2.4, but for dbus.decorators.signal
+ rather than dbus.decorators.method. (dbus-python!8; Martin Stumpf)
+
+• Fix an unlikely fd leak if memory allocation fails for UnixFd
+ (dbus-python!9, Red Hat #1938703; David King)
+
+• Fix memory and fd leak if UnixFd is given an invalid negative
+ variant_level (Simon McVittie)
+
+• Avoid more deprecation warnings:
+ - gi.repository.GObject.MainLoop etc. (now used via gi.repository.GLib)
+ - gi.repository.GLib.threads_init (no longer necessary at all)
+ (Simon McVittie)
+
+• Disable -Wdeclaration-after-statement. Python 3.9 relies on intermixed
+ declarations and statements in its headers, so we can no longer
+ enforce this. (Simon McVittie)
+
+• Convert examples to Python 3 (Simon McVittie)
+
+• Use the same Python executable for build and dist/distcheck by default
+ (Simon McVittie)
+
+CI fixes:
+
+• Stop installing tap.py for Python 2. The latest version only supports
+ Python 3. (Simon McVittie)
+
+• Move from Python 3.8 on Debian unstable (no longer available) to
+ 3.9 on Debian 11 (Simon McVittie)
+
+• Also test with Python 3.10 on Ubuntu 21.10 (Simon McVittie)
+
+• Remove Travis-CI integration, only use Gitlab-CI (Simon McVittie)
+
dbus Python Bindings 1.2.16 (2020-01-14)
========================================
diff --git a/PKG-INFO b/PKG-INFO
index c4bce47..88feda4 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: dbus-python
-Version: 1.2.16
+Version: 1.2.18
Summary: Python bindings for libdbus
Home-page: http://www.freedesktop.org/wiki/Software/DBusBindings/#python
Maintainer: The D-Bus maintainers
diff --git a/aclocal.m4 b/aclocal.m4
index 0cd1d6c..9bb5b09 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.16.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,7 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2018 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.16'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.16.1], [],
+m4_if([$1], [1.16.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.1])dnl
+[AM_AUTOMAKE_VERSION([1.16.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +110,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -141,7 +141,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -332,7 +332,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -371,7 +371,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
done
if test $am_rc -ne 0; then
AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE="gmake" (or whatever is
+ necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).])
fi
@@ -398,7 +400,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -595,7 +597,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -616,7 +618,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2018 Free Software Foundation, Inc.
+# Copyright (C) 2003-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -638,7 +640,7 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -673,7 +675,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -716,7 +718,7 @@ AC_SUBST([am__quote])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2018 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -737,12 +739,7 @@ AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
@@ -755,7 +752,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -784,7 +781,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -831,7 +828,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -914,12 +911,14 @@ AC_DEFUN([AM_PATH_PYTHON],
m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
else
- dnl Query Python for its version number. Getting [:3] seems to be
- dnl the best way to do this; it's what "site.py" does in the standard
- dnl library.
+ dnl Query Python for its version number. Although site.py simply uses
+ dnl sys.version[:3], printing that failed with Python 3.10, since the
+ dnl trailing zero was eliminated. So now we output just the major
+ dnl and minor version numbers, as numbers. Apparently the tertiary
+ dnl version is not of interest.
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
- [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+ [am_cv_python_version=`$PYTHON -c "import sys; print('%u.%u' % sys.version_info[[:2]])"`])
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
dnl Use the values of $prefix and $exec_prefix for the corresponding
@@ -1069,7 +1068,7 @@ for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
sys.exit(sys.hexversion < minverhex)"
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1088,7 +1087,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1169,7 +1168,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2018 Free Software Foundation, Inc.
+# Copyright (C) 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1229,7 +1228,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2018 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1257,7 +1256,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2018 Free Software Foundation, Inc.
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1276,7 +1275,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2018 Free Software Foundation, Inc.
+# Copyright (C) 2004-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/build-aux/compile b/build-aux/compile
index 99e5052..23fcba0 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
- CYGWIN*)
+ CYGWIN* | MSYS*)
file_conv=cygwin
;;
*)
@@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
- cygwin/*)
+ cygwin/* | msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
diff --git a/build-aux/depcomp b/build-aux/depcomp
index 65cbf70..6b39162 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1999-2018 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/build-aux/install-sh b/build-aux/install-sh
index 8175c64..ec298b5 100755
--- a/build-aux/install-sh
+++ b/build-aux/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2018-03-11.20; # UTC
+scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -69,6 +69,11 @@ posix_mkdir=
# Desired mode of installed file.
mode=0755
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@@ -99,18 +104,28 @@ Options:
--version display version info and exit.
-c (ignored)
- -C install only if different (preserve the last data modification time)
+ -C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
-s $stripprog installed files.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@@ -137,8 +152,13 @@ while test $# -ne 0; do
-o) chowncmd="$chownprog $2"
shift;;
+ -p) cpprog="$cpprog -p";;
+
-s) stripcmd=$stripprog;;
+ -S) backupsuffix="$2"
+ shift;;
+
-t)
is_target_a_directory=always
dst_arg=$2
@@ -255,6 +275,10 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -301,22 +325,6 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
@@ -326,52 +334,49 @@ do
fi
posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- # Note that $RANDOM variable is not portable (e.g. dash); Use it
- # here however when possible just to lower collision chance.
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-
- trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- # Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writeable /tmp, make sure that the '$tmpdir'
- # directory is successfully created first before we actually test
- # 'mkdir -p' feature.
- if (umask $mkdir_umask &&
- $mkdirprog $mkdir_mode "$tmpdir" &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- test_tmpdir="$tmpdir/a"
- ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # The $RANDOM variable is not portable (e.g., dash). Use it
+ # here however when possible just to lower collision chance.
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+ trap '
+ ret=$?
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+ exit $ret
+ ' 0
+
+ # Because "mkdir -p" follows existing symlinks and we likely work
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
+ # directory is successfully created first before we actually test
+ # 'mkdir -p'.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
esac
if
@@ -382,7 +387,7 @@ do
then :
else
- # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
@@ -411,7 +416,7 @@ do
prefixes=
else
if $posix_mkdir; then
- (umask=$mkdir_umask &&
+ (umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
@@ -451,7 +456,18 @@ do
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+ (umask $cp_umask &&
+ { test -z "$stripcmd" || {
+ # Create $dsttmp read-write so that cp doesn't create it read-only,
+ # which would cause strip to fail.
+ if test -z "$doit"; then
+ : >"$dsttmp" # No need to fork-exec 'touch'.
+ else
+ $doit touch "$dsttmp"
+ fi
+ }
+ } &&
+ $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
@@ -477,6 +493,13 @@ do
then
rm -f "$dsttmp"
else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@@ -491,9 +514,9 @@ do
# file should still install successfully.
{
test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
index d11f1e0..21e5e07 100644..100755
--- a/build-aux/ltmain.sh
+++ b/build-aux/ltmain.sh
@@ -31,7 +31,7 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-11"
+VERSION="2.4.6 Debian-2.4.6-15"
package_revision=2.4.6
@@ -387,7 +387,7 @@ EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show function call trace with:
#
-# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+# debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
exit_cmd=:
@@ -2141,7 +2141,7 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname $scriptversion Debian-2.4.6-11
+ version: $progname $scriptversion Debian-2.4.6-15
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
@@ -7368,10 +7368,12 @@ func_mode_link ()
# -stdlib=* select c++ std lib with clang
# -fsanitize=* Clang/GCC memory and address sanitizer
# -fuse-ld=* Linker select flags for GCC
+ # -static-* direct GCC to link specific libraries statically
+ # -fcilkplus Cilk Plus language extension features for C/C++
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
- -specs=*|-fsanitize=*|-fuse-ld=*)
+ -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
diff --git a/build-aux/missing b/build-aux/missing
index 625aeb1..8d0eaad 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 1996-2018 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
diff --git a/build-aux/py-compile b/build-aux/py-compile
index 9f8baf7..e56d98d 100755
--- a/build-aux/py-compile
+++ b/build-aux/py-compile
@@ -1,9 +1,9 @@
#!/bin/sh
# py-compile - Compile a Python program
-scriptversion=2018-03-07.03; # UTC
+scriptversion=2020-02-19.23; # UTC
-# Copyright (C) 2000-2018 Free Software Foundation, Inc.
+# Copyright (C) 2000-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -115,8 +115,27 @@ else
filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)"
fi
+python_major=$($PYTHON -V 2>&1 | sed -e 's/.* //;s/\..*$//;1q')
+if test -z "$python_major"; then
+ echo "$me: could not determine $PYTHON major version, guessing 3" >&2
+ python_major=3
+fi
+
+# The old way to import libraries was deprecated.
+if test "$python_major" -le 2; then
+ import_lib=imp
+ import_test="hasattr(imp, 'get_tag')"
+ import_call=imp.cache_from_source
+ import_arg2=', False' # needed in one call and not the other
+else
+ import_lib=importlib
+ import_test="hasattr(sys.implementation, 'cache_tag')"
+ import_call=importlib.util.cache_from_source
+ import_arg2=
+fi
+
$PYTHON -c "
-import sys, os, py_compile, imp
+import sys, os, py_compile, $import_lib
files = '''$files'''
@@ -129,15 +148,15 @@ for file in files.split():
continue
sys.stdout.write(file)
sys.stdout.flush()
- if hasattr(imp, 'get_tag'):
- py_compile.compile(filepath, imp.cache_from_source(filepath), path)
+ if $import_test:
+ py_compile.compile(filepath, $import_call(filepath), path)
else:
py_compile.compile(filepath, filepath + 'c', path)
sys.stdout.write('\n')" || exit $?
# this will fail for python < 1.5, but that doesn't matter ...
$PYTHON -O -c "
-import sys, os, py_compile, imp
+import sys, os, py_compile, $import_lib
# pypy does not use .pyo optimization
if hasattr(sys, 'pypy_translation_info'):
@@ -153,8 +172,8 @@ for file in files.split():
continue
sys.stdout.write(file)
sys.stdout.flush()
- if hasattr(imp, 'get_tag'):
- py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
+ if $import_test:
+ py_compile.compile(filepath, $import_call(filepath$import_arg2), path)
else:
py_compile.compile(filepath, filepath + 'o', path)
sys.stdout.write('\n')" 2>/dev/null || :
diff --git a/build-aux/tap-driver.sh b/build-aux/tap-driver.sh
index 2516e9c..0ca4903 100755
--- a/build-aux/tap-driver.sh
+++ b/build-aux/tap-driver.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2011-2020 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -369,7 +369,7 @@ function setup_result_obj(line)
sub("^(not )?ok[ \t]*", "", line)
# If the result has an explicit number, get it and strip it; otherwise,
- # automatically assing the next progresive number to it.
+ # automatically assign the next test number to it.
if (line ~ /^[0-9]+$/ || line ~ /^[0-9]+[^a-zA-Z0-9_]/)
{
match(line, "^[0-9]+")
diff --git a/build-aux/test-driver b/build-aux/test-driver
index b8521a4..9759384 100755
--- a/build-aux/test-driver
+++ b/build-aux/test-driver
@@ -3,7 +3,7 @@
scriptversion=2018-03-07.03; # UTC
-# Copyright (C) 2011-2018 Free Software Foundation, Inc.
+# Copyright (C) 2011-2020 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,11 +42,13 @@ print_usage ()
{
cat <<END
Usage:
- test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
- [--expect-failure={yes|no}] [--color-tests={yes|no}]
- [--enable-hard-errors={yes|no}] [--]
+ test-driver --test-name NAME --log-file PATH --trs-file PATH
+ [--expect-failure {yes|no}] [--color-tests {yes|no}]
+ [--enable-hard-errors {yes|no}] [--]
TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
END
}
diff --git a/configure b/configure
index a7d4727..662ae04 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dbus-python 1.2.16.
+# Generated by GNU Autoconf 2.69 for dbus-python 1.2.18.
#
# Report bugs to <http://bugs.freedesktop.org/enter_bug.cgi?product=dbus&component=python>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='dbus-python'
PACKAGE_TARNAME='dbus-python'
-PACKAGE_VERSION='1.2.16'
-PACKAGE_STRING='dbus-python 1.2.16'
+PACKAGE_VERSION='1.2.18'
+PACKAGE_STRING='dbus-python 1.2.18'
PACKAGE_BUGREPORT='http://bugs.freedesktop.org/enter_bug.cgi?product=dbus&component=python'
PACKAGE_URL=''
@@ -1387,7 +1387,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures dbus-python 1.2.16 to adapt to many kinds of systems.
+\`configure' configures dbus-python 1.2.18 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1458,7 +1458,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of dbus-python 1.2.16:";;
+ short | recursive ) echo "Configuration of dbus-python 1.2.18:";;
esac
cat <<\_ACEOF
@@ -1610,7 +1610,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-dbus-python configure 1.2.16
+dbus-python configure 1.2.18
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1979,7 +1979,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by dbus-python $as_me 1.2.16, which was
+It was created by dbus-python $as_me 1.2.18, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2450,9 +2450,9 @@ $as_echo "#define DBUS_PYTHON_MINOR_VERSION 2" >>confdefs.h
DBUS_PYTHON_MINOR_VERSION=2
-$as_echo "#define DBUS_PYTHON_MICRO_VERSION 16" >>confdefs.h
+$as_echo "#define DBUS_PYTHON_MICRO_VERSION 18" >>confdefs.h
-DBUS_PYTHON_MICRO_VERSION=16
+DBUS_PYTHON_MICRO_VERSION=18
@@ -3942,12 +3942,7 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
@@ -4276,7 +4271,7 @@ fi
# Define the identity of the package.
PACKAGE='dbus-python'
- VERSION='1.2.16'
+ VERSION='1.2.18'
cat >>confdefs.h <<_ACEOF
@@ -6212,7 +6207,7 @@ esac
fi
: ${AR=ar}
-: ${AR_FLAGS=cru}
+: ${AR_FLAGS=cr}
@@ -7933,8 +7928,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
- echo "$AR cru libconftest.a conftest.o" >&5
- $AR cru libconftest.a conftest.o 2>&5
+ echo "$AR cr libconftest.a conftest.o" >&5
+ $AR cr libconftest.a conftest.o 2>&5
echo "$RANLIB libconftest.a" >&5
$RANLIB libconftest.a 2>&5
cat > conftest.c << _LT_EOF
@@ -7966,11 +7961,11 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ 10.0,*86*-darwin8*|10.0,*-darwin[912]*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[012][,.]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- 10.*)
+ 10.*|11.*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
@@ -12430,6 +12425,9 @@ if test -n "$PYTHON_INCLUDES"; then :
PYTHON_CPPFLAGS="$PYTHON_CPPFLAGS $PYTHON_INCLUDES"
fi
+if test -z "$PYTHON_VERSION" && test -z "$PYTHON"; then :
+ PYTHON_VERSION=3
+fi
#
# Allow the use of a (user set) custom python version
@@ -12846,7 +12844,7 @@ $as_echo_n "checking for $am_display_PYTHON version... " >&6; }
if ${am_cv_python_version+:} false; then :
$as_echo_n "(cached) " >&6
else
- am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`
+ am_cv_python_version=`$PYTHON -c "import sys; print('%u.%u' % sys.version_info[:2])"`
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5
$as_echo "$am_cv_python_version" >&6; }
@@ -13279,8 +13277,8 @@ $as_echo "no" >&6; }
fi
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
-$as_echo_n "checking for DBUS... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 >= 1.8" >&5
+$as_echo_n "checking for dbus-1 >= 1.8... " >&6; }
if test -n "$DBUS_CFLAGS"; then
pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
@@ -13320,7 +13318,7 @@ fi
if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13347,7 +13345,7 @@ Alternatively, you may set the environment variables DBUS_CFLAGS
and DBUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -13370,8 +13368,8 @@ $as_echo "yes" >&6; }
fi
pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5
-$as_echo_n "checking for GLIB... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib-2.0 >= 2.40" >&5
+$as_echo_n "checking for glib-2.0 >= 2.40... " >&6; }
if test -n "$GLIB_CFLAGS"; then
pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS"
@@ -13411,7 +13409,7 @@ fi
if test $pkg_failed = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -13438,7 +13436,7 @@ Alternatively, you may set the environment variables GLIB_CFLAGS
and GLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details." "$LINENO" 5
elif test $pkg_failed = untried; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -13637,6 +13635,7 @@ fi
for flag in -fno-strict-aliasing \
-Wdeprecated-declarations \
+ -Wno-declaration-after-statement \
-Wno-duplicated-branches \
-Wno-inline \
-Wno-redundant-decls \
@@ -15095,6 +15094,7 @@ fi
WARN_CFLAGS="$(echo "${WARN_CFLAGS}" | ${SED} \
+ -e s/-Wdeclaration-after-statement// \
-e s/-Wduplicated-branches// \
-e s/-Winline// \
-e s/-Wredundant-decls// \
@@ -15665,7 +15665,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by dbus-python $as_me 1.2.16, which was
+This file was extended by dbus-python $as_me 1.2.18, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15731,7 +15731,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-dbus-python config.status 1.2.16
+dbus-python config.status 1.2.18
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
@@ -16826,7 +16826,9 @@ $as_echo X/"$am_mf" |
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "Something went wrong bootstrapping makefile fragments
- for automatic dependency tracking. Try re-running configure with the
+ for automatic dependency tracking. If GNU make was not used, consider
+ re-running the configure script with MAKE=\"gmake\" (or whatever is
+ necessary). You can also try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See \`config.log' for more details" "$LINENO" 5; }
diff --git a/configure.ac b/configure.ac
index 630a237..b050aff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ dnl The dbus-python version number
m4_define(dbus_python_major_version, 1)
m4_define(dbus_python_minor_version, 2)
dnl Micro version is odd for non-releases
-m4_define(dbus_python_micro_version, 16)
+m4_define(dbus_python_micro_version, 18)
AC_INIT([dbus-python],
dbus_python_major_version.dbus_python_minor_version.dbus_python_micro_version,
@@ -77,6 +77,7 @@ AC_ARG_VAR([PYTHON_INCLUDES], [deprecated form of PYTHON_CPPFLAGS])
AS_IF([test -n "$PYTHON_INCLUDES"],
[PYTHON_CPPFLAGS="$PYTHON_CPPFLAGS $PYTHON_INCLUDES"])
+AS_IF([test -z "$PYTHON_VERSION" && test -z "$PYTHON"], [PYTHON_VERSION=3])
AX_PYTHON_DEVEL([>= '2.7'])
AM_PATH_PYTHON
@@ -132,6 +133,7 @@ AX_COMPILER_FLAGS([WARN_CFLAGS],
dnl AX_COMPILER_FLAGS, and are not const-correct for strings
[ \
-Wdeprecated-declarations \
+ -Wno-declaration-after-statement \
-Wno-duplicated-branches \
-Wno-inline \
-Wno-redundant-decls \
@@ -141,6 +143,7 @@ AX_COMPILER_FLAGS([WARN_CFLAGS],
dnl AX_COMPILER_FLAGS doesn't order the compiler flags correctly to be able
dnl to disable flags that it would normally enable
WARN_CFLAGS="$(echo "${WARN_CFLAGS}" | ${SED} \
+ -e s/-Wdeclaration-after-statement// \
-e s/-Wduplicated-branches// \
-e s/-Winline// \
-e s/-Wredundant-decls// \
diff --git a/dbus-gmain/Makefile.in b/dbus-gmain/Makefile.in
index 6dc7ae0..f1b3240 100644
--- a/dbus-gmain/Makefile.in
+++ b/dbus-gmain/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.16.1 from Makefile.am.
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -412,6 +412,7 @@ am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
RECHECK_LOGS = $(TEST_LOGS)
AM_RECURSIVE_TARGETS = check recheck
TEST_SUITE_LOG = test-suite.log
@@ -951,7 +952,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
echo "$${col}$$br$${std}"; \
- echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
echo "$${col}$$br$${std}"; \
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
diff --git a/dbus/decorators.py b/dbus/decorators.py
index ca63c29..1676d37 100644
--- a/dbus/decorators.py
+++ b/dbus/decorators.py
@@ -327,7 +327,16 @@ def signal(dbus_interface, signature=None, path_keyword=None,
location[0].send_message(message)
# end emit_signal
- args = inspect.getargspec(func)[0]
+ if hasattr(inspect, 'Signature'):
+ args = []
+
+ for arg in inspect.signature(func).parameters.values():
+ if arg.kind in (inspect.Parameter.POSITIONAL_ONLY,
+ inspect.Parameter.POSITIONAL_OR_KEYWORD):
+ args.append(arg.name)
+ else:
+ args = inspect.getargspec(func)[0]
+
args.pop(0)
for keyword in rel_path_keyword, path_keyword:
diff --git a/dbus/service.py b/dbus/service.py
index fd57054..0c8695a 100644
--- a/dbus/service.py
+++ b/dbus/service.py
@@ -32,7 +32,11 @@ import sys
import logging
import threading
import traceback
-from collections import Sequence
+try:
+ from collections.abc import Sequence
+except ImportError:
+ # Python 2 (and 3.x < 3.3, but we don't support those)
+ from collections import Sequence
import _dbus_bindings
from dbus import (
diff --git a/dbus_bindings/unixfd.c b/dbus_bindings/unixfd.c
index f39a0ce..ed99386 100644
--- a/dbus_bindings/unixfd.c
+++ b/dbus_bindings/unixfd.c
@@ -111,6 +111,11 @@ UnixFd_tp_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs)
return NULL;
}
+ if (variant_level < 0) {
+ PyErr_Format(PyExc_ValueError, "variant_level cannot be less than 0");
+ return NULL;
+ }
+
status = make_fd(arg, &fd_original);
if (status < 0)
return NULL;
@@ -145,14 +150,12 @@ UnixFd_tp_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs)
}
self = (UnixFdObject *) cls->tp_alloc(cls, 0);
- if (!self)
+ if (!self) {
+ close(fd);
return NULL;
+ }
self->fd = fd;
- if (variant_level < 0) {
- PyErr_Format(PyExc_ValueError, "variant_level cannot be less than 0");
- return NULL;
- }
self->variant_level = variant_level;
return (PyObject *)self;
diff --git a/dbus_python.egg-info/PKG-INFO b/dbus_python.egg-info/PKG-INFO
index c4bce47..88feda4 100644
--- a/dbus_python.egg-info/PKG-INFO
+++ b/dbus_python.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: dbus-python
-Version: 1.2.16
+Version: 1.2.18
Summary: Python bindings for libdbus
Home-page: http://www.freedesktop.org/wiki/Software/DBusBindings/#python
Maintainer: The D-Bus maintainers
diff --git a/dbus_python.egg-info/SOURCES.txt b/dbus_python.egg-info/SOURCES.txt
index c328504..50fa752 100644
--- a/dbus_python.egg-info/SOURCES.txt
+++ b/dbus_python.egg-info/SOURCES.txt
@@ -1,4 +1,3 @@
-.travis.yml
.version
AUTHORS
CONTRIBUTING.md
diff --git a/debian/changelog b/debian/changelog
index ee80b42..b9d9c92 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+dbus-python (1.2.18-2) unstable; urgency=medium
+
+ * Upload to unstable
+
+ -- Simon McVittie <smcv@debian.org> Sun, 15 Aug 2021 10:48:49 +0100
+
+dbus-python (1.2.18-1) experimental; urgency=medium
+
+ * New upstream release
+ * Update Lintian overrides
+ * Use recommended debhelper compat level 13
+
+ -- Simon McVittie <smcv@debian.org> Tue, 20 Jul 2021 10:50:20 +0100
+
dbus-python (1.2.16-5) unstable; urgency=medium
[ Helmut Grohne ]
diff --git a/debian/control b/debian/control
index 007c99c..999614a 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Build-Depends:
autoconf-archive,
automake,
dbus (>= 1.8),
- debhelper-compat (= 12),
+ debhelper-compat (= 13),
dh-python,
dh-sequence-python3,
dpkg-dev (>= 1.16.1),
diff --git a/debian/python3-dbus-tests.lintian-overrides b/debian/python3-dbus-tests.lintian-overrides
index ad8f11b..08d2e82 100644
--- a/debian/python3-dbus-tests.lintian-overrides
+++ b/debian/python3-dbus-tests.lintian-overrides
@@ -1,3 +1,7 @@
# the protocol is called D-Bus, but the binding is called dbus, and we are
# careful to name both correctly
python3-dbus-tests: capitalization-error-in-description dbus D-Bus
+python3-dbus-tests: capitalization-in-override-comment capitalization-*
+
+# we are deliberately using a specific python3.x version here
+python3-dbus-tests: unusual-interpreter usr/libexec/installed-tests/dbus-python/python3.*/test/*.py #!/usr/bin/python3.*
diff --git a/debian/python3-dbus.lintian-overrides b/debian/python3-dbus.lintian-overrides
index 4bd320d..a49059d 100644
--- a/debian/python3-dbus.lintian-overrides
+++ b/debian/python3-dbus.lintian-overrides
@@ -1,3 +1,4 @@
# the protocol is called D-Bus, but the binding is called dbus, and we are
# careful to name both correctly
python3-dbus: capitalization-error-in-description dbus D-Bus
+python3-dbus: capitalization-in-override-comment capitalization-*
diff --git a/examples/example-async-client.py b/examples/example-async-client.py
index 0d024c3..7b97943 100755
--- a/examples/example-async-client.py
+++ b/examples/example-async-client.py
@@ -1,9 +1,11 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
usage = """Usage:
-python example-service.py &
-python example-async-client.py
-python example-client.py --exit-service
+python3 example-service.py &
+python3 example-async-client.py
+python3 example-client.py --exit-service
"""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -45,7 +47,7 @@ def handle_hello_reply(r):
global hello_replied
hello_replied = True
- print str(r)
+ print("async client:", str(r))
if hello_replied and raise_replied:
loop.quit()
@@ -56,8 +58,8 @@ def handle_hello_error(e):
hello_replied = True
failed = True
- print "HelloWorld raised an exception! That's not meant to happen..."
- print "\t", str(e)
+ print("async client: HelloWorld raised an exception! That's not meant to happen...")
+ print("\t", str(e))
if hello_replied and raise_replied:
loop.quit()
@@ -68,7 +70,7 @@ def handle_raise_reply():
raise_replied = True
failed = True
- print "RaiseException returned normally! That's not meant to happen..."
+ print("async client: RaiseException returned normally! That's not meant to happen...")
if hello_replied and raise_replied:
loop.quit()
@@ -77,8 +79,8 @@ def handle_raise_error(e):
global raise_replied
raise_replied = True
- print "RaiseException raised an exception as expected:"
- print "\t", str(e)
+ print("async client: RaiseException raised an exception as expected:")
+ print("\t", str(e))
if hello_replied and raise_replied:
loop.quit()
@@ -106,7 +108,7 @@ if __name__ == '__main__':
remote_object = bus.get_object("com.example.SampleService","/SomeObject")
except dbus.DBusException:
traceback.print_exc()
- print usage
+ print(usage)
sys.exit(1)
# Make the method call after a short delay
diff --git a/examples/example-client.py b/examples/example-client.py
index d9ff776..6f7ade2 100755
--- a/examples/example-client.py
+++ b/examples/example-client.py
@@ -1,9 +1,11 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
usage = """Usage:
-python example-service.py &
-python example-client.py
-python example-client.py --exit-service
+python3 example-service.py &
+python3 example-client.py
+python3 example-client.py --exit-service
"""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -48,30 +50,30 @@ def main():
dbus_interface = "com.example.SampleInterface")
except dbus.DBusException:
print_exc()
- print usage
+ print(usage)
sys.exit(1)
- print (hello_reply_list)
+ print("client:", hello_reply_list)
# ... or create an Interface wrapper for the remote object
iface = dbus.Interface(remote_object, "com.example.SampleInterface")
hello_reply_tuple = iface.GetTuple()
- print hello_reply_tuple
+ print("client:", hello_reply_tuple)
hello_reply_dict = iface.GetDict()
- print hello_reply_dict
+ print("client:", hello_reply_dict)
# D-Bus exceptions are mapped to Python exceptions
try:
iface.RaiseException()
except dbus.DBusException as e:
- print str(e)
+ print("client:", str(e))
# introspection is automatically supported
- print remote_object.Introspect(dbus_interface="org.freedesktop.DBus.Introspectable")
+ print("client:", remote_object.Introspect(dbus_interface="org.freedesktop.DBus.Introspectable"))
if sys.argv[1:] == ['--exit-service']:
iface.Exit()
diff --git a/examples/example-service.py b/examples/example-service.py
index 12c81d9..e1ed325 100755
--- a/examples/example-service.py
+++ b/examples/example-service.py
@@ -1,10 +1,12 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
usage = """Usage:
-python example-service.py &
-python example-client.py
-python example-async-client.py
-python example-client.py --exit-service
+python3 example-service.py &
+python3 example-client.py
+python3 example-async-client.py
+python3 example-client.py --exit-service
"""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -46,7 +48,7 @@ class SomeObject(dbus.service.Object):
@dbus.service.method("com.example.SampleInterface",
in_signature='s', out_signature='as')
def HelloWorld(self, hello_message):
- print (str(hello_message))
+ print("service:", str(hello_message))
return ["Hello", " from example-service.py", "with unique name",
session_bus.get_unique_name()]
@@ -80,6 +82,6 @@ if __name__ == '__main__':
object = SomeObject(session_bus, '/SomeObject')
mainloop = GLib.MainLoop()
- print "Running example service."
- print usage
+ print("Running example service.")
+ print(usage)
mainloop.run()
diff --git a/examples/example-signal-emitter.py b/examples/example-signal-emitter.py
index 48349a8..fc3f0db 100755
--- a/examples/example-signal-emitter.py
+++ b/examples/example-signal-emitter.py
@@ -1,9 +1,11 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
usage = """Usage:
-python example-signal-emitter.py &
-python example-signal-recipient.py
-python example-signal-recipient.py --exit-service
+python3 example-signal-emitter.py &
+python3 example-signal-recipient.py
+python3 example-signal-recipient.py --exit-service
"""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -66,6 +68,6 @@ if __name__ == '__main__':
object = TestObject(session_bus)
loop = GLib.MainLoop()
- print "Running example signal emitter service."
- print usage
+ print("Running example signal emitter service.")
+ print(usage)
loop.run()
diff --git a/examples/example-signal-recipient.py b/examples/example-signal-recipient.py
index 63f53d6..6e89ace 100755
--- a/examples/example-signal-recipient.py
+++ b/examples/example-signal-recipient.py
@@ -1,9 +1,11 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
usage = """Usage:
-python example-signal-emitter.py &
-python example-signal-recipient.py
-python example-signal-recipient.py --exit-service
+python3 example-signal-emitter.py &
+python3 example-signal-recipient.py
+python3 example-signal-recipient.py --exit-service
"""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -40,10 +42,10 @@ import dbus
import dbus.mainloop.glib
def handle_reply(msg):
- print msg
+ print("recipient:", msg)
def handle_error(e):
- print str(e)
+ print("recipient:", str(e))
def emit_signal():
#call the emitHelloSignal method
@@ -58,20 +60,20 @@ def emit_signal():
return False
def hello_signal_handler(hello_string):
- print ("Received signal (by connecting using remote object) and it says: "
+ print("recipient: Received signal (by connecting using remote object) and it says: "
+ hello_string)
def catchall_signal_handler(*args, **kwargs):
- print ("Caught signal (in catchall handler) "
+ print("recipient: Caught signal (in catchall handler) "
+ kwargs['dbus_interface'] + "." + kwargs['member'])
for arg in args:
- print " " + str(arg)
+ print(" " + str(arg))
def catchall_hello_signals_handler(hello_string):
- print "Received a hello signal and it says " + hello_string
-
+ print("recipient: Received a hello signal and it says " + hello_string)
+
def catchall_testservice_interface_handler(hello_string, dbus_message):
- print "com.example.TestService interface says " + hello_string + " when it sent signal " + dbus_message.get_member()
+ print("recipient: com.example.TestService interface says " + hello_string + " when it sent signal " + dbus_message.get_member())
if __name__ == '__main__':
@@ -84,7 +86,7 @@ if __name__ == '__main__':
object.connect_to_signal("HelloSignal", hello_signal_handler, dbus_interface="com.example.TestService", arg0="Hello")
except dbus.DBusException:
traceback.print_exc()
- print usage
+ print(usage)
sys.exit(1)
#lets make a catchall
diff --git a/examples/gconf-proxy-client.py b/examples/gconf-proxy-client.py
index 8d81486..c03e947 100755
--- a/examples/gconf-proxy-client.py
+++ b/examples/gconf-proxy-client.py
@@ -1,4 +1,6 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
# Client for gconf-proxy-service2.py.
@@ -36,4 +38,4 @@ gconf_key_object = dbus.Interface(bus.get_object("com.example.GConfProxy", "/org
value = gconf_key_object.getString()
-print ("Value of GConf key %s is %s" % (gconf_key, value))
+print("client: Value of GConf key %s is %s" % (gconf_key, value))
diff --git a/examples/gconf-proxy-service2.py b/examples/gconf-proxy-service2.py
index d31277f..74cc814 100755
--- a/examples/gconf-proxy-service2.py
+++ b/examples/gconf-proxy-service2.py
@@ -1,4 +1,6 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
# Example of implementing an entire subtree of objects using
# a FallbackObject.
@@ -37,7 +39,12 @@ import dbus.mainloop.glib
import dbus.service
from gi.repository import GLib
-import gconf
+
+try:
+ import gconf
+except ImportError:
+ print('service: gconf not available, using mock implementation')
+ gconf = None
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -47,22 +54,37 @@ name = dbus.service.BusName("com.example.GConfProxy", dbus.SessionBus())
class GConfObject(dbus.service.FallbackObject):
def __init__(self):
dbus.service.FallbackObject.__init__(self, dbus.SessionBus(), '/org/gnome/GConf')
- self.client = gconf.client_get_default()
+ if gconf is None:
+ self.client = None
+ else:
+ self.client = gconf.client_get_default()
@dbus.service.method("org.gnome.GConf", in_signature='', out_signature='s', rel_path_keyword='object_path')
def getString(self, object_path):
+ if self.client is None:
+ return '<gconf not available>'
+
return self.client.get_string(object_path)
@dbus.service.method("org.gnome.GConf", in_signature='s', out_signature='', rel_path_keyword='object_path')
def setString(self, value, object_path):
+ if self.client is None:
+ raise RuntimeError('gconf not available')
+
self.client.set_string(object_path, value)
@dbus.service.method("org.gnome.GConf", in_signature='', out_signature='i', rel_path_keyword='object_path')
def getInt(self, object_path):
+ if self.client is None:
+ return 42
+
return self.client.get_int(object_path)
@dbus.service.method("org.gnome.GConf", in_signature='i', out_signature='', rel_path_keyword='object_path')
def setInt(self, value, object_path):
+ if self.client is None:
+ raise RuntimeError('gconf not available')
+
self.client.set_int(object_path, value)
gconf_service = GConfObject()
diff --git a/examples/list-system-services.py b/examples/list-system-services.py
index 4734f5e..aad9e9a 100755
--- a/examples/list-system-services.py
+++ b/examples/list-system-services.py
@@ -1,6 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
-"""Usage: python list-system-services.py [--session|--system]
+from __future__ import print_function
+
+"""Usage: python3 list-system-services.py [--session|--system]
List services on the system bus (default) or the session bus."""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -65,7 +67,7 @@ def main(argv):
services = dbus_iface.ListNames()
services.sort()
for service in services:
- print service
+ print(service)
if __name__ == '__main__':
main(sys.argv)
diff --git a/examples/unix-fd-client.py b/examples/unix-fd-client.py
index ad421b3..5725513 100755
--- a/examples/unix-fd-client.py
+++ b/examples/unix-fd-client.py
@@ -1,10 +1,12 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
import time
usage = """Usage:
-python unix-fd-service.py <file name> &
-python unix-fd-client.py
+python3 unix-fd-service.py <file name> &
+python3 unix-fd-client.py
"""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -48,18 +50,18 @@ def main():
except dbus.DBusException:
print_exc()
- print usage
+ print(usage)
sys.exit(1)
iface = dbus.Interface(remote_object, "com.example.SampleInterface")
# UnixFd is an opaque object that takes care of received fd
fd_object = iface.GetFd()
- print fd_object
+ print("client: fd_object = %s" % fd_object)
# Once we take the fd number, we are in charge of closing it!
fd = fd_object.take()
- print fd
+ print("client: fd = %s" % fd)
# We want to encapsulate the integer fd into a Python file or socket object
f = os.fdopen(fd, "r")
@@ -72,7 +74,7 @@ def main():
# otherwise it 'leaks' (stays open until program exits).
f.seek(0)
- print f.read()
+ print("client: read from fd = %r" % f.read())
if __name__ == '__main__':
main()
diff --git a/examples/unix-fd-service.py b/examples/unix-fd-service.py
index 8b65bf2..e7a6b50 100755
--- a/examples/unix-fd-service.py
+++ b/examples/unix-fd-service.py
@@ -1,8 +1,10 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
+
+from __future__ import print_function
usage = """Usage:
-python unix-fd-service.py <file name> &
-python unix-fd-client.py
+python3 unix-fd-service.py <file name> &
+python3 unix-fd-client.py
"""
# Copyright (C) 2004-2006 Red Hat Inc. <http://www.redhat.com/>
@@ -49,20 +51,20 @@ class SomeObject(dbus.service.Object):
self.counter = (self.counter + 1) % 3
if self.counter == 0:
- print "sending UnixFd(filelike)"
+ print("service: sending UnixFd(filelike)")
return dbus.types.UnixFd(f)
elif self.counter == 1:
- print "sending int"
+ print("service: sending int")
return f.fileno()
else:
- print "sending UnixFd(int)"
+ print("service: sending UnixFd(int)")
return dbus.types.UnixFd(f.fileno())
if len(sys.argv) < 2:
- print usage
+ print(usage)
sys.exit(1)
-f = file(sys.argv[1], "r")
+f = open(sys.argv[1], "r")
if __name__ == '__main__':
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -72,6 +74,6 @@ if __name__ == '__main__':
object = SomeObject(session_bus, '/SomeObject')
mainloop = GLib.MainLoop()
- print "Running fd service."
- print usage
+ print("Running fd service.")
+ print(usage)
mainloop.run()
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 9d6dd9f..c4c0294 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;}
_LT_EOF
echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
$LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
- echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
- $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+ echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+ $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
$RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
cat > conftest.c << _LT_EOF
@@ -1071,11 +1071,11 @@ _LT_EOF
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ 10.0,*86*-darwin8*|10.0,*-darwin[[912]]*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
10.[[012]][[,.]]*)
_lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
- 10.*)
+ 10.*|11.*)
_lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
@@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock
m4_defun([_LT_PROG_AR],
[AC_CHECK_TOOLS(AR, [ar], false)
: ${AR=ar}
-: ${AR_FLAGS=cru}
+: ${AR_FLAGS=cr}
_LT_DECL([], [AR], [1], [The archiver])
_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index 4688002..13a8890 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -1,6 +1,6 @@
-dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
-dnl serial 11 (pkg-config-0.29)
-dnl
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
dnl
@@ -41,7 +41,7 @@ dnl
dnl See the "Since" comment for each macro you use to see what version
dnl of the macros you require.
m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29])
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
])dnl PKG_PREREQ
@@ -142,7 +142,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -152,11 +152,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
- else
+ else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
@@ -173,7 +173,7 @@ installed software in a non-standard prefix.
_PKG_TEXT])[]dnl
])
elif test $pkg_failed = untried; then
- AC_MSG_RESULT([no])
+ AC_MSG_RESULT([no])
m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
diff --git a/test/cross-test-client.py b/test/cross-test-client.py
index c2da193..fe196ce 100755
--- a/test/cross-test-client.py
+++ b/test/cross-test-client.py
@@ -28,7 +28,7 @@ from __future__ import print_function, unicode_literals
import logging
try:
- from gi.repository import GObject as gobject
+ from gi.repository import GLib
except ImportError:
raise SystemExit(77)
@@ -415,9 +415,9 @@ if __name__ == '__main__':
# the Java cross test's interpretation is that the client should be
# at /Test too
client = Client(dbus.SessionBus(), '/Test')
- gobject.idle_add(client.run_client)
+ GLib.idle_add(client.run_client)
- loop = gobject.MainLoop()
+ loop = GLib.MainLoop()
logger.info("running...")
loop.run()
logger.info("main loop exited.")
diff --git a/test/cross-test-server.py b/test/cross-test-server.py
index e3edea2..3799937 100755
--- a/test/cross-test-server.py
+++ b/test/cross-test-server.py
@@ -28,7 +28,7 @@ from __future__ import print_function
import logging
try:
- from gi.repository import GObject as gobject
+ from gi.repository import GLib
except ImportError:
raise SystemExit(77)
@@ -283,9 +283,9 @@ class TestsImpl(dbus.service.Object):
assert isinstance(object, str)
logger.info('method/signal: client wants me to emit Triggered(%r) from %r', parameter, object)
tested_things.add(INTERFACE_TESTS + '.Trigger')
- gobject.idle_add(lambda: self.emit_Triggered_from(conn, object,
- parameter,
- reply_cb))
+ GLib.idle_add(lambda: self.emit_Triggered_from(conn, object,
+ parameter,
+ reply_cb))
def emit_Triggered_from(self, conn, object, parameter, reply_cb):
assert isinstance(object, str)
@@ -307,7 +307,7 @@ class TestsImpl(dbus.service.Object):
if x not in tested_things:
print('%s untested' % x)
logger.info('will quit when idle')
- gobject.idle_add(self._exit_fn)
+ GLib.idle_add(self._exit_fn)
class Server(SingleTestsImpl, TestsImpl, SignalTestsImpl):
@@ -325,7 +325,7 @@ class Server(SingleTestsImpl, TestsImpl, SignalTestsImpl):
if __name__ == '__main__':
bus = SessionBus()
bus_name = BusName(CROSS_TEST_BUS_NAME, bus=bus)
- loop = gobject.MainLoop()
+ loop = GLib.MainLoop()
obj = Server(bus_name, CROSS_TEST_PATH, loop.quit)
objects[CROSS_TEST_PATH] = obj
kwargs = {}
diff --git a/test/test-client.py b/test/test-client.py
index bc6a900..e486309 100755
--- a/test/test-client.py
+++ b/test/test-client.py
@@ -42,9 +42,9 @@ import dbus_test_utils
from dbus._compat import is_py2, is_py3
try:
- from gi.repository import GObject as gobject
+ from gi.repository import GLib
except ImportError:
- print('1..0 # SKIP cannot import GObject')
+ print('1..0 # SKIP cannot import GLib')
raise SystemExit(0)
logging.basicConfig()
@@ -203,7 +203,7 @@ class TestDBusBindings(unittest.TestCase):
def testNoReply(self):
failures = []
report = []
- main_loop = gobject.MainLoop()
+ main_loop = GLib.MainLoop()
unicode_type = (str if is_py3 else unicode)
def message_filter(conn, m):
@@ -256,7 +256,7 @@ class TestDBusBindings(unittest.TestCase):
print("\n********* Testing Async Calls ***********")
failures = []
- main_loop = gobject.MainLoop()
+ main_loop = GLib.MainLoop()
class async_check:
def __init__(self, test_controler, expected_result, do_exit, **kwargs):
@@ -574,7 +574,7 @@ class TestDBusBindings(unittest.TestCase):
dbus.Bus(private=True).close()
def testTimeoutAsyncClient(self):
- loop = gobject.MainLoop()
+ loop = GLib.MainLoop()
passes = []
fails = []
def correctly_returned():
@@ -685,7 +685,6 @@ class TestDBusPythonToGLibBindings(unittest.TestCase):
self.assertEqual(send_val, recv_val.object)
"""
if __name__ == '__main__':
- gobject.threads_init()
dbus.glib.init_threads()
dbus_test_utils.main()
diff --git a/test/test-p2p.py b/test/test-p2p.py
index b0d7ac0..efe1041 100755
--- a/test/test-p2p.py
+++ b/test/test-p2p.py
@@ -40,9 +40,9 @@ import dbus_test_utils
from dbus._compat import is_py2
try:
- from gi.repository import GObject as gobject
+ from gi.repository import GLib
except ImportError:
- print('1..0 # SKIP cannot import GObject')
+ print('1..0 # SKIP cannot import GLib')
raise SystemExit(0)
logging.basicConfig()
@@ -123,7 +123,6 @@ class TestDBusBindings(unittest.TestCase):
if __name__ == '__main__':
- gobject.threads_init()
dbus.glib.init_threads()
dbus_test_utils.main()
diff --git a/test/test-service.py b/test/test-service.py
index 2799185..5440dfa 100755
--- a/test/test-service.py
+++ b/test/test-service.py
@@ -51,7 +51,7 @@ import dbus.glib
import random
from dbus.gi_service import ExportedGObject
-from gi.repository import GObject
+from gi.repository import GLib
from dbus._compat import is_py2, is_py3
@@ -295,8 +295,8 @@ class TestObject(dbus.service.Object, TestInterface):
def AsynchronousMethod(self, async_, fail, variant, return_cb, error_cb):
try:
if async_:
- GObject.timeout_add(500, self.AsynchronousMethod, False, fail,
- variant, return_cb, error_cb)
+ GLib.timeout_add(500, self.AsynchronousMethod, False, fail,
+ variant, return_cb, error_cb)
return
else:
if fail:
@@ -342,7 +342,7 @@ class TestObject(dbus.service.Object, TestInterface):
def return_from_async_wait():
return_cb()
return False
- GObject.timeout_add(500, return_from_async_wait)
+ GLib.timeout_add(500, return_from_async_wait)
@dbus.service.method(IFACE, in_signature='', out_signature='')
def RaiseValueError(self):
@@ -405,7 +405,7 @@ def main():
logger.info('making Fallback')
fallback_object = Fallback(session_bus)
logger.info('creating mainloop')
- loop = GObject.MainLoop()
+ loop = GLib.MainLoop()
logger.info('running')
loop.run()
logger.info('done')
diff --git a/test/test-signals.py b/test/test-signals.py
index 1e55f78..458f84b 100755
--- a/test/test-signals.py
+++ b/test/test-signals.py
@@ -38,9 +38,9 @@ import dbus.service
import dbus_test_utils
try:
- from gi.repository import GObject as gobject
+ from gi.repository import GLib
except ImportError:
- print('1..0 # SKIP cannot import GObject')
+ print('1..0 # SKIP cannot import GLib')
raise SystemExit(0)
logging.basicConfig()
@@ -111,23 +111,23 @@ class TestSignals(unittest.TestCase):
path_keyword='path')
logger.info('Waiting for signal...')
iface.EmitSignal('SignalOneString', 0)
- source_id = gobject.timeout_add(1000, _timeout_handler)
+ source_id = GLib.timeout_add(1000, _timeout_handler)
main_loop.run()
if not result:
raise AssertionError('Signal did not arrive within 1 second')
logger.debug('Removing match')
match.remove()
- gobject.source_remove(source_id)
+ GLib.source_remove(source_id)
if test_removal:
self.in_test = name + '+removed'
logger.info('Testing %s', name)
result = []
iface.EmitSignal('SignalOneString', 0)
- source_id = gobject.timeout_add(1000, _rm_timeout_handler)
+ source_id = GLib.timeout_add(1000, _rm_timeout_handler)
main_loop.run()
if result:
raise AssertionError('Signal should not have arrived, but did')
- gobject.source_remove(source_id)
+ GLib.source_remove(source_id)
def testFallback(self):
self.signal_test_impl(self.fallback_iface, 'Fallback')
@@ -160,8 +160,7 @@ class TestSignals(unittest.TestCase):
self.signal_test_impl(self.iface_follow, 'RemovalAgain', True)
if __name__ == '__main__':
- main_loop = gobject.MainLoop()
- gobject.threads_init()
+ main_loop = GLib.MainLoop()
dbus.glib.init_threads()
logger.info('Starting unit test')
diff --git a/test/test-standalone.py b/test/test-standalone.py
index cd967a6..7ec6e47 100755
--- a/test/test-standalone.py
+++ b/test/test-standalone.py
@@ -612,6 +612,9 @@ class TestMessageMarshalling(unittest.TestCase):
with self.assertRaises(TypeError):
types.UnixFd(plain_fd, variant_level='nope')
+
+ with self.assertRaises(ValueError):
+ types.UnixFd(plain_fd, variant_level=-1)
finally:
os.close(plain_fd)