diff options
-rw-r--r-- | .version | 2 | ||||
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | MANIFEST.in | 1 | ||||
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | NEWS | 16 | ||||
-rw-r--r-- | PKG-INFO | 2 | ||||
-rwxr-xr-x | configure | 24 | ||||
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | dbus_python.egg-info/PKG-INFO | 2 | ||||
-rw-r--r-- | dbus_python.egg-info/SOURCES.txt | 1 | ||||
-rw-r--r-- | test/dbus_test_utils.py | 53 | ||||
-rwxr-xr-x | test/test-client.py | 11 | ||||
-rwxr-xr-x | test/test-exception-py2.py | 11 | ||||
-rwxr-xr-x | test/test-exception-py3.py | 11 | ||||
-rwxr-xr-x | test/test-p2p.py | 11 | ||||
-rwxr-xr-x | test/test-signals.py | 11 | ||||
-rwxr-xr-x | test/test-standalone.py | 11 | ||||
-rwxr-xr-x | test/test-unusable-main-loop.py | 11 |
19 files changed, 107 insertions, 81 deletions
@@ -1 +1 @@ -1.2.14 +1.2.16 @@ -150,6 +150,7 @@ test/cross-test-client.py test/cross-test-server.py test/crosstest.py test/dbus_py_test.c +test/dbus_test_utils.py test/import-repeatedly.c test/run-test.sh test/test-client.py diff --git a/MANIFEST.in b/MANIFEST.in index 3b1cd3f..3d378dd 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -150,6 +150,7 @@ include test/cross-test-client.py include test/cross-test-server.py include test/crosstest.py include test/dbus_py_test.c +include test/dbus_test_utils.py include test/import-repeatedly.c include test/run-test.sh include test/test-client.py diff --git a/Makefile.am b/Makefile.am index 21149b5..5780cce 100644 --- a/Makefile.am +++ b/Makefile.am @@ -248,6 +248,7 @@ dist_test_py = \ dist_test_extra_python = \ test/crosstest.py \ + test/dbus_test_utils.py \ $(NULL) dist_test_extra_scripts = \ diff --git a/Makefile.in b/Makefile.in index 942ccf2..cd89230 100644 --- a/Makefile.in +++ b/Makefile.in @@ -335,7 +335,8 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__nobase_dist_installed_test_PYTHON_DIST = test/crosstest.py +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|' @@ -936,6 +937,7 @@ dist_test_py = test/test-client.py test/test-p2p.py \ $(am__append_5) dist_test_extra_python = \ test/crosstest.py \ + test/dbus_test_utils.py \ $(NULL) dist_test_extra_scripts = \ @@ -1,3 +1,19 @@ +dbus Python Bindings 1.2.16 (2020-01-14) +======================================== + +The “bag of assorted swords” release. + +Enhancements: + +• All tests are run even if the tap.py module is not available, although + diagnostics for failing tests will be better if it is present. + (Simon McVittie) + +Fixes: + +• Forbid unexpanded AX-prefixed macros more selectively, similar to + dbus#249. (Simon McVittie) + dbus Python Bindings 1.2.14 (2019-11-25) ======================================== @@ -1,6 +1,6 @@ Metadata-Version: 1.2 Name: dbus-python -Version: 1.2.14 +Version: 1.2.16 Summary: Python bindings for libdbus Home-page: http://www.freedesktop.org/wiki/Software/DBusBindings/#python Maintainer: The D-Bus maintainers @@ -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.14. +# Generated by GNU Autoconf 2.69 for dbus-python 1.2.16. # # 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.14' -PACKAGE_STRING='dbus-python 1.2.14' +PACKAGE_VERSION='1.2.16' +PACKAGE_STRING='dbus-python 1.2.16' 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.14 to adapt to many kinds of systems. +\`configure' configures dbus-python 1.2.16 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.14:";; + short | recursive ) echo "Configuration of dbus-python 1.2.16:";; 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.14 +dbus-python configure 1.2.16 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.14, which was +It was created by dbus-python $as_me 1.2.16, 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 14" >>confdefs.h +$as_echo "#define DBUS_PYTHON_MICRO_VERSION 16" >>confdefs.h -DBUS_PYTHON_MICRO_VERSION=14 +DBUS_PYTHON_MICRO_VERSION=16 @@ -4276,7 +4276,7 @@ fi # Define the identity of the package. PACKAGE='dbus-python' - VERSION='1.2.14' + VERSION='1.2.16' cat >>confdefs.h <<_ACEOF @@ -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.14, which was +This file was extended by dbus-python $as_me 1.2.16, 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.14 +dbus-python config.status 1.2.16 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 7af706e..630a237 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, 14) +m4_define(dbus_python_micro_version, 16) AC_INIT([dbus-python], dbus_python_major_version.dbus_python_minor_version.dbus_python_micro_version, @@ -14,7 +14,7 @@ AC_CONFIG_MACRO_DIR([m4]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES]) AC_CONFIG_AUX_DIR([build-aux]) -m4_pattern_forbid([^AX_], +m4_pattern_forbid([^AX_(COMPILER_FLAGS|IS_RELEASE|PYTHON_DEVEL|PYTHON_MODULE)\b], [Unexpanded AX_ macro found. Please install GNU autoconf-archive]) # By default, rebuild autotools files on demand; only use ./missing if the diff --git a/dbus_python.egg-info/PKG-INFO b/dbus_python.egg-info/PKG-INFO index 4e2110e..c4bce47 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.14 +Version: 1.2.16 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 ca0fcdb..c328504 100644 --- a/dbus_python.egg-info/SOURCES.txt +++ b/dbus_python.egg-info/SOURCES.txt @@ -150,6 +150,7 @@ test/cross-test-client.py test/cross-test-server.py test/crosstest.py test/dbus_py_test.c +test/dbus_test_utils.py test/import-repeatedly.c test/run-test.sh test/test-client.py diff --git a/test/dbus_test_utils.py b/test/dbus_test_utils.py new file mode 100644 index 0000000..a7a6619 --- /dev/null +++ b/test/dbus_test_utils.py @@ -0,0 +1,53 @@ +# Copyright 2020 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. + +from __future__ import print_function + +import unittest + +try: + from tap.runner import TAPTestRunner +except ImportError: + TAPTestRunner = None # type: ignore + +def main(): + # type: (...) -> None + if TAPTestRunner is not None: + runner = TAPTestRunner() + runner.set_stream(True) + unittest.main(testRunner=runner) + else: + # You thought pycotap was a minimal TAP implementation? + print('1..1') + program = unittest.main(exit=False) + if program.result.wasSuccessful(): + print( + 'ok 1 - %r (tap module not available)' + % program.result + ) + else: + print( + 'not ok 1 - %r (tap module not available)' + % program.result + ) diff --git a/test/test-client.py b/test/test-client.py index f028ced..bc6a900 100755 --- a/test/test-client.py +++ b/test/test-client.py @@ -32,17 +32,12 @@ import time import logging import weakref -try: - from tap.runner import TAPTestRunner -except ImportError: - print('1..0 # SKIP cannot import TAPTestRunner') - raise SystemExit(0) - import dbus import _dbus_bindings import dbus.glib import dbus.lowlevel import dbus.service +import dbus_test_utils from dbus._compat import is_py2, is_py3 @@ -693,6 +688,4 @@ if __name__ == '__main__': gobject.threads_init() dbus.glib.init_threads() - runner = TAPTestRunner() - runner.set_stream(True) - unittest.main(testRunner=runner) + dbus_test_utils.main() diff --git a/test/test-exception-py2.py b/test/test-exception-py2.py index 327536d..a8427c6 100755 --- a/test/test-exception-py2.py +++ b/test/test-exception-py2.py @@ -6,13 +6,8 @@ import sys import unittest -try: - from tap.runner import TAPTestRunner -except ImportError: - print('1..0 # SKIP cannot import TAPTestRunner') - raise SystemExit(0) - import dbus +import dbus_test_utils # from test-service.py class ServiceError(dbus.DBusException): @@ -67,6 +62,4 @@ class DBusExceptionTestCase(unittest.TestCase): if __name__ == "__main__": - runner = TAPTestRunner() - runner.set_stream(True) - unittest.main(testRunner=runner) + dbus_test_utils.main() diff --git a/test/test-exception-py3.py b/test/test-exception-py3.py index 8f1541c..ee8212f 100755 --- a/test/test-exception-py3.py +++ b/test/test-exception-py3.py @@ -5,13 +5,8 @@ import unittest -try: - from tap.runner import TAPTestRunner -except ImportError: - print('1..0 # SKIP cannot import TAPTestRunner') - raise SystemExit(0) - import dbus +import dbus_test_utils # from test-service.py class ServiceError(dbus.DBusException): @@ -36,6 +31,4 @@ class DBusExceptionTestCase(unittest.TestCase): if __name__ == "__main__": - runner = TAPTestRunner() - runner.set_stream(True) - unittest.main(testRunner=runner) + dbus_test_utils.main() diff --git a/test/test-p2p.py b/test/test-p2p.py index d895eff..b0d7ac0 100755 --- a/test/test-p2p.py +++ b/test/test-p2p.py @@ -35,16 +35,11 @@ import dbus import dbus.glib import dbus.service import dbus.types +import dbus_test_utils from dbus._compat import is_py2 try: - from tap.runner import TAPTestRunner -except ImportError: - print('1..0 # SKIP cannot import TAPTestRunner') - raise SystemExit(0) - -try: from gi.repository import GObject as gobject except ImportError: print('1..0 # SKIP cannot import GObject') @@ -131,6 +126,4 @@ if __name__ == '__main__': gobject.threads_init() dbus.glib.init_threads() - runner = TAPTestRunner() - runner.set_stream(True) - unittest.main(testRunner=runner) + dbus_test_utils.main() diff --git a/test/test-signals.py b/test/test-signals.py index 7d395a9..1e55f78 100755 --- a/test/test-signals.py +++ b/test/test-signals.py @@ -35,12 +35,7 @@ import dbus import _dbus_bindings import dbus.glib import dbus.service - -try: - from tap.runner import TAPTestRunner -except ImportError: - print('1..0 # SKIP cannot import TAPTestRunner') - raise SystemExit(0) +import dbus_test_utils try: from gi.repository import GObject as gobject @@ -170,6 +165,4 @@ if __name__ == '__main__': dbus.glib.init_threads() logger.info('Starting unit test') - runner = TAPTestRunner() - runner.set_stream(True) - unittest.main(testRunner=runner) + dbus_test_utils.main() diff --git a/test/test-standalone.py b/test/test-standalone.py index 21d4b62..cd967a6 100755 --- a/test/test-standalone.py +++ b/test/test-standalone.py @@ -35,16 +35,11 @@ import sys import os import unittest -try: - from tap.runner import TAPTestRunner -except ImportError: - print('1..0 # SKIP cannot import TAPTestRunner') - raise SystemExit(0) - import _dbus_bindings import dbus import dbus.lowlevel as lowlevel import dbus.types as types +import dbus_test_utils from dbus._compat import is_py2, is_py3 if is_py3: @@ -653,6 +648,4 @@ class TestVersion(unittest.TestCase): self.assertLess(dbus.__version__, '9') if __name__ == '__main__': - runner = TAPTestRunner() - runner.set_stream(True) - unittest.main(testRunner=runner, verbosity=2) + dbus_test_utils.main() diff --git a/test/test-unusable-main-loop.py b/test/test-unusable-main-loop.py index c3a6930..54d2a16 100755 --- a/test/test-unusable-main-loop.py +++ b/test/test-unusable-main-loop.py @@ -28,13 +28,8 @@ from __future__ import print_function import unittest -try: - from tap.runner import TAPTestRunner -except ImportError: - print('1..0 # SKIP cannot import TAPTestRunner') - raise SystemExit(0) - import dbus +import dbus_test_utils from dbus_py_test import UnusableMainLoop @@ -44,6 +39,4 @@ class Test(unittest.TestCase): self.assertRaises(ValueError, lambda: dbus.SessionBus()) if __name__ == '__main__': - runner = TAPTestRunner() - runner.set_stream(True) - unittest.main(testRunner=runner) + dbus_test_utils.main() |