[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2021-10-17 Thread Foster Snowhill
Foster Snowhill added the comment: I've stumbled upon this myself, and had a go at fixing it, before looking up this issue. My approach ended up being a bit different: 1. I rewrote the existing _reverse_pointer() methods, so that they'd handle both addresses and networks, instead of

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2021-10-17 Thread Foster Snowhill
Change by Foster Snowhill : -- pull_requests: +27289 pull_request: https://github.com/python/cpython/pull/29011 ___ Python tracker ___

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2021-10-13 Thread Foster Snowhill
Change by Foster Snowhill : -- nosy: +forst ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2021-04-12 Thread Roundup Robot
Change by Roundup Robot : -- nosy: +python-dev nosy_count: 6.0 -> 7.0 pull_requests: +24104 pull_request: https://github.com/python/cpython/pull/25371 ___ Python tracker ___

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2021-04-12 Thread jana
jana added the comment: This code does the trick: ipn = ipaddress.ip_network("2a0c:ac10::/32") prefix = ipn.prefixlen if ipn.version == 6: rest = int((ipn.max_prefixlen - prefix) / 4) elif ipn.version == 4: rest = int((ipn.max_prefixlen - prefix) / 8) return

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2021-04-12 Thread jana
jana added the comment: Running into the same problem here. Within the zonefile rfc1035 defines a usecase for ipv4, but I can't find anything similar for IPv6. The feature is also rather obscure. The zone however is used in the zonefile as origin and in bind in the named.conf to refer to

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-03-13 Thread Ronald Oussoren
Ronald Oussoren added the comment: The "reverse_pointers" attribute is implicitly documented by this phrase in the introduction of network objects: -- All attributes implemented by address objects are implemented by network objects as well. -- --

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-03-13 Thread bbayles
Change by bbayles : -- nosy: +bbayles ___ Python tracker ___ ___ Python-bugs-list mailing

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-03-12 Thread Ewoud Kohl van Wijngaarden
Ewoud Kohl van Wijngaarden added the comment: It's interesting to note that neither IPv4Network[1] nor IPv4Network docs mention reverse_pointer. That means it could also remove them (which essentially also throws an exception) since they don't make sense

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-02-09 Thread Ronald Oussoren
Ronald Oussoren added the comment: documents that this attribute contains the name of the DNS name that could be used to query for PTR record. That functionality is not well

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2018-02-04 Thread Cheryl Sabella
Change by Cheryl Sabella : -- nosy: +pmoody ___ Python tracker ___ ___ Python-bugs-list

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2017-09-17 Thread Ewoud Kohl van Wijngaarden
Ewoud Kohl van Wijngaarden added the comment: Today I ran into this as well. In the case of IPv6 it's simple to decide what should be returned but on the IPv4Network I disagree. My expectation would be the domain where I would make the reverse needed. That means for 127.0.0.0/13 it should be

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2017-09-17 Thread Ewoud Kohl van Wijngaarden
Changes by Ewoud Kohl van Wijngaarden : -- keywords: +patch pull_requests: +3621 stage: -> patch review ___ Python tracker

[issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken

2017-05-31 Thread Hristo Venev
New submission from Hristo Venev: `ipaddress.IPv4Network('127.0.0.0/16').reverse_pointer = '0/16.0.0.127.in-addr.arpa'` is definitely wrong. I think it should be '0.127.in-addr.arpa'. A funnier case, `ipaddress.IPv6Network('2001:db8::/32').reverse_pointer =