Skip to content

Conversation

@mathemaphysics
Copy link

I avoided all issues with theano.compat.six versus six with these changes. I left a comment with all the details on what I did in the issue related to this. I'll attach it here when I find it. Just ran a couple of bash scripts.

@mathemaphysics
Copy link
Author

mathemaphysics commented Mar 25, 2019

This is in response to issue #1591. I gave details of the automated changes I made to all sources. I just updated importation of six automatically using a bash script included in the link.

I've quoted it below.

I ran two bash lines which took care of it. So far at least...

files="$(egrep -r 'theano\.compat\.six' ./*)"
found="$(for x in ${files}; do echo $(sed -nre 's/([-\_a-zA-Z0-9]+\.py)(.*)/\1/gp' <<<"${x}"); done | uniq)"
for xx in ${found}; do sed -i -re 's/theano\.compat\.six/six/g' ${xx}; done

and then finally

files="$(egrep -r 'from theano\.compat import six' ./*)"
found="$(for x in ${files}; do echo $(sed -nre 's/([-\_a-zA-Z0-9]+\.py)(.*)/\1/gp' <<<"${x}"); done | uniq)"
for xx in ${found}; do sed -i -re 's/from theano\.compat import six/import six/g' ${xx}; done

This appears to deal with all of the issues making trouble for six versus theano.compat.six.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant