[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-04-14 Thread Eric V. Smith
Changes by Eric V. Smith : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-04-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5992d2c9522c by Eric V. Smith in branch 'default': Issue #20480: Add ipaddress.reverse_pointer. Patch by Leon Weber. http://hg.python.org/cpython/rev/5992d2c9522c -- nosy: +python-dev ___ Python tracker

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-06 Thread Eric V. Smith
Eric V. Smith added the comment: Looks good to me. Once 3.5 is open for new features, I'll commit this. (But feel free to ping me if you think it's lingering!) Thanks! -- assignee: -> eric.smith ___ Python tracker

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-06 Thread Leon Weber
Leon Weber added the comment: I noticed an inconsistency between IPv4 and IPv6 in my temporary variable names when looking at the patch again after a few days. Here’s an updated patch. Not that it’s important, but I sleep better that way :) As consensus seems to have settled on leaving out the

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Nick Coghlan
Nick Coghlan added the comment: >From a "principle of least surprise" point of view, non-specialists would likely be puzzled by a trailing dot and wonder why it was there. By contrast, specialists that know the trailing dot is technically *supposed* to be there are already going to be accustomed

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Leon Weber
Leon Weber added the comment: I can live without the trailing dot, although I’d find it “more correct” to have it. I’ve attached an alternative patch that doesn’t return a trailing dot, it’s up to you guys to decide which one you prefer. -- Added file: http://bugs.python.org/file3387

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: The documentation change looks good to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: I concede the point on the trailing dot. The reason we used to always use it is that it prevented the local resolver from first trying to append the host's default domain name (as, for example, defined in /etc/resolv.conf as "search"). I have no idea if resolve

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well that convention is also used in existing APIs: >>> socket.gethostbyaddr("8.8.8.8") ('google-public-dns-a.google.com', [], ['8.8.8.8']) (note that this merely reflects a POSIX API) -- ___ Python tracker

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Leon Weber
Leon Weber added the comment: > According to apt-cache, the version I tried with is > 1:9.9.3.dfsg.P2-4ubuntu1 Ok, then it depends on something else apparently. It’s not so relevant anyway because even with the trailing dot, “host” is inconsistent between IPv4 and IPv6, and we should choose a

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Oh, interesting. It does on Fedora 19 with version 9.9.3, but not on > my Ubuntu installation with version 9.8.1. So it seems this was added > between 9.8.1 and 9.9.3. According to apt-cache, the version I tried with is 1:9.9.3.dfsg.P2-4ubuntu1 -- __

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Leon Weber
Leon Weber added the comment: > As for what the "host" command does, it doesn't add any trailing dots > here: Oh, interesting. It does on Fedora 19 with version 9.9.3, but not on my Ubuntu installation with version 9.8.1. So it seems this was added between 9.8.1 and 9.9.3. -- ___

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Leon Weber
Leon Weber added the comment: I’ve changed the wording in the documentation a bit and added an explanatory sentence, how about this? I think this should make pretty clear what it does and does not, and also easy to find in the documentation when searching for “reverse”, “PTR” and “pointer” (w

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'd prefer to leave the trailing dots. It's the technically correct thing to > do. It depends what we're talking about. Hostnames (in the general sense) don't carry a trailing dot except in DNS queries. So I'd argue the trailing dot is more part of the DNS pr

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: Or, now that I think about it some more, maybe leave the name as reverse_pointer and just mention PTR records in the documentation. -- ___ Python tracker __

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: The patch looks good to me, save for a versionadded tag in the docs. I've mentioned it on Rietveld. Not to get in to bikeshedding on the name, but I'd prefer something with PTR in the name. I'm an old-timer, and think of these as "PTR lookups" (because they ar

[issue20480] Add ipaddress property to get name of reverse DNS PTR record

2014-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: I'd prefer to leave the trailing dots. It's the technically correct thing to do. And as they say, technically correct is the best kind of correct! -- title: Add ipaddress property to get name of reverse DNS pointer -> Add ipaddress property to get name