Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getdnsapi/getdns-python-bindings
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.2.1
Choose a base ref
...
head repository: getdnsapi/getdns-python-bindings
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Dec 12, 2014

  1. Added result object

    MelindaShore committed Dec 12, 2014
    Copy the full SHA
    2d70acd View commit details
  2. Copy the full SHA
    8f5c985 View commit details
  3. Copy the full SHA
    88ae4ff View commit details

Commits on Dec 18, 2014

  1. Copy the full SHA
    eed37d5 View commit details

Commits on Dec 19, 2014

  1. Copy the full SHA
    65641ec View commit details

Commits on Dec 29, 2014

  1. Copy the full SHA
    74d7ae6 View commit details
  2. Copy the full SHA
    5407b26 View commit details
  3. Copy the full SHA
    4246c2b View commit details

Commits on Jan 5, 2015

  1. Copy the full SHA
    0bcd80d View commit details

Commits on Jan 7, 2015

  1. Copy the full SHA
    7a9867a View commit details
  2. Copy the full SHA
    58b7c77 View commit details

Commits on Feb 26, 2015

  1. Copy the full SHA
    9fbf79c View commit details

Commits on Mar 20, 2015

  1. New async support

    MelindaShore committed Mar 20, 2015
    Copy the full SHA
    389b6f1 View commit details
  2. New async support

    MelindaShore committed Mar 20, 2015
    Copy the full SHA
    b818f46 View commit details
  3. New async support

    MelindaShore committed Mar 20, 2015
    Copy the full SHA
    8aa4962 View commit details
  4. New async support

    MelindaShore committed Mar 20, 2015
    Copy the full SHA
    9d872e0 View commit details
  5. New async support

    MelindaShore committed Mar 20, 2015
    Copy the full SHA
    d1a7dbe View commit details
  6. Example async code

    MelindaShore committed Mar 20, 2015
    Copy the full SHA
    bf3b312 View commit details
  7. Updated version string

    MelindaShore committed Mar 20, 2015
    Copy the full SHA
    f21392b View commit details
  8. Copy the full SHA
    db5bd95 View commit details
  9. Copy the full SHA
    618cc29 View commit details

Commits on Mar 23, 2015

  1. Copy the full SHA
    f2f611b View commit details

Commits on Mar 24, 2015

  1. Copy the full SHA
    e365821 View commit details

Commits on Mar 25, 2015

  1. Copy the full SHA
    a68cc55 View commit details
  2. Copy the full SHA
    2192510 View commit details
  3. Merge branch 'features/result_object' into develop

    Ready for prime-time
    MelindaShore committed Mar 25, 2015
    Copy the full SHA
    0382cb8 View commit details

Commits on Apr 8, 2015

  1. Copy the full SHA
    a9a78a0 View commit details
  2. replaced instances of getdns_strerror w/getdns_get_errorstr_by_id, go…

    …t rid of all GETDNS_RRTYPE_* constants, added getdns.RRTYPE_CSYNC
    MelindaShore committed Apr 8, 2015
    Copy the full SHA
    8c32197 View commit details

Commits on Apr 9, 2015

  1. removed some dead code

    MelindaShore committed Apr 9, 2015
    Copy the full SHA
    72f806d View commit details
  2. Copy the full SHA
    f38457e View commit details
  3. Copy the full SHA
    13a092d View commit details

Commits on Apr 10, 2015

  1. Copy the full SHA
    646ddf7 View commit details
  2. Copy the full SHA
    460ae52 View commit details
  3. Copy the full SHA
    3245c85 View commit details
  4. Copy the full SHA
    20f814e View commit details
  5. Created ChangeLog

    MelindaShore committed Apr 10, 2015
    Copy the full SHA
    721cb95 View commit details
  6. Created ChangeLog

    MelindaShore committed Apr 10, 2015
    Copy the full SHA
    8f564c8 View commit details
  7. cleanup for merge

    MelindaShore committed Apr 10, 2015
    Copy the full SHA
    0600f91 View commit details

Commits on Apr 12, 2015

  1. Added TAGS file

    MelindaShore committed Apr 12, 2015
    Copy the full SHA
    8acd60d View commit details
  2. added support for edns_cookies extension, modified setup.py to take -…

    …-with-edns-cookies option to build
    MelindaShore committed Apr 12, 2015
    Copy the full SHA
    613c20d View commit details

Commits on Apr 13, 2015

  1. Copy the full SHA
    2a32b04 View commit details
  2. Copy the full SHA
    4bacb20 View commit details

