o19s / relevant-search-book

Code and Examples for Relevant Search
298 stars 108 forks source link

Any plan to upgrade to python 3.x? #10

Open mfkilgore opened 8 years ago

mfkilgore commented 8 years ago

I have made a few changes myself as required, but would be nice to have 3.x supported too.

Thanks,

JnBrymn-EB commented 8 years ago

I agree it would be nice to have support for 3.x, though it's difficult because I don't want the distinction between 2.x and 3.x to be a cause of confusion itself. Do you see any place where the code is currently 2.x compatible and not 3.x compatible but can easily be made compatible with both?

softwaredoug commented 8 years ago

I'm guessing this would mostly be print statements...

On Tuesday, January 19, 2016, John Berryman notifications@github.com wrote:

I agree it would be nice to have support for 3.x, though it's difficult because I don't want the distinction between 2.x and 3.x to be a cause of confusion itself. Do you see any place where the code is currently 2.x compatible and not 3.x compatible but can easily be made compatible with both?

— Reply to this email directly or view it on GitHub https://github.com/o19s/relevant-search-book/issues/10#issuecomment-172755044 .

mfkilgore commented 8 years ago

True most of the changes are print statements and simple to fix. There are a couple of others like iteritems -> items, but mostly easy.

villasv commented 5 years ago

I've been porting to Python 3 and Elasticsearch 6 in my own fork but I'm taking full liberties to rename and remove stuff so I don't think I'll ever actually make a PR.

But yes, the effort is very small. Mostly print statements and iteritems for python, and mostly get parameters that became json parameters or string -> text types on the ES side. Besides the classic similarity metric being completely deprecated in 6.3.0.

softwaredoug commented 5 years ago

It’s possible we’d get around to updating the examples to Python 3. But we’d probably have to keep it as a branch to keep what’s here consistent with what’s printed in the book. So your fork might be best way to achieve this for now.

Of course if there’s a new edition, I fee like we’d be obligated to update to Python 3. As well as updating for more current Elastic features where the book is now out of date (experiencing this pin myself as a build relevance training!)

On Tue, Oct 30, 2018 at 5:08 PM Victor Villas notifications@github.com wrote:

I've been porting to Python 3 and Elasticsearch 6 in my own fork https://github.com/villasv/relevant-search-book but I'm taking full liberties to rename and remove stuff so I don't think I'll ever actually make a PR.

But yes, the effort is very small. Mostly print statements and iteritems for python, and mostly get parameters that became json parameters or string -> text types on the ES side. Besides the classic similarity metric being completely deprecated in 6.3.0.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/o19s/relevant-search-book/issues/10#issuecomment-434469207, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmZRC5dih2aZyOixyGER-l78BYxmmE2ks5uqL-7gaJpZM4HHIjy .