[Buildroot] [PATCH buildroot-test] scripts/autobuild-run: make it Python 3.x compatible
arnout at mind.be
Tue Dec 3 20:43:40 UTC 2019
On 03/12/2019 21:00, Thomas Petazzoni wrote:
> On Tue, 3 Dec 2019 19:11:37 +0200
> Baruch Siach <baruch at tkos.co.il> wrote:
>>> - The urlparse module no longer exists, it's not urllib.parse
>>> if sys.hexversion >= 0x3000000:
>>> import configparser
>>> import urllib.request as _urllib
>>> + import urllib.parse as urlparse
>> Would that work with any Python 3.x?
> has some comments in the documentation of urllib.parse.urlparse() that
> Changed in version 3.2: Added IPv6 URL parsing capabilities.
> So it means that urllib.parse.urlparse() was there at least before
> Python 3.2, which means it was most likely there since Python 3.x.
And anyway, I think we generally should assume Python >= 3.4. Debian
oldoldstable (jessie) has 3.4 already. Trying to support older versions will
make our life unnecessarily difficult.
More information about the buildroot