Commits on Apr 16, 2015

  1. Copy the full SHA
    68d92da View commit details

Commits on Apr 17, 2015

  1. Copy the full SHA
    ab99ba7 View commit details

Commits on Apr 20, 2015

  1. Copy the full SHA
    7d1dcf8 View commit details

Commits on Apr 30, 2015

  1. Copy the full SHA
    329dedf View commit details
  2. Copy the full SHA
    9158cf2 View commit details
  3. Merge pull request #26 from dkg/dev

    minor docs cleanup
    MelindaShore committed Apr 30, 2015
    Copy the full SHA
    8841e07 View commit details

Commits on May 3, 2015

  1. Copy the full SHA
    c93f3b5 View commit details

Commits on May 5, 2015

  1. Copy the full SHA
    cedb243 View commit details
Showing with 4,231 additions and 1,636 deletions.
  1. +8 −1 .gitignore
  2. +35 −0 ChangeLog
  3. +46 −0 Dockerfile
  4. +4 −0 MANIFEST.in
  5. +61 −21 README.md
  6. +1,278 −452 context.c
  7. +114 −0 context_util.c
  8. +2 −2 doc/conf.py
  9. +52 −0 doc/exceptions.rst
  10. +268 −114 doc/functions.rst
  11. +85 −41 doc/index.rst
  12. +307 −247 doc/response.rst
  13. +88 −0 examples/async-get-ip.py
  14. +35 −50 examples/checkdanecert.py
  15. +36 −0 examples/client_subnet.py
  16. +72 −0 examples/dane_encrypt.py
  17. +21 −15 examples/get-general.py
  18. +16 −12 examples/get-ip.py
  19. +26 −16 examples/get-mx-ip.py
  20. +27 −18 examples/get-ns-ip.py
  21. +10 −7 examples/get-srv.py
  22. +20 −0 examples/idn.py
  23. +18 −0 examples/pinset.py
  24. +5 −1 examples/print-context.py
  25. +5 −1 examples/print-version.py
  26. +11 −7 examples/query-gdns.py
  27. +12 −8 examples/query-stubmode.py
  28. +14 −8 examples/simple.py
  29. +17 −0 examples/tsig_demo.py
  30. +449 −400 getdns.c
  31. +81 −26 pygetdns.h
  32. +461 −175 pygetdns_util.c
  33. +200 −0 result.c
  34. +49 −14 setup.py
  35. +14 −0 test/example.com.zone
  36. +284 −0 test/getdns_test.py
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
build/
_build/
*~
getdns.so
*.pyc
*.so
*.save
doc/_build/
doc/_build/*
TAGS
dist
MANIFEST
.pypirc
\#*
etc/
35 changes: 35 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
Changes in version 0.3.1 (10 April 2015)

* implemented asynchronous queries, bound to Context()
objects, and introduced Context.run() method. See
getdns.readthedocs.org

* queries now return a Result() object, with attributes.
See getdns.readthedocs.org

* removed leading GETDNS_ in all constants
(i.e. getdns.GETDNS_RRTYPE_AAAA is now getdns.RRTYPE_AAAA)

* added getdns.get_errorstr_by_id() method, making it easier
to provide user-friendly error messages

* prettied up printing of canonical names in Result object

* str and repr printing has been added to both Context and
Result objects

* dead code removed

* replaced instances of getdns_strerror() with
getdns_get_errorstr_by_id()

* fixed incorrect error return from Result construction

* moved __version__ attribute from Context to top-level
getdns module

* made exception handling within the module more consistent

* added documentation describing getdns.error

* broke out query types
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM ubuntu:16.04
MAINTAINER Melinda Shore <melinda.shore@nomountain.net>

RUN set -ex \
&& apt-get update \
&& apt-get install -y curl \
&& apt-get install -y git \
&& apt-get install -y wget \
&& apt-get install -y libssl-dev \
&& curl -fOSL "https://unbound.net/downloads/unbound-1.6.3.tar.gz" \
&& mkdir -p /usr/src/unbound \
&& tar -xzC /usr/src/unbound --strip-components=1 -f unbound-1.6.3.tar.gz \
&& rm unbound-1.6.3.tar.gz \
&& apt-get -y install libidn11-dev \
&& apt-get -y install python-dev \
&& apt-get -y install make \
&& apt-get install -y automake autoconf libtool \
&& apt-get install -y shtool \
&& cd /usr/src/unbound \
&& ./configure \
&& make \
&& make install \
&& ldconfig \
&& cd /usr/src \
&& git clone https://github.com/getdnsapi/getdns.git \
&& cd /usr/src/getdns \
&& git checkout release/1.1.1 \
&& git submodule update --init \
&& libtoolize -ci \
&& autoreconf -fi \
&& ./configure \
&& make \
&& make install \
&& ldconfig \
&& mkdir -p /etc/unbound \
&& cd /etc/unbound \
&& wget http://www.nomountain.net/getdns-root.key \
&& cd /usr/src \
&& git clone https://github.com/getdnsapi/getdns-python-bindings.git \
&& cd /usr/src/getdns-python-bindings \
&& git checkout develop \
&& python setup.py build \
&& python setup.py install


CMD ["/usr/bin/python"]
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# file GENERATED by distutils, do NOT edit
include *.c
include *.h
recursive-include examples *.py
82 changes: 61 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
@@ -3,26 +3,25 @@ getdns-python-bindings

Python bindings for getdns

* Date: 2016-03-29
* Github: https://github.com/getdnsapi/getdns-python-bindings
* Current version: v1.0.0b1

External dependencies
=====================

Built and tested against Python 2.7. You will need to install
Built and tested against Python 2.7 and Python 3.4. You will need to install
the Python headers and libraries - this is usually a package
called "python-dev"

Currently building against the getdns 0.1.3 release.
Currently building against the getdns v1.0.0b release.
getdns external dependencies include:

* [libldns from NLnet Labs](https://www.nlnetlabs.nl/projects/ldns/) version 1.6.11 or later (ldns requires ope
nssl headers and libraries)
* [libunbound from NLnet Labs](http://www.nlnetlabs.nl/projects/unbound/) version 1.4.16 or later
* [libexpat](http://expat.sourceforge.net/) for libunbound.
* [libidn from the FSF](http://www.gnu.org/software/libidn/) version 1.
* [libevent](http://libevent.org) version 2.0.21 stable, sometimes called libevent2 (only needed if you plan to
use it for asynchronous handling)

Note that getdns **MUST** be built with the --with-libevent flag to
configure.
* [libssl and libcrypto from the OpenSSL project](https://www.openssl.org/) version 0.9.7 or later.
(Note: version 1.0.1 or later is required for TLS support,
version 1.0.2 or later is required for TLS hostname authentication)

Building
========
@@ -34,7 +33,7 @@ python setup.py build
During the development process and before the module is installed, I
find it convenient to have a symlink in the current directory pointing
to the library in the build directory:
to the library in the build directory. For example:
```
getdns.so -> build/lib.linux-i686-2.7/getdns.so
@@ -49,6 +48,18 @@ people who are using the bindings should go ahead and install.
python setup.py install
````
We recently added Python 3 support. To build, just invoke
the Python 3 interpreter rather the Python 2 interpreter (on
most systems this will be "python3").
```
python3 setup.py build
```
You will need the
Python 3 development environment ("python3-dev" or
"python3-devel", most often).
Documentation
=============
@@ -60,18 +71,47 @@ source tree in doc/_build/html. It is also available online at [readthedocs.org
Changes from the earlier release
================================
We've introduced a Context object with attributes and methods, with
queries being Context methods. Attributes can be assigned and read
directly without using the getdns setters and getters. For example,
* A number of performance improvements.
```python
import getdns.context
my_context = getdns.Context()
my_context.timeout = 1000
print my_context.timeout
```
* Installable via PyPi.
* Removed libevent dependency
* For consistency with Python 3, the Python 2 bindings now return
Context() attributes as longs
* TSIG support
* GETDNS_AUTHENTICATION_HOSTNAME is replaced by
GETDNS_AUTHENTICATION_REQUIRED (but remains available as an alias).
Upstreams can now be configured with either a hostname or a SPKI
pinset for TLS authentication (or both). If the
GETDNS_AUTHENTICATION_REQUIRED option is used at least one piece of
authentication information must be configured for each upstream, and
all the configured authentication information for an upstream must
validate.
Older changes
=============
In addition to adding Python 3 support, we've changed the callback
argument to the asynchronous methods to accept a callable by name,
rather than as a literal string.
We're also now supporting a new transport_list attribute, an
ordered (by preference) list of transport options, including
TCP, UDP, TLS, and STARTTLS.
There are also a number of bugfixes, including cleaning up
after unbound zombies (this has been fixed in unbound as well
but the code is not yet included in a distribution) and
correct handling of strings encoded as getdns bindatas.
Examples have been updated to work with both Python 2.x and
Python 3.
Please see the documentation for details on attributes and methods.
Please see the documentation for details on new attributes
extensions, and methods.
Examples
========
Loading