collective / alm.solrindex

A ZCatalog index that relays queries to solr.
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Fix Python2 to 3 encoding issues #10

Closed chiruzzimarco closed 1 year ago

chiruzzimarco commented 1 year ago

In a Python3 environment unicode related exceptions are raised:

TypeError: Cannot mix str and non-str arguments

TypeError: argument can't be <type 'unicode'>

This PR fixes them.

chiruzzimarco commented 1 year ago

@alecpm I tried with safe_nativestring without success, safe_unicode looks like the best choice to me.

alecpm commented 1 year ago

I made a small change so we don't depend on Plone, but this seems to be working well.