[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#785275: ITP: python-ipaddress -- Backport of the ipaddress module from Python 3.3



On Thursday, May 14, 2015 06:55:40 AM Tristan Seligmann wrote:
> On 14 May 2015 at 06:04, Scott Kitterman <debian@kitterman.com> wrote:
> > Why can't python-cryptography use python-ipaddr that's already in the
> > archive?
> cryptography is python2/3 dual-source. Carrying a Debian-specific
> patch[1] that introduces a slew of fallback imports to ipaddr, solely
> to avoid uploading a new package, seems like a poor choice to me.
> 
> Having said that, I just whipped up a proof-of-concept patch that adds
> "import ipaddr as ipaddress" fallbacks everywhere, and the related
> tests seem to pass (I still have some failures due to missing
> python-idna[3], so I don't have a clean test run yet), so it appears
> that this would be feasible without major changes.
> 
> > There are only two very small API differences and when you introduce
> > ipaddress in python2, it can break code that's designed to use ipaddr in
> > python2 and ipaddress in python3 (I've run into this in projects where
> > I'm upstream).
> That is unfortunate, but unless the ipaddress backport is
> API-incompatible in some way with the Python 3 stdlib version, surely
> this just a bug in that code?
> 
> (Incidentally, I was initially under the impression that the APIs were
> completely incompatible, as the API docs are severely out of date[2],
> but the current version is much closer, as you describe)

Is this 100% compatible with ipaddress from upstream now?  The problem I ran 
into before is that when importing ipaddress and it turned out to be this one 
and not the upstream one, the API was different, so it didn't work.  
Introducing this in the archive would, based on that experience, cause 
breakage in other packages.  It's completely trivial to use ipaddr with 
python2 and ipaddress with python3 [1], so this backport seems pretty 
pointless to me.

Scott K

[1] https://skitterman.wordpress.com/2013/05/16/new-ipaddress-module-in-python3-3/

> > It seems somewhat odd to me to take ipaddr that was developed for python2
> > and integrated upstream as ipaddress in python3 and then backport it to
> > python2 as ipaddress.
> 
> Well, blame the CPython maintainers for their fondness of arbitrarily
> changing the API of modules they import into stdlib...
> 
> > Also, the listed copyright holder in the code is Google, not Philipp
> > Hagemeister.
> Yes, the copyright holder is Google, the code was contributed to
> Python under the PSF license. (I didn't mean to imply otherwise, I
> just copy/pasted the info from PyPI into the wnpp template, apparently
> without paying enough attention to what I was doing)
> 
> [1] I don't see why upstream should be interested in such a patch.
> 
> [2] http://pythonhosted.org//ipaddr/ as linked to from
> https://pypi.python.org/pypi/ipaddr/
> 
> [3] https://bugs.debian.org/756388


Reply to: