Freeze collections.abc into base executables.

#48 Merged at 49c7bb4
Repository
takluyver
Branch
py34-collections-abc
Repository
anthony_tuininga
Branch
default
Author
  1. Thomas Kluyver
Reviewers
Description

Fixes issue 69

collections already gets frozen, and having a partially frozen package causes problems. collections.abc is a tiny wrapper file, so this is the simplest solution.

Comments (2)

  1. Jurko Gospodnetić

    Are you sure that a 'partially frozen package' is the reason for this? And not that CPython has one module set its __name__ to another module's name for some backward compatibility purposes? More precisely: _collections_abc.__name__ is set to collections.abc.

    See related comment at: http://bugs.python.org/issue20784#msg213136

    Disclaimer: I'm still not very familiar with the relevant code base, so I might be talking nonsense here 😄

    Best regards, Jurko Gospodnetić

    1. Thomas Kluyver author

      I'm not 100% sure, but I know a bit about Python's import system, and I think this is the problem. import collections.abc will find the frozen collections package, and not carry on to look in the zip file. I also confirmed that in the example you gave, the library.zip file does contain collections/abc.pyc.

      I don't think the __name__ of _collections_abc is actually relevant here, though I imagine it could cause other weird effects.