Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506074 - dev-python/pypy and dev-lang/python disagree about use of overridden namedtuple __iter__
Summary: dev-python/pypy and dev-lang/python disagree about use of overridden namedtup...
Status: RESOLVED OBSOLETE
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 506870 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-28 13:38 UTC by Szpadel
Modified: 2017-10-15 09:46 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szpadel 2014-03-28 13:38:50 UTC
portage using pypy2_0 crashing when calculating dependencies for world update with trace:

Calculating dependencies                        ... done!             
Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1037, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 4061, in run_action
    emerge_config.args, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 320, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 8403, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 8435, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3093, in select_files
    return self._select_files(args)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3429, in _select_files
    return self._resolve(myfavorites)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3584, in _resolve
    self.altlist()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6229, in altlist
    self._resolve_conflicts()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6356, in _resolve_conflicts
    self._process_slot_conflicts()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 1212, in _process_slot_conflicts
    self._solve_non_slot_operator_slot_conflicts()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 1002, in _solve_non_slot_operator_slot_conflicts
    indirect_conflict_candidates.update(self._dynamic_config.digraph.child_nodes(pkg))
  File "/usr/lib64/portage/pym/portage/util/digraph.py", line 138, in child_nodes
    return list(self.nodes[node][0])
KeyError: 'slot conflict'

Reproducible: Always

Steps to Reproduce:
1. install portage with use pypy2_0
2. run emerge -NuDav world
3. crash
Actual Results:  
Portage crashing in pypy2_0 environment

Expected Results:  
portage is usable in pypy2_0 environment

when using python3 everything working fine
portage 2.2.8-r1 working fine with pypy
Comment 1 Szpadel 2014-03-28 13:39:46 UTC
emerge --info:
Portage 2.2.10 (default/linux/amd64/13.0/desktop/kde, gcc-4.8.2, glibc-2.18-r1, 3.13.7-gentoo x86_64)
=================================================================
System uname: Linux-3.13.7-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1100T_Processor-with-gentoo-2.2
KiB Mem:    32899476 total,   7081252 free
KiB Swap:   16777200 total,  16777200 free
Timestamp of tree: Fri, 28 Mar 2014 10:15:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45-r1
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6, 3.2.5-r3, 3.3.4
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2
dev-util/pkgconfig:       0.28
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.11.6, 1.14.1
sys-devel/binutils:       2.24-r2
sys-devel/gcc:            4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.13 (virtual/os-headers)
sys-libs/glibc:           2.18-r1
Repositories: gentoo multimedia ikelos gamerlay roslin zugaina sunrise vmware fordfrog soehest proaudio owncloud-client java hasufell steam-overlay qt x11 sublime-text anders-larsson javer mozilla ZiomekPL
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb/keycodes/evdev /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /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=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --jobs=10 --load-average=12.00 --backtrack=30000000000"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy ccache config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news nodoc parallel-fetch parallel-install prelink-checksums preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirror.pw.edu.pl/ http://gentoo.po.opole.pl http://gentoo.prz.rzeszow.pl http://distfiles.gentoo.org"
LANG="pl_PL.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12 -l 12.5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--progress -z --compress-level=9"
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/multimedia /var/lib/layman/ikelos /var/lib/layman/gamerlay /var/lib/layman/roslin /var/lib/layman/zugaina /var/lib/layman/sunrise /var/lib/layman/vmware /var/lib/layman/fordfrog /var/lib/layman/soehest /var/lib/layman/pro-audio /var/lib/layman/owncloud-client /var/lib/layman/java /var/lib/layman/hasufell /var/lib/layman/steam /var/lib/layman/qt /var/lib/layman/x11 /var/lib/layman/sublime-text /var/lib/layman/anders-larsson /var/lib/layman/javer /var/lib/layman/mozilla /usr/local/portage/myport"
USE="3dnow 3dnowext X a52 aac acl acpi alisp alsa amd64 apm arts bash-completion berkdb branding btrfs bzip2 c++0x cairo ccache cdda cdr cli colordiff consolekit cracklib cscope cups cxx d3d dbus declarative directfb djvu dmx dri drm drm-next dts dvd dvdr emboss encode exif fam firefox flac fortran g3dvl gallium gbm gcj gdbm gif git gold google google-gadgets gpm graphite hvm iconv icu id3tag inotify ipv6 jpeg kde kipi lame lcms ldap libkms libnotify llvm logrotate lzma lzo mad maps mmx mmxext mng modules mozilla mp3 mp4 mpd mpeg mplayer mtp multilib nano-syntax ncurses nfs nls nptl nsplugin nspluginwrapper ntfs offensive ogg opencl opengl openmp optimization optimized-qmake osmesa pam pango pcre pdf pgo phonon plasma png policykit ppds prediction private-headers pulseaudio pypy2_0 qemu qt qt-static qt3support qt4 readline reiserfs s3tc scanner sdl semantic-desktop session spell spice sse sse2 sse3 sse4_1 ssl ssse3 startup-notification steamruntime strong-optimization svg system-cairo system-jpeg system-sqlite tcpd threads tiff truetype udev udisks unicode upower usb vaapi vdpau vim-syntax virtualbox vorbis vpx windows-games wxwidgets x264 xa xcb xcomposite xinerama xml xorg xscreensaver xv xvid zip zlib" ABI_X86="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 vhost_alias access_compat" 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" 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 efi-32 multiboot pc" INPUT_DEVICES="gpm evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" NETBEANS_MODULES="php enterprise" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 pypy2_0" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby19 ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="fglrx" 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 2.7-pypy-2.0"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, SYNC
Comment 2 Sebastian Luther (few) 2014-04-06 11:20:01 UTC
*** Bug 506870 has been marked as a duplicate of this bug. ***
Comment 3 Sebastian Luther (few) 2014-04-06 16:58:42 UTC
Here's a test case that shows the problem:

