dnspython 2.9.1__py3-none-any.whl → 2.9.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dns/rdtypes/IN/WKS.py CHANGED
@@ -45,6 +45,10 @@ class WKS(dns.rdata.Rdata):
45
45
  self.address = self._as_ipv4_address(address)
46
46
  self.protocol = self._as_uint8(protocol)
47
47
  self.bitmap = self._as_bytes(bitmap)
48
+ if len(self.bitmap) > 8192:
49
+ raise ValueError(
50
+ "service bitmap must be between 0 and 8192 bytes inclusive"
51
+ )
48
52
 
49
53
  def to_styled_text(self, style: dns.rdata.RdataStyle) -> str:
50
54
  bits = []
@@ -78,11 +82,12 @@ class WKS(dns.rdata.Rdata):
78
82
  else:
79
83
  protocol_text = "tcp"
80
84
  serv = socket.getservbyname(value, protocol_text)
85
+ if serv < 0 or serv > 65535:
86
+ raise ValueError("service must be between 0 and 65535 inclusive")
81
87
  i = serv // 8
82
88
  l = len(bitmap)
83
89
  if l < i + 1:
84
- for _ in range(l, i + 1):
85
- bitmap.append(0)
90
+ bitmap.extend(bytes(i + 1 - l))
86
91
  bitmap[i] = bitmap[i] | (0x80 >> (serv % 8))
87
92
  bitmap = dns.rdata._truncate_bitmap(bitmap)
88
93
  return cls(rdclass, rdtype, address, protocol, bitmap)
dns/version.py CHANGED
@@ -22,7 +22,7 @@ MAJOR = 2
22
22
  #: MINOR
23
23
  MINOR = 9
24
24
  #: MICRO
25
- MICRO = 1
25
+ MICRO = 2
26
26
  #: RELEASELEVEL
27
27
  RELEASELEVEL = 0x0F
28
28
  #: SERIAL
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dnspython
3
- Version: 2.9.1
3
+ Version: 2.9.2
4
4
  Summary: DNS toolkit
5
5
  Author: Bob Halley
6
6
  Author-email: Bob Halley <halley@dnspython.org>
@@ -85,7 +85,7 @@ testing of DNS software.
85
85
 
86
86
  ## ABOUT THIS RELEASE
87
87
 
88
- This is `dnspython` 2.9.1.
88
+ This is `dnspython` 2.9.2.
89
89
  Please read
90
90
  [What's New](https://dnspython.readthedocs.io/en/stable/whatsnew.html) for
91
91
  information about the changes in this release.
@@ -124,7 +124,7 @@ dns/rdtypes/IN/NSAP_PTR.py,sha256=iTxlV6fr_Y9lqivLLncSHxEhmFqz5UEElDW3HMBtuCU,10
124
124
  dns/rdtypes/IN/PX.py,sha256=yHSLDit7pBCW-sNcgPFPE9B_eHpWJWok73jCbLvraEs,2735
125
125
  dns/rdtypes/IN/SRV.py,sha256=2WCYcNzWaQg_t3EcmZG9Le7MHdDdIhcrAkYMEOE-JAg,2750
126
126
  dns/rdtypes/IN/SVCB.py,sha256=HeFmi2v01F00Hott8FlvQ4R7aPxFmT7RF-gt45R5K_M,218
127
- dns/rdtypes/IN/WKS.py,sha256=z3cpg2RLNRhtSqmGNECi16uYKMoCYfmf892SraGJZuU,3717
127
+ dns/rdtypes/IN/WKS.py,sha256=LzXTBFc3Yb5Rpx6PKbWs4IDsJvLcvY6-onjDPGzjSxc,3965
128
128
  dns/rdtypes/IN/__init__.py,sha256=HbI8aw9HWroI6SgEvl8Sx6FdkDswCCXMbSRuJy5o8LQ,1083
129
129
  dns/rdtypes/__init__.py,sha256=vXT_PzeXOiBz61hFJZ7XaUVbntp8xCyOrAoa1dhNW_o,1090
130
130
  dns/rdtypes/base64base.py,sha256=IYxjdIyq394iOhcVhgLmDPVX_vyf89L-3vBS7ntptws,1992
@@ -151,7 +151,7 @@ dns/tsig.py,sha256=LwDhWQEVTWwCIOFPjUqrsD-dibnjpIRgO9DmHwXgIeY,11622
151
151
  dns/tsigkeyring.py,sha256=7tcK05FotEdNDiuTMlK-whPFiL1768XzOUFjeTij1e4,3821
152
152
  dns/ttl.py,sha256=PijHguzU43Pl0yXHs1s8u5SphQ6rHAilqYXca43PVKk,3002
153
153
  dns/update.py,sha256=23q6ZmIX6YPYFlpdnYfcgX3QHMG1JcuQqUoqBHc0aOw,12279
154
- dns/version.py,sha256=6CFXlZfpGcam_QIhBy274ifchdp9AyltK9hfuTekON4,1763
154
+ dns/version.py,sha256=MVSMqib-CDxfv8nfkGnbsmvVv7bOi74ya-gU6md0a4U,1763
155
155
  dns/versioned.py,sha256=evgGwF3kkvuiv-UVBzOEt-Xkec0Y7fQH8HmkdmDSRjg,12645
156
156
  dns/win32util.py,sha256=gRffjFYW22xIs5bfomxIZ5EHDv6yIid6BuZzaSrOvOo,16752
157
157
  dns/wire.py,sha256=FIAbqq8ofrIufcw6n9OzDlCmefU-Z6e7OCZE-Wwu9kM,410
@@ -160,7 +160,7 @@ dns/xfr.py,sha256=vUYm-vpgHYM-8ZEVpvRnJrXGdSt2TibaMdqNprHAezs,15897
160
160
  dns/zone.py,sha256=XDXkNq_SIIeZ61IZ_u5hHqirBwsCA9cuRu9_qaUR8Jg,61948
161
161
  dns/zonefile.py,sha256=aMQOuto-1ILq1ENNJ0blTUvhCpmiJqFSQvOwizNsfA8,31050
162
162
  dns/zonetypes.py,sha256=HrQNZxZ_gWLWI9dskix71msi9wkYK5pgrBBbPb1T74Y,690
163
- dnspython-2.9.1.dist-info/licenses/LICENSE,sha256=w-o_9WVLMpwZ07xfdIGvYjw93tSmFFWFSZ-EOtPXQc0,1526
164
- dnspython-2.9.1.dist-info/WHEEL,sha256=3NO1oYsF7mANFUWVdyEQLM-zmecczWWEmmF5rEbXrWk,80
165
- dnspython-2.9.1.dist-info/METADATA,sha256=02FX19Mn1FFlAHKk9LgF0fJRUz3oNvCOdULyy31Wut0,5786
166
- dnspython-2.9.1.dist-info/RECORD,,
163
+ dnspython-2.9.2.dist-info/licenses/LICENSE,sha256=w-o_9WVLMpwZ07xfdIGvYjw93tSmFFWFSZ-EOtPXQc0,1526
164
+ dnspython-2.9.2.dist-info/WHEEL,sha256=MWx7psoF7KNST9G72pGtiBYuaXRXQXBk9pw5R6FzYko,80
165
+ dnspython-2.9.2.dist-info/METADATA,sha256=3_r-WzuIqWN9BLPzmbW47-w75sdx5lvIDN6X2Qxuj30,5786
166
+ dnspython-2.9.2.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.13.6
2
+ Generator: uv 0.13.7
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any