--Adjust imports
Change: "from rethinkdb import r" To: "import rethinkdb as r"
--No more connection.run()
Change all your connection.run() to .run(connection)
For instance:
connection.run(r.db('test_db').table_create('test_table'))
becomes
r.db('test_db').table_create('test_table').run(connection)
--No more global connections
This one sucks IMHO. Took more than I'd like to refactor (still in progress). You have to explicitly pass a connection to every run() command. So this:
r.table('test_table').run()
becomes
r.table('test_table').run(C)
where C is a declared connection.
More notes as I find them....