You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, there appears to be a version synchronization issue with TurboGears 2.2.2, the most current version as of writing this, and tw2.core 2.1.5, also the current version of tw2.core.
TurboGears 2.2.2 requires WebOb version 1.1.1 which uses the UnicodeMultiDict to store request params. It appears that WebOb >= 1.2 has since replaced the UnicodeMultiDict with the MultiDict object and tw2 has correctly accommodated for this change but tg2 hasn't.
Because current version of tg2 and tw2 are dependent on different versions of webob, this causes a nasty bug where multiselect widgets in tg2 are only able to save one value.
I think the simplest fix would be to modify the "Hack" for webob versions at the top of tw2.core.validation from (line 13) from:
if not hasattr(webob, 'MultiDict'):
webob.MultiDict = webob.multidict.MultiDict
to:
if not hasattr(webob, 'MultiDict'):
Check for webob versions with UnicodeMultiDict
if hasattr(webob.multidict,'UnicodeMultiDict'):
webob.MultiDict = webob.multidict.UnicodeMultiDict
else:
webob.MultiDict = webob.multidict.MultiDict
I tested this and it works. It would be awesome if we can keep tg2 and tw2 compatible!
Thanks
Gregg
The text was updated successfully, but these errors were encountered:
Hello, there appears to be a version synchronization issue with TurboGears 2.2.2, the most current version as of writing this, and tw2.core 2.1.5, also the current version of tw2.core.
TurboGears 2.2.2 requires WebOb version 1.1.1 which uses the UnicodeMultiDict to store request params. It appears that WebOb >= 1.2 has since replaced the UnicodeMultiDict with the MultiDict object and tw2 has correctly accommodated for this change but tg2 hasn't.
Because current version of tg2 and tw2 are dependent on different versions of webob, this causes a nasty bug where multiselect widgets in tg2 are only able to save one value.
I think the simplest fix would be to modify the "Hack" for webob versions at the top of tw2.core.validation from (line 13) from:
if not hasattr(webob, 'MultiDict'):
webob.MultiDict = webob.multidict.MultiDict
to:
if not hasattr(webob, 'MultiDict'):
Check for webob versions with UnicodeMultiDict
I tested this and it works. It would be awesome if we can keep tg2 and tw2 compatible!
Thanks
Gregg
The text was updated successfully, but these errors were encountered: