From: Wouter Wijngaards Date: Thu, 16 Apr 2015 14:35:55 +0000 (+0000) Subject: - Fix bug#664: libunbound python3 related fixes (from Tomas Hozza) X-Git-Tag: release-1.5.4~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e6fa9f687862d78689b3e0bbaaf1208e8a92296;p=thirdparty%2Funbound.git - Fix bug#664: libunbound python3 related fixes (from Tomas Hozza) Use print_function also for Python2. git-svn-id: file:///svn/unbound/trunk@3400 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index f516556ad..de7425592 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -3,6 +3,8 @@ - Ratelimit does not apply to prefetched queries, and ratelimit-factor is default 10. Repeated normal queries get resolved and with prefetch stay in the cache. + - Fix bug#664: libunbound python3 related fixes (from Tomas Hozza) + Use print_function also for Python2. 10 April 2015: Wouter - unbound-control ratelimit_list lists high rate domains. diff --git a/libunbound/python/examples/async-lookup.py b/libunbound/python/examples/async-lookup.py index cbb8ea02d..81ba447e1 100644 --- a/libunbound/python/examples/async-lookup.py +++ b/libunbound/python/examples/async-lookup.py @@ -32,6 +32,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound import time diff --git a/libunbound/python/examples/dns-lookup.py b/libunbound/python/examples/dns-lookup.py index b3f4008fd..ec8567347 100644 --- a/libunbound/python/examples/dns-lookup.py +++ b/libunbound/python/examples/dns-lookup.py @@ -32,6 +32,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound ctx = unbound.ub_ctx() diff --git a/libunbound/python/examples/dnssec-valid.py b/libunbound/python/examples/dnssec-valid.py index 5c3cad9e9..e613fd2a5 100644 --- a/libunbound/python/examples/dnssec-valid.py +++ b/libunbound/python/examples/dnssec-valid.py @@ -32,6 +32,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import os from unbound import ub_ctx,RR_TYPE_A,RR_CLASS_IN diff --git a/libunbound/python/examples/dnssec_test.py b/libunbound/python/examples/dnssec_test.py index 0d62b9ff2..a90ac0ce4 100644 --- a/libunbound/python/examples/dnssec_test.py +++ b/libunbound/python/examples/dnssec_test.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +from __future__ import print_function from unbound import ub_ctx, RR_TYPE_A, RR_TYPE_RRSIG, RR_TYPE_NSEC, RR_TYPE_NSEC3 import ldns diff --git a/libunbound/python/examples/example8-1.py b/libunbound/python/examples/example8-1.py index ca868e510..ba093d9b2 100644 --- a/libunbound/python/examples/example8-1.py +++ b/libunbound/python/examples/example8-1.py @@ -33,6 +33,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound ctx = unbound.ub_ctx() diff --git a/libunbound/python/examples/idn-lookup.py b/libunbound/python/examples/idn-lookup.py index 2170637d3..8cc63e0fa 100644 --- a/libunbound/python/examples/idn-lookup.py +++ b/libunbound/python/examples/idn-lookup.py @@ -33,6 +33,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound import locale diff --git a/libunbound/python/examples/mx-lookup.py b/libunbound/python/examples/mx-lookup.py index f83f690f8..f3c4e5f7a 100644 --- a/libunbound/python/examples/mx-lookup.py +++ b/libunbound/python/examples/mx-lookup.py @@ -33,6 +33,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound ctx = unbound.ub_ctx() diff --git a/libunbound/python/examples/ns-lookup.py b/libunbound/python/examples/ns-lookup.py index bcd51de6d..5acf2a342 100644 --- a/libunbound/python/examples/ns-lookup.py +++ b/libunbound/python/examples/ns-lookup.py @@ -33,6 +33,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound ctx = unbound.ub_ctx() diff --git a/libunbound/python/examples/reverse-lookup.py b/libunbound/python/examples/reverse-lookup.py index 7e06844ec..da8ab1a48 100644 --- a/libunbound/python/examples/reverse-lookup.py +++ b/libunbound/python/examples/reverse-lookup.py @@ -32,6 +32,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' +from __future__ import print_function import unbound ctx = unbound.ub_ctx()