News for hackers. Stuff that matters.
Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by gsibble on Monday March 18, 2013 @03:32PM (#5396591)
Refactoring code for 1.4 in Python. Here are the fixes I've had to make so far (so everyone can reference):

--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....

Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by wmrowan on Monday March 18, 2013 @03:54PM (#5396729)
Thanks for the notes gsibble, please let us know anywhere where we can make the docs more clear, especially anywhere the behavior has changed since 1.3. We appreciate your patience with the breaking changes.

As for the changes to `connection.run` and `query.run` please note that in the Python driver you can call `.repl()` on any newly created connection to set that connection as a global default. This should replicate the old behavior.

We decided that doing this by default was unsafe as it relied on global state modified any time a new connection is opened. Even so, we appreciate the convenience and kept the behavior in the form of the `.repl()` for when you're trying out RethinkDB in a simple script (or the Python REPL) that only creates one connection and doesn't use threads.

Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by gsibble on Monday March 18, 2013 @04:30PM (#5396912)
Oh damn. Already halfway through refactoring. Can you update the change docs to note that?

https://github.com/rethinkdb/rethinkdb/wiki/ReQL-changes-in-...

I don't see it on there.

Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by coffeemug on Monday March 18, 2013 @04:41PM (#5396992)
Sorry -- just updated the doc.
Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by gsibble on Monday March 18, 2013 @04:59PM (#5397095)
No worries. I should have looked for it!
Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by gsibble on Monday March 18, 2013 @05:12PM (#5397160)
Another one:

--Remove primary key definition from .get()

No more primary key name is needed as a 2nd argument (and in fact breaks if you pass it). Just delete it.

Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by gsibble on Monday March 18, 2013 @06:33PM (#5397612)
And one more:

--List of RDB objects is now a cursor, not a list

Some iterations (notably for loops in jinja2) don't iterate properly. Need to pass them a real list by calling list() on the cursor.

Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by jdoliner on Monday March 18, 2013 @11:05PM (#5398664)
How do they fail. Calling list() on cursor objects could be a really bad idea if they contain a lot of data since it will cause it all to be loaded in to memory.
Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by gsibble on Tuesday March 19, 2013 @12:52AM (#5399022)
Nothing shows up when I use an iterator for loop in jinja2. Not sure why. Turning it into a list fixes it.
Re:RethinkDB 1.4 is out: better protocol, drivers, data expl... by coffeemug on Wednesday March 20, 2013 @06:09AM (#5406361)
This made sense. Cursors used to behave as lists implicitly, now we just make it explicit to make it very clear what's happening.