Skip to content

[Bug] Remove usage of the six package #1346

@wenzeslaus

Description

@wenzeslaus

Describe the bug

Couple tools are still using six which is no longer a dependency and not needed with Python 3 only code.

To Reproduce

In an environment without six, you will get:

ModuleNotFoundError: No module named 'six'

Expected behavior

We probably have six lingering here and there in the CI and any dependency can bring six as a transitive dependency for us, but removing usage of six from our code is the first, and possibly the only, step to do.

Screenshots

grep -IrnE "from six|import six"
src/raster/r.in.srtm.region/r.in.srtm.region.py:125:from six.moves.urllib import request as urllib2
src/raster/r.in.nasadem/r.in.nasadem.py:119:from six.moves.urllib import request as urllib2
src/raster/r.in.usgs/r.in.usgs.py:159:from six.moves.urllib.request import urlopen
src/raster/r.in.usgs/r.in.usgs.py:160:from six.moves.urllib.error import URLError, HTTPError
src/raster/r.in.usgs/r.in.usgs.py:161:from six.moves.urllib.parse import quote_plus

Additional context

I found this through the addon build logs artifact in the new Documentation workflow in the main repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    PythonRelated code is in PythonbugSomething isn't workingdependenciesPull requests that update a dependency filegood first issueGood for newcomers

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions