aws-samples / amazon-documentdb-serverless-samples

Lambda functions and CloudFormation templates required for building serverless applications on top of Amazon DocumentDB
MIT No Attribution
20 stars 14 forks source link

GDELTDataParser.py relies on python2, but Cloud9 now comes with python3 #2

Open tleonhardt opened 4 years ago

tleonhardt commented 4 years ago

The GDELTDATAParser.py file doesn't work with Python 3, but the Cloud9 instance generated using the CF template comes with Python 3.6.10 by default.

Since Python 2 is EOL, this file should be updated to work with Python 3.

The changes that need to happen are as follows:

  1. Replace ConfigParser with configparser
    • trivial change, just need to make case sensitive change in import and one place it is used
  2. Replace use of urllib2 with one of urllib.request, urllib3, or requests
    • Potentially more complex due to bytes vs string difference of Python2 vs Python 3