Matthew Brett added the comment:
To clarify from comments on issue 19332:
"""
* The normal rule (not just for Python) is that a data structures have
undefined behavior for mutating while iterating, unless there is a specific
guarantee
"""
The change in
New submission from Matthew Brett:
The behavior of dict iteration has changed in Python 3.6, in that inserting
keys during iteration has a different and unpredictable affect. For this code:
d = {'foo': 1}
for key in d:
print(key)
d.pop(key)
d[key] = 1
Python 3.5 prints a single 'foo
Matthew Brett added the comment:
I think the argument previously was that VS 2010 was not the default compiler
for Python 2.7, and so this problem was not important, but I'm happy to be
corrected.
I haven't tried building extensions for Python 2.7 with VS 2010 but I guess the
problem
Matthew Brett added the comment:
Steve - did you try my 'setup.py' example; it's standalone, as in `python
setup.py build` will reproduce the error.
This is specifically VS 2010.
It doesn't make any difference for me if I specify an extension or not, so I
don't think that is the problem
Matthew Brett added the comment:
I think this is a frank bug for Pythons that use MSVC 10+ by default (3.3, 3.4
for example).
The lack of the /MANIFEST flag breaks the
distutils.ccompiler.CCompiler.link_executable command - see attached setup.py
example. The example gives the error
Matthew Brett matthew.br...@gmail.com added the comment:
Hi,
Antoine Pitrou pit...@free.fr added the comment:
After a bit of debugging, it seems your data is not actually a complete zlib
stream (*). What did you generate it with?
(*) in technical terms, the zlib never returns
Matthew Brett matthew.br...@gmail.com added the comment:
Thanks for the debugging. The stream comes from within a matlab 'mat'
file. I maintain the scipy matlab file readers; the variables within
these files are zlib compressed streams.
So this would be a Matlab issue, right?
Yes, except
New submission from Matthew Brett matthew.br...@gmail.com:
I have a valid zlib compressed string, attached here as 'mat.bin' (1.7M), that
cause and error on zlib.decompress decompression:
import zlib
data = open('mat.bin', 'rb').read()
out = zlib.decompress(data)
Traceback (most recent call