Trying to develop Python Application using Flask, to consume OData services to connect to SAP HANA. When trying to open the url, the whole application crashes and I get a DeprecationWarning. What's the purpose of DeprecationWarnings?
from flask import Flask, render_template, request
from pyslet.odata2.client import Client
from pyslet.http.auth import BasicCredentials
from pyslet.http.client import Client as http
from pyslet.http.client import ClientRequest
app = Flask(__name__)
@app.route('/')
def test():
return('test')
@app.route('/odata')
def hello():
table = testClient()
return render_template('odata.html', table=table)
def testClient():
c = MyAuthenticatedClient('link to xso data')
table = c.feeds['MarketShareFSet'].OpenCollection()
tablenames = []
for t in table.iteritems():
c1 = p['ID'].value
c2 = p['Country'].value
c3 = p['Hub'].value
c4 = p['Division'].value
tablenames.append((c1, c2,c3,c4))
return tablenames
127.0.0.1 - - [13/Mar/2019 13:59:40] "GET / HTTP/1.1" 200 -
main.py:23: DeprecationWarning: EntitySet.OpenCollection is deprecated, use open instead
table = c.feeds['MarketShareFSet'].OpenCollection()