]> git.ipfire.org Git - thirdparty/dnspython.git/log
thirdparty/dnspython.git
5 years agoImprovements to dns.rdata.to_wire(). 499/head
Brian Wellington [Mon, 1 Jun 2020 18:32:03 +0000 (11:32 -0700)] 
Improvements to dns.rdata.to_wire().

This does two things.

1) Makes the file parameter optional, removing the requirement that
callers create an io.BytesIO object if all they want is the bytes.  This
is done by renaming all of the rdata subclass to_wire() methods to
_to_wire(), and making dns.rdata.to_wire() create the io.BytesIO
internally if needed, and then delegate to the subclass.

2) Add canonicalize=False parameter, allowing code reuse for conversion
to wire format and conversion to hashable format.  This also removes all
of the rdata subclass to_digestable routines that are no longer needed,
as dns.rdata.to_digestable will work for all rdata types.

5 years agoRRSIG digestable might as well be right even if it is useless
Bob Halley [Mon, 1 Jun 2020 17:46:23 +0000 (10:46 -0700)] 
RRSIG digestable might as well be right even if it is useless

5 years agocontinued line lint
Bob Halley [Mon, 1 Jun 2020 17:38:29 +0000 (10:38 -0700)] 
continued line lint

5 years agoMerge pull request #498 from bwelling/query-sockets
Bob Halley [Mon, 1 Jun 2020 17:36:52 +0000 (10:36 -0700)] 
Merge pull request #498 from bwelling/query-sockets

Adds sock parameters to query methods.

5 years ago__iter__ is not needed in WireData at all
Bob Halley [Mon, 1 Jun 2020 17:36:01 +0000 (10:36 -0700)] 
__iter__ is not needed in WireData at all

5 years agoAdds sock parameters to query methods. 498/head
Brian Wellington [Mon, 1 Jun 2020 17:09:37 +0000 (10:09 -0700)] 
Adds sock parameters to query methods.

Allow passing a socket into dns.query.{udp,tcp,tls,udp_with_fallback},
and add tests for this.

