Skip to content

Commit

Permalink
remove Python 2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkralidis committed Jun 25, 2019
1 parent 8ecdc3d commit 430342c
Show file tree
Hide file tree
Showing 116 changed files with 27 additions and 287 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: python
python:
- "2.7"
- "3.5"
- "3.6"
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

from __future__ import absolute_import
import sys, os

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down
2 changes: 0 additions & 2 deletions examples/csw-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# Contact email: tomkralidis@gmail.com
# =============================================================================

from __future__ import absolute_import
from __future__ import print_function
import sys
import getopt

Expand Down
2 changes: 0 additions & 2 deletions examples/csw-harvest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

# simple process to harvest CSW catalogues via Harvest operations

from __future__ import absolute_import
from __future__ import print_function
import sys
from owslib.csw import CatalogueServiceWeb

Expand Down
3 changes: 0 additions & 3 deletions examples/iso-getcodelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@

# get a list of entries for a given code list dictionary

from __future__ import absolute_import
from __future__ import print_function
import sys
import urllib2

from owslib.etree import etree
from owslib.iso import CodelistCatalogue
Expand Down
2 changes: 0 additions & 2 deletions examples/wcs-thredds-prism.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#
# Example to find the equivalent information using OWSLib:
#
from __future__ import absolute_import
from __future__ import print_function
from owslib.wcs import WebCoverageService
wcs=WebCoverageService('http://cida.usgs.gov/thredds/wcs/prism',version='1.0.0')
# Take a look at the contents (coverages) of the wcs.
Expand Down
2 changes: 0 additions & 2 deletions examples/wps-birdhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
This example calls processes on a Emu WPS: https://github.com/bird-house/emu
"""

from __future__ import absolute_import
from __future__ import print_function
from owslib.wps import WebProcessingService, ComplexDataInput, monitorExecution

verbose = False
Expand Down
2 changes: 0 additions & 2 deletions examples/wps-ceda-script.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Example script that performs a set of (small) live requests versus the live CEDA WPS service

from __future__ import absolute_import
from __future__ import print_function
from owslib.wps import WebProcessingService, WPSExecution, WFSFeatureCollection, WFSQuery, GMLMultiPolygonFeatureCollection, monitorExecution, ComplexData, printInputOutput
from owslib.util import dump

Expand Down
2 changes: 0 additions & 2 deletions examples/wps-client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#
# =============================================================================

from __future__ import absolute_import
from __future__ import print_function
import sys
import getopt
import os
Expand Down
2 changes: 0 additions & 2 deletions examples/wps-pml-script-1.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Example script that performs a set of (small) live requests versus the live PML WPS service

from __future__ import absolute_import
from __future__ import print_function
from owslib.wps import WebProcessingService, monitorExecution

# instantiate WPS client
Expand Down
2 changes: 0 additions & 2 deletions examples/wps-pml-script-2.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Example script that performs a set of (small) live requests versus the live PML WPS service

from __future__ import absolute_import
from __future__ import print_function
from owslib.wps import WebProcessingService, monitorExecution

# instantiate WPS client
Expand Down
2 changes: 0 additions & 2 deletions examples/wps-usgs-script.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Example script that performs a set of (small) live requests versus the live USGS WPS service

from __future__ import absolute_import
from __future__ import print_function
from owslib.wps import WebProcessingService, WPSExecution, WFSFeatureCollection, WFSQuery, GMLMultiPolygonFeatureCollection, monitorExecution, printInputOutput
from owslib.util import dump

Expand Down
2 changes: 0 additions & 2 deletions owslib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from __future__ import (absolute_import, division, print_function)

__version__ = '0.18.0'
2 changes: 0 additions & 2 deletions owslib/coverage/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@

from __future__ import (absolute_import, division, print_function)
2 changes: 0 additions & 2 deletions owslib/coverage/wcs100.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
# Contact email: d.lowe@rl.ac.uk
# =============================================================================

from __future__ import (absolute_import, division, print_function)

from owslib.coverage.wcsBase import WCSBase, WCSCapabilitiesReader, ServiceException
try:
from urllib import urlencode
Expand Down
7 changes: 1 addition & 6 deletions owslib/coverage/wcs110.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,9 @@

##########NOTE: Does not conform to new interfaces yet #################

from __future__ import (absolute_import, division, print_function)

from .wcsBase import WCSBase, WCSCapabilitiesReader, ServiceException
from owslib.util import openURL, testXMLValue
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode
from owslib.etree import etree
import os, errno
from owslib.coverage import wcsdecoder
Expand Down
7 changes: 1 addition & 6 deletions owslib/coverage/wcs200.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@
##########NOTE: Does not conform to new interfaces yet #################


from __future__ import (absolute_import, division, print_function)

from owslib.coverage.wcsBase import WCSBase, WCSCapabilitiesReader, ServiceException
from owslib.ows import OwsCommon, ServiceIdentification, ServiceProvider, OperationsMetadata

try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode
from owslib.util import openURL, testXMLValue
from owslib.etree import etree
from owslib.crs import Crs
Expand Down
7 changes: 1 addition & 6 deletions owslib/coverage/wcs201.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@
##########NOTE: Does not conform to new interfaces yet #################


from __future__ import (absolute_import, division, print_function)

from owslib.coverage.wcsBase import WCSBase, WCSCapabilitiesReader, ServiceException
from owslib.ows import OwsCommon, ServiceIdentification, ServiceProvider, OperationsMetadata

try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode
from owslib.util import openURL, testXMLValue
from owslib.etree import etree
from owslib.crs import Crs
Expand Down
7 changes: 1 addition & 6 deletions owslib/coverage/wcsBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@
# Contact email: d.lowe@rl.ac.uk
# =============================================================================

from __future__ import (absolute_import, division, print_function)

try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode
from owslib.etree import etree
import cgi
from six.moves import cStringIO as StringIO
Expand Down
2 changes: 0 additions & 2 deletions owslib/coverage/wcsdecoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
#decoder=wcsdecoder.WCSDecoder(u)
#decoder.getCoverages()

from __future__ import (absolute_import, division, print_function)

import os
from owslib.etree import etree
import email
Expand Down
2 changes: 0 additions & 2 deletions owslib/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

""" API for OGC CRS constructs. """

from __future__ import (absolute_import, division, print_function)

# list of URN codes for EPSG in which axis order
# of coordinates are y,x (e.g. lat, long)
axisorder_yx = frozenset([
Expand Down
12 changes: 2 additions & 10 deletions owslib/csw.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,12 @@

""" CSW request and response processor """

from __future__ import (absolute_import, division, print_function)

import inspect
import warnings
import six
try:
from StringIO import StringIO as BytesIO # Python 2
except ImportError:
from io import BytesIO # Python 3
from io import BytesIO
import random
try: # Python 3
from urllib.parse import urlencode
except ImportError: # Python 2
from urllib import urlencode
from urllib.parse import urlencode

from owslib.etree import etree
from owslib import fes
Expand Down
2 changes: 0 additions & 2 deletions owslib/dif.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

""" DIF metadata parser """

from __future__ import (absolute_import, division, print_function)

from owslib.etree import etree
from owslib import util
from owslib.namespaces import Namespaces
Expand Down
1 change: 0 additions & 1 deletion owslib/etree.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Contact email: sgillies@frii.com
# =============================================================================

from __future__ import (absolute_import, division, print_function)
import six
from owslib.namespaces import Namespaces

Expand Down
7 changes: 1 addition & 6 deletions owslib/feature/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,9 @@
#
# =============================================================================

from __future__ import (absolute_import, division, print_function)

from owslib.crs import Crs

try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode
import logging
from owslib.util import log, Authentication
from owslib.feature.schema import get_schema
Expand Down
7 changes: 1 addition & 6 deletions owslib/feature/wfs100.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@
# $Id: wfs.py 503 2006-02-01 17:09:12Z dokai $
# =============================================================================

from __future__ import (absolute_import, division, print_function)

from six import PY2
from six.moves import cStringIO as StringIO

from owslib import util

try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode
from owslib.util import testXMLValue, extract_xml_list, ServiceException, xmltag_split, Authentication, openURL, log
from owslib.etree import etree
from owslib.fgdc import Metadata
Expand Down
7 changes: 1 addition & 6 deletions owslib/feature/wfs110.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,9 @@
# Contact email: tomkralidis@gmail.com
# =============================================================================

from __future__ import (absolute_import, division, print_function)

from six import PY2
from six.moves import cStringIO as StringIO
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode
from owslib.util import testXMLValue, nspath_eval, ServiceException, Authentication,\
openURL
from owslib.etree import etree
Expand Down
2 changes: 0 additions & 2 deletions owslib/feature/wfs200.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# $Id: wfs.py 503 2006-02-01 17:09:12Z dokai $
# =============================================================================

from __future__ import (absolute_import, division, print_function)

#owslib imports:
from owslib import util
from owslib.fgdc import Metadata
Expand Down
2 changes: 0 additions & 2 deletions owslib/fes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
Currently supports version 1.1.0 (04-095).
"""

