Package: python3.2
Version: 3.2.3-7
Severity: important

Dear Maintainer,

It appears that the importlib implementation that ships with Python3.2
breaks on directories in which it cannot create a __pycache__ directory.
This is unlike the standard import implementation which simply loads
the files without caching their compiled versions.

Steps to demonstrate:
$ mkdir test
$ touch test/foo.py
$ touch test/__init__.py
$ chmod 555 test
$ PYTHONPATH=$PWD python3
import importlib
importlib.import_module("test.foo")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.2/importlib/__init__.py", line 124, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.2/importlib/_bootstrap.py", line 807, in _gcd_import
    _gcd_import(parent)
  File "/usr/lib/python3.2/importlib/_bootstrap.py", line 821, in _gcd_import
    loader.load_module(name)
  File "/usr/lib/python3.2/importlib/_bootstrap.py", line 436, in load_module
    return self._load_module(fullname)
  File "/usr/lib/python3.2/importlib/_bootstrap.py", line 141, in decorated
    return fxn(self, module, *args, **kwargs)
  File "/usr/lib/python3.2/importlib/_bootstrap.py", line 330, in _load_module
    code_object = self.get_code(name)
  File "/usr/lib/python3.2/importlib/_bootstrap.py", line 423, in get_code
    self.set_data(bytecode_path, data)
  File "/usr/lib/python3.2/importlib/_bootstrap.py", line 481, in set_data
    _os.mkdir(parent)
OSError: [Errno 13] Permission denied: 'test/__pycache__'

As an aside, it also seems that importing importlib makes it install
itself over the standard import implementation, therefore making all
standard imports fail thereafter, as well.

--
Fredrik Tolf

-- System Information:
Debian Release: 7.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14.0 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python3.2 depends on:
ii  libbz2-1.0         1.0.6-4
ii  libc6              2.13-38+deb7u1
ii  libdb5.1           5.1.29-5+dolda1
ii  libffi5            3.0.10-3
ii  libgcc1            1:4.7.2-5
ii  libncursesw5       5.9-10
ii  libreadline6       6.2+dfsg-0.1
ii  libsqlite3-0       3.7.13-1+deb7u1
ii  libssl1.0.0        1.0.1e-2+deb7u6
ii  libtinfo5          5.9-10
ii  mime-support       3.52-1
ii  python3.2-minimal  3.2.3-7

python3.2 recommends no packages.

Versions of packages python3.2 suggests:
ii  binutils       2.22-8
pn  python3.2-doc  <none>

-- no debconf information


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to