5 years agoFix remaining canonical form problems, and add a test. [Issue #496]
Bob Halley [Mon, 1 Jun 2020 15:23:03 +0000 (08:23 -0700)] 
Fix remaining canonical form problems, and add a test.  [Issue #496]

5 years agoremove digestable test in favor of another coming soon
Bob Halley [Mon, 1 Jun 2020 15:00:56 +0000 (08:00 -0700)] 
remove digestable test in favor of another coming soon

5 years agoMerge pull request #497 from desec-io/lowercase_to_digestable
Bob Halley [Mon, 1 Jun 2020 14:59:12 +0000 (07:59 -0700)] 
Merge pull request #497 from desec-io/lowercase_to_digestable

Lowercasing in to_digestable() methods for records containing DNS names

5 years agoLowercase SRV records in to_digestable(), fixes #496 497/head
Nils Wisiol [Mon, 1 Jun 2020 14:12:28 +0000 (16:12 +0200)] 
Lowercase SRV records in to_digestable(), fixes #496

5 years agoimprove rrset and rdataset coverage
Bob Halley [Sat, 30 May 2020 14:12:54 +0000 (07:12 -0700)] 
improve rrset and rdataset coverage

5 years agoadd coverage report to output
Bob Halley [Sat, 30 May 2020 14:12:49 +0000 (07:12 -0700)] 
add coverage report to output

5 years agoWireData did not implement the iteration protocol correctly and was thus uniterable.
Bob Halley [Sat, 30 May 2020 13:37:14 +0000 (06:37 -0700)] 
WireData did not implement the iteration protocol correctly and was thus uniterable.

5 years agotest cache hit with live resolver
Bob Halley [Fri, 29 May 2020 15:51:22 +0000 (08:51 -0700)] 
test cache hit with live resolver

5 years agothe prior fix for exception handling was still not right, missing a continue
Bob Halley [Fri, 29 May 2020 15:48:23 +0000 (08:48 -0700)] 
the prior fix for exception handling was still not right, missing a continue

5 years agoMerge pull request #494 from desec-io/hinfo_max_length
Bob Halley [Fri, 29 May 2020 12:50:55 +0000 (05:50 -0700)] 
Merge pull request #494 from desec-io/hinfo_max_length

Check character-string length for HINFO records

5 years agoCheck character-string length for HINFO records 494/head
Nils Wisiol [Fri, 29 May 2020 10:47:38 +0000 (12:47 +0200)] 
Check character-string length for HINFO records

5 years agoa bit more cache coverage
Bob Halley [Thu, 28 May 2020 16:05:31 +0000 (09:05 -0700)] 
a bit more cache coverage

5 years agoonly do multiple I/O backend testing for live tests, as testing everything 3 times...
Bob Halley [Thu, 28 May 2020 15:02:52 +0000 (08:02 -0700)] 
only do multiple I/O backend testing for live tests, as testing everything 3 times is pointless work

5 years agomake _Resolution coverage 100%
Bob Halley [Thu, 28 May 2020 15:01:59 +0000 (08:01 -0700)] 
make _Resolution coverage 100%

5 years agoadd one more live resolver test (for NXDOMAIN)
Bob Halley [Thu, 28 May 2020 13:22:59 +0000 (06:22 -0700)] 
add one more live resolver test (for NXDOMAIN)

5 years agoMerge pull request #491 from pspacek/test_resolver_nodata
Bob Halley [Thu, 28 May 2020 13:04:27 +0000 (06:04 -0700)] 
Merge pull request #491 from pspacek/test_resolver_nodata

tests: resolver Nodata answers

5 years agoFix resolve() NoAnswer problems from [Issue #488]
Bob Halley [Thu, 28 May 2020 13:03:54 +0000 (06:03 -0700)] 
Fix resolve() NoAnswer problems from [Issue #488]

5 years agoMerge pull request #490 from pspacek/test_cleanup
Bob Halley [Thu, 28 May 2020 12:35:00 +0000 (05:35 -0700)] 
Merge pull request #490 from pspacek/test_cleanup

tests: remove forgotten prints

5 years agotests: resolver Nodata answers 491/head
Petr Špaček [Thu, 28 May 2020 07:55:24 +0000 (09:55 +0200)] 
tests: resolver Nodata answers

5 years agotests: remove forgotten prints 490/head
Petr Špaček [Thu, 28 May 2020 07:39:41 +0000 (09:39 +0200)] 
tests: remove forgotten prints

5 years agoMerge pull request #487 from pspacek/pickle_rdata
Bob Halley [Wed, 27 May 2020 20:36:03 +0000 (13:36 -0700)] 
Merge pull request #487 from pspacek/pickle_rdata

make rdata objects picklable again

5 years agofurther tighten resolve() default settings
Bob Halley [Wed, 27 May 2020 20:30:05 +0000 (13:30 -0700)] 
further tighten resolve() default settings

5 years agomake rdata objects picklable again 487/head
Petr Špaček [Wed, 27 May 2020 09:06:41 +0000 (11:06 +0200)] 
make rdata objects picklable again

__getstate__ implementation based on tuple and ordered __slots__
is slightly faster than implementation based on dicts.
It also produces smaller blobs.

Speed of this implementation is +- few percents the same
as it was in dnspython 1.16.0 and it now produces smaller blobs.

Fixes: #485
5 years agoMerge pull request #483 from pspacek/cython3
Bob Halley [Mon, 25 May 2020 13:29:09 +0000 (06:29 -0700)] 
Merge pull request #483 from pspacek/cython3

fix cythonization for Python 3

5 years agofix cythonization for Python 3 483/head
Petr Špaček [Mon, 25 May 2020 13:15:10 +0000 (15:15 +0200)] 
fix cythonization for Python 3

5 years agodocument Trio code
Bob Halley [Sun, 24 May 2020 01:04:12 +0000 (18:04 -0700)] 
document Trio code

5 years agodo not build universal wheels as we are python 3 only
Bob Halley [Sun, 24 May 2020 00:44:41 +0000 (17:44 -0700)] 
do not build universal wheels as we are python 3 only

5 years agoincrease test coverage for various things
Bob Halley [Sat, 23 May 2020 22:18:05 +0000 (15:18 -0700)] 
increase test coverage for various things

5 years agoclearly people do not delete from NameDicts very often
Bob Halley [Sat, 23 May 2020 21:27:04 +0000 (14:27 -0700)] 
clearly people do not delete from NameDicts very often

5 years agoleading zero detection in dns.ipv4.inet_aton() was broken
Bob Halley [Sat, 23 May 2020 20:58:34 +0000 (13:58 -0700)] 
leading zero detection in dns.ipv4.inet_aton() was broken

5 years agoadd some resolver intro doc
Bob Halley [Sat, 23 May 2020 20:27:04 +0000 (13:27 -0700)] 
add some resolver intro doc

5 years agobasic testing of entropy and resolver override
Bob Halley [Sat, 23 May 2020 17:33:25 +0000 (10:33 -0700)] 
basic testing of entropy and resolver override

5 years agofix None pointers in LRU cache sentinel
Bob Halley [Sat, 23 May 2020 17:32:54 +0000 (10:32 -0700)] 
fix None pointers in LRU cache sentinel

5 years agorevision of truncation handling
Bob Halley [Fri, 22 May 2020 15:54:44 +0000 (08:54 -0700)] 
revision of truncation handling

5 years agomention negative caching in whatsnew
Bob Halley [Thu, 21 May 2020 21:43:41 +0000 (14:43 -0700)] 
mention negative caching in whatsnew

5 years agoadd NXDOMAIN caching
Bob Halley [Thu, 21 May 2020 21:35:40 +0000 (14:35 -0700)] 
add NXDOMAIN caching

5 years agopop() with no arguements means last, but I used it intending first
Bob Halley [Thu, 21 May 2020 21:27:06 +0000 (14:27 -0700)] 
pop() with no arguements means last, but I used it intending first

5 years agoremove historical af argument to query functions
Bob Halley [Thu, 21 May 2020 18:23:53 +0000 (11:23 -0700)] 
remove historical af argument to query functions

5 years agoMerge pull request #479 from bwelling/rename-to-enum
Bob Halley [Thu, 21 May 2020 18:18:43 +0000 (11:18 -0700)] 
Merge pull request #479 from bwelling/rename-to-enum

Remove dns.rdata{type,class}.to_enum.

5 years agoRemove dns.rdata{type,class}.to_enum. 479/head
Brian Wellington [Thu, 21 May 2020 17:53:24 +0000 (10:53 -0700)] 
Remove dns.rdata{type,class}.to_enum.

These methods (which convert a str/int into an enum/int) shouldn't be
commonly used by external code, so don't need to exist at the module
level.  The make() method on the enum class (renamed from to_enum()) can
still be used, and the internal callers have been updated to use it.

5 years agocorrect inaccuracy
Bob Halley [Thu, 21 May 2020 14:52:04 +0000 (07:52 -0700)] 
correct inaccuracy

5 years agonote that new async APIs are experimental
Bob Halley [Thu, 21 May 2020 14:50:13 +0000 (07:50 -0700)] 
note that new async APIs are experimental

5 years agofix typo
Bob Halley [Thu, 21 May 2020 14:46:39 +0000 (07:46 -0700)] 
fix typo

5 years agolint: remove unused sys import
Bob Halley [Thu, 21 May 2020 14:44:32 +0000 (07:44 -0700)] 
lint: remove unused sys import

5 years agodo not run DoH tests if there is no network
Bob Halley [Thu, 21 May 2020 14:43:55 +0000 (07:43 -0700)] 
do not run DoH tests if there is no network

5 years agotest trio async code
Bob Halley [Thu, 21 May 2020 14:41:21 +0000 (07:41 -0700)] 
test trio async code

5 years agoadd some basic resolution testing
Bob Halley [Thu, 21 May 2020 14:40:19 +0000 (07:40 -0700)] 
add some basic resolution testing

5 years agoMerge pull request #478 from bwelling/query-use-context-managers
Bob Halley [Thu, 21 May 2020 14:47:50 +0000 (07:47 -0700)] 
Merge pull request #478 from bwelling/query-use-context-managers

Use context managers in the query methods.

5 years agouse clock time not trio time
Bob Halley [Thu, 21 May 2020 13:58:17 +0000 (06:58 -0700)] 
use clock time not trio time

5 years agoUse context managers in the query methods. 478/head
Brian Wellington [Thu, 21 May 2020 01:48:31 +0000 (18:48 -0700)] 
Use context managers in the query methods.

5 years agoMerge pull request #477 from bwelling/simplify-connect
Bob Halley [Thu, 21 May 2020 00:33:59 +0000 (17:33 -0700)] 
Merge pull request #477 from bwelling/simplify-connect

Simplify dns.query._connect().

5 years agoSimplify dns.query._connect(). 477/head
Brian Wellington [Wed, 20 May 2020 23:48:04 +0000 (16:48 -0700)] 
Simplify dns.query._connect().

5 years agoSimplify exception handling.
Brian Wellington [Wed, 20 May 2020 22:52:25 +0000 (15:52 -0700)] 
Simplify exception handling.

5 years agoRemove hash value truncation.
Brian Wellington [Wed, 20 May 2020 22:23:28 +0000 (15:23 -0700)] 
Remove hash value truncation.

There's no need to truncate the result of __hash__(); the runtime will
already truncate it to sys.hash_info.width.

5 years agoRemove cruft and simplify.
Brian Wellington [Wed, 20 May 2020 22:18:16 +0000 (15:18 -0700)] 
Remove cruft and simplify.

This also makes slices with steps work, although nothing uses them.

5 years agoflake8 linting
Bob Halley [Wed, 20 May 2020 14:18:56 +0000 (07:18 -0700)] 
flake8 linting

5 years agocoverage tools
Bob Halley [Wed, 20 May 2020 14:18:21 +0000 (07:18 -0700)] 
coverage tools

5 years agoraise NotImplememtedError, not NotImplemented
Bob Halley [Wed, 20 May 2020 14:16:10 +0000 (07:16 -0700)] 
raise NotImplememtedError, not NotImplemented

5 years agodoco tweaks
Bob Halley [Wed, 20 May 2020 13:13:18 +0000 (06:13 -0700)] 
doco tweaks

5 years agoconform to Answer constructor change
Bob Halley [Wed, 20 May 2020 12:52:17 +0000 (05:52 -0700)] 
conform to Answer constructor change

5 years agomove raise_on_no_error out of Answer
Bob Halley [Wed, 20 May 2020 02:23:29 +0000 (19:23 -0700)] 
move raise_on_no_error out of Answer

5 years agofinish testing of resolver business logic
Bob Halley [Wed, 20 May 2020 02:01:40 +0000 (19:01 -0700)] 
finish testing of resolver business logic

5 years agoMerge pull request #475 from bwelling/enum-cleanup
Bob Halley [Tue, 19 May 2020 20:22:54 +0000 (13:22 -0700)] 
Merge pull request #475 from bwelling/enum-cleanup

Enum refactoring.

5 years agoEnum refactoring. 475/head
Brian Wellington [Tue, 19 May 2020 20:18:05 +0000 (13:18 -0700)] 
Enum refactoring.

Consolidate the common methods related to enum classes.

5 years agostart resolution business logic tests.
Bob Halley [Tue, 19 May 2020 19:58:10 +0000 (12:58 -0700)] 
start resolution business logic tests.

5 years agoadd missing backoff to next_nameserver() retry_with_tcp case
Bob Halley [Tue, 19 May 2020 19:49:47 +0000 (12:49 -0700)] 
add missing backoff to next_nameserver() retry_with_tcp case

5 years agouse to_enum()
Bob Halley [Tue, 19 May 2020 18:59:55 +0000 (11:59 -0700)] 
use to_enum()

5 years agoMerge pull request #474 from bwelling/sets
Bob Halley [Tue, 19 May 2020 20:08:12 +0000 (13:08 -0700)] 
Merge pull request #474 from bwelling/sets

Replace dicts with sets.

5 years agoFix bare except.
Brian Wellington [Tue, 19 May 2020 17:26:36 +0000 (10:26 -0700)] 
Fix bare except.

5 years agoFix type registration for singleton types. 474/head
Brian Wellington [Tue, 19 May 2020 17:21:53 +0000 (10:21 -0700)] 
Fix type registration for singleton types.

5 years agoReplace dicts with sets.
Brian Wellington [Tue, 19 May 2020 17:08:15 +0000 (10:08 -0700)] 
Replace dicts with sets.

5 years agoIt is self.resolver.retry_servfail, not self.retry_servfail; where were you linters?
Bob Halley [Tue, 19 May 2020 17:05:14 +0000 (10:05 -0700)] 
It is self.resolver.retry_servfail, not self.retry_servfail; where were you linters?

5 years agoFix metatype check.
Brian Wellington [Tue, 19 May 2020 16:51:37 +0000 (09:51 -0700)] 
Fix metatype check.

IANA has reserved types 128-255 as meta types, so that range should be
checked.

5 years agoMerge pull request #472 from rthalley/resrefactor
Bob Halley [Tue, 19 May 2020 16:15:53 +0000 (09:15 -0700)] 
Merge pull request #472 from rthalley/resrefactor

Resolver Business Logic Refactoring

5 years agofirst draft of What's New in 2.0.0
Bob Halley [Tue, 19 May 2020 13:50:06 +0000 (06:50 -0700)] 
first draft of What's New in 2.0.0

5 years agoMerge pull request #473 from bwelling/enum
Bob Halley [Tue, 19 May 2020 13:24:28 +0000 (06:24 -0700)] 
Merge pull request #473 from bwelling/enum

WIP: Convert constants to enums

5 years agoadd resolve_address() helper at module level 472/head
Bob Halley [Tue, 19 May 2020 13:10:21 +0000 (06:10 -0700)] 
add resolve_address() helper at module level

5 years agoadd basic typo info for trio modules
Bob Halley [Tue, 19 May 2020 13:03:43 +0000 (06:03 -0700)] 
add basic typo info for trio modules

5 years agolinting
Bob Halley [Tue, 19 May 2020 12:51:31 +0000 (05:51 -0700)] 
linting

5 years agoadd trio to extras
Bob Halley [Tue, 19 May 2020 12:32:33 +0000 (05:32 -0700)] 
add trio to extras

5 years agoFinish rdatatype conversion. 473/head
Brian Wellington [Mon, 18 May 2020 22:08:39 +0000 (15:08 -0700)] 
Finish rdatatype conversion.

Add more checking to dns.rdata.register_type, to ensure that an existing
type mnemonic isn't overwritten.  Use the enum functionality for mapping
names to values and values to names, rather than duplicating it.

5 years agoAssign to globals() more consistently.
Brian Wellington [Mon, 18 May 2020 21:07:42 +0000 (14:07 -0700)] 
Assign to globals() more consistently.

5 years agoConvert message flags to enums.
Brian Wellington [Mon, 18 May 2020 21:03:00 +0000 (14:03 -0700)] 
Convert message flags to enums.

5 years agoConvert opcode, rcode, dnssec constants to enums.
Brian Wellington [Mon, 18 May 2020 20:40:08 +0000 (13:40 -0700)] 
Convert opcode, rcode, dnssec constants to enums.

5 years agoCreate DNSKEY Flag enum.
Brian Wellington [Mon, 18 May 2020 19:56:08 +0000 (12:56 -0700)] 
Create DNSKEY Flag enum.

The flags are defined in dnskeybase, and additionally visible in DNSKEY
and CDNSKEY.

Also, remove flags_to_text_set() and flags_from_text_set().  The
DNSKEY record doesn't support text flags; this was leftover from
the KEY record.

Remove tests that are no longer needed, and update other tests for these
changes.

5 years agoStart converting rdatatype/rdataclass to enum.
Brian Wellington [Mon, 18 May 2020 17:25:11 +0000 (10:25 -0700)] 
Start converting rdatatype/rdataclass to enum.

5 years agorefactor resolver, extracting all business logic
Bob Halley [Mon, 18 May 2020 15:08:05 +0000 (08:08 -0700)] 
refactor resolver, extracting all business logic

5 years agoadd is_address()
Bob Halley [Mon, 18 May 2020 15:07:47 +0000 (08:07 -0700)] 
add is_address()

5 years agoprevent async resolver infinite attempts if caller does not use a timeout scope
Bob Halley [Sun, 17 May 2020 20:26:48 +0000 (13:26 -0700)] 
prevent async resolver infinite attempts if caller does not use a timeout scope

5 years agoadd missing import to trio example
Bob Halley [Sun, 17 May 2020 02:48:49 +0000 (19:48 -0700)] 
add missing import to trio example

5 years agoindentation lint
Bob Halley [Sun, 17 May 2020 02:26:47 +0000 (19:26 -0700)] 
indentation lint

5 years agoasync resolver and linting
Bob Halley [Sun, 17 May 2020 02:26:37 +0000 (19:26 -0700)] 
async resolver and linting

5 years agoStart trio async support.
Bob Halley [Sat, 16 May 2020 23:51:28 +0000 (16:51 -0700)] 
Start trio async support.

5 years agoMerge pull request #471 from bwelling/dnssec-enum
Bob Halley [Sat, 16 May 2020 22:16:19 +0000 (15:16 -0700)] 
Merge pull request #471 from bwelling/dnssec-enum

Improve consistency in DNSSEC code.