I think I found a workaround for redis3 sessions. Here is a mod that works
for me:
diff --git a/gluon/contrib/redis_session.py b/gluon/contrib/redis_session.py
index 6413b52a..73c20422 100644
--- a/gluon/contrib/redis_session.py
+++ b/gluon/contrib/redis_session.py
@@ -13,7 +13,7 @@ from gluon import current
from gluon.storage import Storage
from gluon.contrib.redis_utils import acquire_lock, release_lock
from gluon.contrib.redis_utils import register_release_lock
-from gluon._compat import to_native
+from gluon._compat import to_native,to_bytes
from datetime import datetime
logger = logging.getLogger("web2py.session.redis")
@@ -208,7 +208,7 @@ class MockQuery(object):
if rtn:
if self.unique_key:
# make sure the id and unique_key are correct
- if rtn['unique_key'] == to_native(self.unique_key):
+ if rtn['unique_key'] == to_bytes(self.unique_key):
rtn['update_record'] = self.update # update
record support
else:
rtn = None
On Friday, November 13, 2020 at 4:25:13 AM UTC-6 Jose C wrote:
> I have it working with python3 but only as far as web2py 2.18.5.
> Thereafter I cannot get it to work either.
>
> Unfortunately it does begin to appear that web2py has reached end of life
> status.
>
> On Friday, 13 November 2020 at 03:13:18 UTC Joe Barnhart wrote:
>
>> I know this is really old news, but redis no longer works under python 3
>> and web2py. I'm just thinking it's time to take out all mention of redis
>> from the book and list of features of web2py. Yes, it technically works
>> with python 2, but since that platform is now dropped in the wake of the
>> good ship SS Python, it's time to either bite the bullet and fix the
>> feature or deleted it entirely from the website, book, and promotion of
>> web2py.
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/b9ca2ee3-dfc8-4caa-9aab-344746775c70n%40googlegroups.com.