[Python-modules-team] Bug#890621: python3-keyrings.alt 2.2-2 module.__file__ is None, causing regrtest.py to fail

Dmitry Shachnev mitya57 at debian.org
Fri Feb 16 21:22:10 UTC 2018


Control: tags -1 unreproducible

Hi Ron,

On Fri, Feb 16, 2018 at 02:32:16PM -0600, Ron Lovell wrote:
> When package 'keyrings' from python3-keyrings.alt is imported under
> python3.6, the module object has a __file__ attribute with a value None.
> This causes early failure of the Python 3.6 regression tests  from
> libpython3.6-testsuite.
>
> [...]
>
> It would appear that initialized module objects from import of
> package 'keyrings' should not have a __file__ attribute at all,
> which is consistent with python3.7's initialization.

I get the correct behavior here:

  $ apt-cache policy python3-keyrings.alt | grep Installed
    Installed: 2.2-2
  $ python3.6
  Python 3.6.4 (default, Jan  5 2018, 02:13:53) 
  [GCC 7.2.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import keyrings
  >>> keyrings.__file__
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  AttributeError: module 'keyrings' has no attribute '__file__'

Can you reproduce this issue in a clean environment?

--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-modules-team/attachments/20180217/a538becc/attachment.sig>


More information about the Python-modules-team mailing list