import collections

T = collections.namedtuple("T", ["x", "y"])

class S(T):
	def __iter__(self):
		return iter(self.x)

s = S(x=(1, 2, 3), y="Y")
for x in set(s):
	print(x)

# $ python3.3 namedtuple-test.py
# 1
# 2
# 3
# $

# $ pypy namedtuple-test.py
# (1,2,3)
# "Y"
# $
Comment 4 Szpadel 2014-04-10 11:06:09 UTC
related trackback:


Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib64/portage/pym/_emerge/main.py", line 1037, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 4061, in run_action
    emerge_config.args, spinner)
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 320, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 8403, in backtrack_depgraph
    myaction, myfiles, spinner)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 8435, in _backtrack_depgraph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3093, in select_files
    return self._select_files(args)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3429, in _select_files
    return self._resolve(myfavorites)
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 3584, in _resolve
    self.altlist()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6229, in altlist
    self._resolve_conflicts()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 6356, in _resolve_conflicts
    self._process_slot_conflicts()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 1212, in _process_slot_conflicts
    self._solve_non_slot_operator_slot_conflicts()
  File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 1002, in _solve_non_slot_operator_slot_conflicts
    indirect_conflict_candidates.update(self._dynamic_config.digraph.child_nodes(pkg))
  File "/usr/lib64/portage/pym/portage/util/digraph.py", line 138, in child_nodes
    return list(self.nodes[node][0])
KeyError: u'virtual/pypy:0'
Comment 5 Szpadel 2014-04-10 11:08:05 UTC
Problem still present in pypy-2.2.1
Comment 6 Jana Saout 2014-06-22 10:37:32 UTC
FYI: I haven't had any issues since upgrading to pypy 2.3 (which is still masked)
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-10-15 09:46:43 UTC
PyPy is now officially supported by Portage, and I haven't heard anything more of this issue.