Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 510356 - =dev-lang/python-3.4 fails test test_startup_imports - Python-3.4.0/Lib/test/test_site.py", line 466, in test_startup_imports: AssertionError: {'types'} is not false : import _frozen_importlib # frozen
Summary: =dev-lang/python-3.4 fails test test_startup_imports - Python-3.4.0/Lib/test/...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 22:51 UTC by eroen
Modified: 2018-04-21 21:45 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (dev-lang:python-3.4.0:20140514-201932.log,238.44 KB, text/plain)
2014-05-14 22:51 UTC, eroen
Details
import.txt (import.txt,7.71 KB, text/plain)
2014-11-11 17:33 UTC, Paolo Pedroni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2014-05-14 22:51:06 UTC
test_startup_imports (test.test_site.StartupImportTests) ... FAIL

======================================================================
FAIL: test_startup_imports (test.test_site.StartupImportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.4.0/work/Python-3.4.0/Lib/test/test_site.py", line 466, in test_startup_imports
    self.assertFalse(modules.intersection(collection_mods), stderr)
AssertionError: {'types'} is not false : import _frozen_importlib # frozen
import imp # builtin
{{{ ... }}}

# destroy _frozen_importlib


----------------------------------------------------------------------
Ran 21 tests in 0.194s

FAILED (failures=1, skipped=2)

test test_site failed

Makefile:968: recipe for target 'test' failed
make: *** [test] Error 1
 * ERROR: dev-lang/python-3.4.0::gentoo failed (test phase):
 *   emake failed
Comment 1 eroen 2014-05-14 22:51:52 UTC
Created attachment 376938 [details]
build.log
Comment 2 eroen 2014-05-14 22:54:04 UTC
eroen@falcon ~ $ emerge --info '=dev-lang/python-3.4.0::gentoo'
Portage 2.2.10 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.19, 3.12.5e0-falcon0+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.12.5e0-falcon0+-x86_64-Intel-R-_Core-TM-2_Quad_CPU_@_2.40GHz-with-gentoo-2.2
KiB Mem:     4037884 total,    560556 free
KiB Swap:    8388604 total,   7861012 free
Timestamp of tree: Tue, 13 May 2014 16:45:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6-r1, 3.2.5-r3, 3.3.5, 3.4.0
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.5.4, 4.6.4, 4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.14 (virtual/os-headers)
sys-libs/glibc:           2.19
Repositories: gentoo gamerlay eroen
ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/var/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 3 --nospinner --quiet-build --verbose-conflicts --with-bdeps=y --binpkg-respect-use y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS=""
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gamerlay /var/lib/layman/eroen"
SYNC="rsync://rsync.no.gentoo.org/gentoo-portage/"
USE="X a52 aac aacs accessibility acl adns alsa amd64 ao berkdb bluray bs2b bzip2 cairo calendar canberra caps cdda cdio cdparanoia cdr cli corefonts cracklib crypt css cue cups curl cxx dbus dia dirac djvu dmapi dri dts dvd dvdnav dvi ebook eigen exif faac fam fbcondecor ffmpeg fftw fits flac fontconfig fortran fuse g3dvl gcrypt gd gdbm gif gimp git gmp gnutls gold gstreamer hdri highlight iconv icu id3tag idn imagemagick inotify iptc ipv6 jpeg jpeg2k kde kvm lcms lensfun libnotify loop-aes lqr lzma lzo mad man matroska midi mikmod mkv mms mmx mmxext mng mod modplug modules mp3 mp4 mpeg mpeg2 mpeg4 mpeg4pt2 mplayer mtp multilib musepack ncurses netlink nfs nls nouveau nptl ocr offensive ogg openal opencl openexr opengl opengtl openmp openvg optimization osmesa pam pango pcre pdf png pnm portaudio postscript qalculate qemu qt3support qt4 rar raw rdesktop readline real rtmp samba scanner schroedinger security session smp sndfile socks5 speex spice sse sse2 sse3 ssl ssse3 strong-optimization svg tbb tcpd theora threads tiff timidity tls truetype udev uml unicode usb usbredir v4l v4l2 vdpau virtualbox vnc vorbis wacom wavpack webp wmf x264 xattr xcb xcomposite xetex xfs xft xine xinerama xorg xps xrandr xv xvid xvmc zlib" ABI_X86="32
64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="openssl" DRACUT_MODULES="biosdevname caps crypt crypt-gpg dash dmraid lvm mdraid syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc qemu" INPUT_DEVICES="evdev keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer" LINGUAS="en en_US en_GB nb no nb_NO" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3 python3_4" QEMU_SOFTMMU_TARGETS="m68k ppc x86_64" RUBY_TARGETS="ruby20" SANE_BACKENDS="net plustek pnm" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia vesa" XFCE_PLUGINS="menu" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7 3.2 3.3 3.4"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-lang/python-3.4.0 was built with the following:
USE="gdbm ipv6 ncurses readline sqlite ssl test threads tk xml -build -examples -hardened -wininst" ABI_X86="64"
CFLAGS="-march=core2 -O2 -pipe -fwrapv"
CXXFLAGS="-march=core2 -O2 -pipe -fwrapv"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -L."

eroen@falcon ~ $ emerge -pqv '=dev-lang/python-3.4.0::gentoo'
[ebuild   R   ] dev-lang/python-3.4.0  USE="gdbm ipv6 ncurses readline sqlite ssl threads tk xml -build -examples -hardened -wininst"
Comment 3 Mike Gilbert gentoo-dev 2014-05-16 01:24:36 UTC
I cannot reproduce this.
Comment 4 Patrick Lauer gentoo-dev 2014-07-04 03:00:04 UTC
[333/387/1] test_site
test test_site failed -- Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.4.1/work/Python-3.4.1/Lib/test/test_site.py", line 469, in test_startup_imports
    self.assertFalse(modules.intersection(collection_mods), stderr)
AssertionError: {'types'} is not false : import _frozen_importlib # frozen


Same here with 3.4.1
Comment 5 Paolo Pedroni 2014-11-06 15:36:33 UTC
This is weird... Two of my boxes (which originally compiled, tested and emerged python-3.4.1 just fine), now fail tests with this error, while the third still works fine. Those same boxes also can't emerge dev-python/setuptools-7.0 because of test failures, while the third one emerged it just fine.

Any idea how I could troubleshoot this further?
Comment 6 Paolo Pedroni 2014-11-06 16:40:23 UTC
The same thing happens with python-3.4.2
Comment 7 Mike Gilbert gentoo-dev 2014-11-07 16:48:40 UTC
Can you show the output from this command?

python3.4 -c "import sys; print(sys.modules)"
Comment 8 Paolo Pedroni 2014-11-10 10:09:50 UTC
(In reply to Mike Gilbert from comment #7)
> Can you show the output from this command?
> 
> python3.4 -c "import sys; print(sys.modules)"

Not working system:
$ python3.4 -c "import sys; print(sys.modules)"
{'os': <module 'os' from '/usr/lib64/python3.4/os.py'>, 'os.path': <module 'posixpath' from '/usr/lib64/python3.4/posixpath.py'>, 'builtins': <module 'builtins' (built-in)>, '_collections_abc': <module '_collections_abc' from '/usr/lib64/python3.4/_collections_abc.py'>, '_frozen_importlib': <module '_frozen_importlib' (frozen)>, 'signal': <module 'signal' (built-in)>, 'sys': <module 'sys' (built-in)>, '_warnings': <module '_warnings' (built-in)>, '_codecs': <module '_codecs' (built-in)>, 'abc': <module 'abc' from '/usr/lib64/python3.4/abc.py'>, '_bootlocale': <module '_bootlocale' from '/usr/lib64/python3.4/_bootlocale.py'>, 'encodings.latin_1': <module 'encodings.latin_1' from '/usr/lib64/python3.4/encodings/latin_1.py'>, '_weakrefset': <module '_weakrefset' from '/usr/lib64/python3.4/_weakrefset.py'>, 'encodings': <module 'encodings' from '/usr/lib64/python3.4/encodings/__init__.py'>, 'stat': <module 'stat' from '/usr/lib64/python3.4/stat.py'>, 'site': <module 'site' from '/usr/lib64/python3.4/site.py'>, 'encodings.utf_8': <module 'encodings.utf_8' from '/usr/lib64/python3.4/encodings/utf_8.py'>, '_imp': <module '_imp' (built-in)>, 'genericpath': <module 'genericpath' from '/usr/lib64/python3.4/genericpath.py'>, '_sysconfigdata': <module '_sysconfigdata' from '/usr/lib64/python3.4/_sysconfigdata.py'>, 'io': <module 'io' from '/usr/lib64/python3.4/io.py'>, 'errno': <module 'errno' (built-in)>, 'encodings.aliases': <module 'encodings.aliases' from '/usr/lib64/python3.4/encodings/aliases.py'>, 'codecs': <module 'codecs' from '/usr/lib64/python3.4/codecs.py'>, 'zope': <module 'zope'>, 'sysconfig': <module 'sysconfig' from '/usr/lib64/python3.4/sysconfig.py'>, '_stat': <module '_stat' (built-in)>, 'marshal': <module 'marshal' (built-in)>, 'zipimport': <module 'zipimport' (built-in)>, 'posix': <module 'posix' (built-in)>, '_locale': <module '_locale' (built-in)>, '__main__': <module '__main__' (built-in)>, '_io': <module 'io' (built-in)>, '_weakref': <module '_weakref' (built-in)>, 'posixpath': <module 'posixpath' from '/usr/lib64/python3.4/posixpath.py'>, 'types': <module 'types' from '/usr/lib64/python3.4/types.py'>, '_thread': <module '_thread' (built-in)>, '_sitebuiltins': <module '_sitebuiltins' from '/usr/lib64/python3.4/_sitebuiltins.py'>}

Working system:
$ python3.4 -c "import sys; print(sys.modules)"
{'builtins': <module 'builtins' (built-in)>, 'sys': <module 'sys' (built-in)>, 'sysconfig': <module 'sysconfig' from '/usr/lib64/python3.4/sysconfig.py'>, 'io': <module 'io' from '/usr/lib64/python3.4/io.py'>, 'posixpath': <module 'posixpath' from '/usr/lib64/python3.4/posixpath.py'>, '_warnings': <module '_warnings' (built-in)>, '_sitebuiltins': <module '_sitebuiltins' from '/usr/lib64/python3.4/_sitebuiltins.py'>, 'os': <module 'os' from '/usr/lib64/python3.4/os.py'>, 'stat': <module 'stat' from '/usr/lib64/python3.4/stat.py'>, 'posix': <module 'posix' (built-in)>, '_collections_abc': <module '_collections_abc' from '/usr/lib64/python3.4/_collections_abc.py'>, 'os.path': <module 'posixpath' from '/usr/lib64/python3.4/posixpath.py'>, '_stat': <module '_stat' (built-in)>, '_sysconfigdata': <module '_sysconfigdata' from '/usr/lib64/python3.4/_sysconfigdata.py'>, '_codecs': <module '_codecs' (built-in)>, 'abc': <module 'abc' from '/usr/lib64/python3.4/abc.py'>, 'encodings.utf_8': <module 'encodings.utf_8' from '/usr/lib64/python3.4/encodings/utf_8.py'>, '_imp': <module '_imp' (built-in)>, 'encodings': <module 'encodings' from '/usr/lib64/python3.4/encodings/__init__.py'>, '_frozen_importlib': <module '_frozen_importlib' (frozen)>, '_weakrefset': <module '_weakrefset' from '/usr/lib64/python3.4/_weakrefset.py'>, 'site': <module 'site' from '/usr/lib64/python3.4/site.py'>, 'genericpath': <module 'genericpath' from '/usr/lib64/python3.4/genericpath.py'>, 'errno': <module 'errno' (built-in)>, '_thread': <module '_thread' (built-in)>, 'encodings.aliases': <module 'encodings.aliases' from '/usr/lib64/python3.4/encodings/aliases.py'>, '__main__': <module '__main__' (built-in)>, 'zipimport': <module 'zipimport' (built-in)>, '_io': <module 'io' (built-in)>, 'codecs': <module 'codecs' from '/usr/lib64/python3.4/codecs.py'>, 'encodings.latin_1': <module 'encodings.latin_1' from '/usr/lib64/python3.4/encodings/latin_1.py'>, 'marshal': <module 'marshal' (built-in)>, '_weakref': <module '_weakref' (built-in)>, 'signal': <module 'signal' (built-in)>}
Comment 9 Mike Gilbert gentoo-dev 2014-11-10 22:27:00 UTC
(In reply to Paolo Pedroni from comment #8)

Ok, one more on your non-working system:

python3.4 -I -v -c "import sys; print(sys.modules)" 2>import.txt

And then attach import.txt.
Comment 10 Paolo Pedroni 2014-11-11 17:33:54 UTC
Created attachment 389094 [details]
import.txt

Output of 'python3.4 -I -v -c "import sys; print(sys.modules)" 2>import.txt' for non-working system.
Comment 11 Arfrever Frehtes Taifersar Arahesis 2014-11-11 21:19:05 UTC
Run:
mv /usr/lib64/python3.4/types.py{,-}
echo : > /usr/lib64/python3.4/types.py

Next show output of:
python3.4 -c ""

Restore previous types module:
mv /usr/lib64/python3.4/types.py{-,}
Comment 12 Paolo Pedroni 2014-11-12 09:11:09 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #11)
> Run:
> mv /usr/lib64/python3.4/types.py{,-}
> echo : > /usr/lib64/python3.4/types.py
> 
> Next show output of:
> python3.4 -c ""
> 
> Restore previous types module:
> mv /usr/lib64/python3.4/types.py{-,}

# python3.4 -c ""
Error processing line 1 of /usr/lib64/python3.4/site-packages/zope.interface-4.1.1-py3.4-nspkg.pth:

  Traceback (most recent call last):
    File "/usr/lib64/python3.4/site.py", line 167, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "/usr/lib64/python3.4/types.py", line 1
      :
      ^
  SyntaxError: invalid syntax

Remainder of file ignored
Comment 13 Mike Gilbert gentoo-dev 2014-11-12 20:31:21 UTC
Ah, seems to be triggered by the presence of net-zope/zope-interface. After installing this:

% python3.4 -m test.test_site
............s.......F
======================================================================
FAIL: test_startup_imports (__main__.StartupImportTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.4/test/test_site.py", line 469, in test_startup_imports
    self.assertFalse(modules.intersection(collection_mods), stderr)
AssertionError: {'types'} is not false : import _frozen_importlib # frozen
Comment 14 Paolo Pedroni 2014-11-25 11:39:27 UTC
(In reply to Mike Gilbert from comment #13)
> Ah, seems to be triggered by the presence of net-zope/zope-interface. After
> installing this:
> 
> % python3.4 -m test.test_site
> ............s.......F
> ======================================================================
> FAIL: test_startup_imports (__main__.StartupImportTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib64/python3.4/test/test_site.py", line 469, in
> test_startup_imports
>     self.assertFalse(modules.intersection(collection_mods), stderr)
> AssertionError: {'types'} is not false : import _frozen_importlib # frozen

What can then be done? Is it possible to fix zope-interface? I can't uninstall it as it's a dependency of several packages I need.
Comment 15 Mike Gilbert gentoo-dev 2014-11-25 17:19:45 UTC
(In reply to Paolo Pedroni from comment #14)
> What can then be done? Is it possible to fix zope-interface? I can't
> uninstall it as it's a dependency of several packages I need.

The test failure is harmless.

Arfrever is working on a fix for this in Python 3.4 upstream.

In the meantime, you should disable FEATURES=test or enable FEATURES=test-fail-continue.
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-21 21:45:30 UTC
Mass closing of bugs reported against old versions of dev-lang/python.  If the problem still occurs with the current versions (i.e. newest in each visible slot), feel free to reopen.