from __future__ import (absolute_import, division, print_function)

from owslib.etree import etree
from owslib import util
from owslib.namespaces import Namespaces
Expand Down
2 changes: 0 additions & 2 deletions owslib/fgdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

""" FGDC metadata parser """

from __future__ import (absolute_import, division, print_function)

from owslib.etree import etree
from owslib import util

Expand Down
2 changes: 0 additions & 2 deletions owslib/gm03.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

"""GM03 Core metadata parser http://www.geocat.ch/internet/geocat/en/home/documentation/gm03.html"""

from __future__ import (absolute_import, division, print_function)

from owslib import util
from owslib.etree import etree
from owslib.namespaces import Namespaces
Expand Down
3 changes: 0 additions & 3 deletions owslib/interfaces.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
from __future__ import (absolute_import, division, print_function)


# Follows the 4 aspects of service metadata

class IServiceIdentificationMetadata:
Expand Down
1 change: 0 additions & 1 deletion owslib/iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

""" ISO metadata parser """

from __future__ import (absolute_import, division, print_function)
import warnings

from owslib.etree import etree
Expand Down
1 change: 0 additions & 1 deletion owslib/iso_che.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

""" ISO metadata parser """

from __future__ import (absolute_import, division, print_function)
import warnings

from owslib.etree import etree
Expand Down
2 changes: 0 additions & 2 deletions owslib/map/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# -*- coding: ISO-8859-15 -*-

from __future__ import (absolute_import, division, print_function)
8 changes: 1 addition & 7 deletions owslib/map/common.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
from __future__ import (absolute_import, division, print_function)

import cgi
try: # Python 3
from urllib.parse import urlencode
except ImportError: # Python 2
from urllib import urlencode
from urllib.parse import urlencode

from owslib.etree import etree
from owslib.util import strip_bom, Authentication, openURL



class WMSCapabilitiesReader(object):
"""Read and parse capabilities document into a lxml.etree infoset
"""
Expand Down
7 changes: 1 addition & 6 deletions owslib/map/wms111.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,8 @@
Currently supports only version 1.1.1 of the WMS protocol.
"""

from __future__ import (absolute_import, division, print_function)

import cgi
try: # Python 3
from urllib.parse import urlencode
except ImportError: # Python 2
from urllib import urlencode
from urllib.parse import urlencode

import warnings

Expand Down
Loading

0 comments on commit 430342c

Please sign in to comment.