Skip to content

Conversation

@eywalker
Copy link
Contributor

In base_relation.py delete method, we modify the content of the OrderedDict relations while traversing using its values() iterator, thus modifying the iterator!

for relation in relations.values():
count = len(relation)
if count:
do_delete = True
if config['safemode']:
print(relation.full_table_name, '(%d tuples)' % count)
else:
relations.pop(relation.full_table_name)

It turns out that modification of the OrderedDict iterator is OK in Python 3.4 (although still not recommended) but simply fails in Python 3.5. The code has been fixed such that we are no longer using direct iterator if the OrderedDict is to be modified in the loop.

I also added Python 3.5 to the test target platform for Travis CI, addressing #198

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.628% when pulling 7d1f66d on eywalker:master into 25dff09 on datajoint:master.

@fabiansinz fabiansinz merged commit a50936d into datajoint:master Mar 29, 2016
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.

3 participants