Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 501506 - dev-lang/python-{2.7.5-r3, 3.3.2-r2} fails test_newline_decoder test_encoded_writes test_basic_io test_seek_and_tell test_seeking test_seeking_too
Summary: dev-lang/python-{2.7.5-r3, 3.3.2-r2} fails test_newline_decoder test_encoded_...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: IA64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
: 501512 501514 501516 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-16 17:56 UTC by Émeric Maschino
Modified: 2018-04-21 21:45 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,276.56 KB, text/x-log)
2014-02-16 17:59 UTC, Émeric Maschino
Details
environment (environment,135.02 KB, text/plain)
2014-02-16 17:59 UTC, Émeric Maschino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Émeric Maschino 2014-02-16 17:56:01 UTC
Emerging python 2.7 with tests enabled failed during test phase with:

test_newline_decoder (test.test_io.CIncrementalNewlineDecoderTest) ... FAIL

From build.log, relevant part seems to be:

======================================================================
FAIL: test_newline_decoder (test.test_io.CIncrementalNewlineDecoderTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.7.5-r3/work/Python-2.7.5/Lib/test/tes
t_io.py", line 2612, in test_newline_decoder
    self.check_newline_decoding(decoder, enc)
  File "/var/tmp/portage/dev-lang/python-2.7.5-r3/work/Python-2.7.5/Lib/test/tes
t_io.py", line 2598, in check_newline_decoding
    self.assertEqual(decoder.decode(input), "abc")
AssertionError: u'\ufeffabc' != u'abc'
- \ufeffabc
? -
+ abc
Comment 1 Émeric Maschino 2014-02-16 17:56:37 UTC
emerge --info

Portage 2.2.7 (default/linux/ia64/13.0/desktop/gnome/systemd, gcc-4.6.3, glibc-2.17, 3.10.25-gentoo ia64)
=================================================================
System uname: Linux-3.10.25-gentoo-ia64-Madison-with-gentoo-2.2
KiB Mem:    24987056 total,  23432080 free
KiB Swap:     524272 total,    524272 free
Timestamp of tree: Wed, 12 Feb 2014 21:30:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5-r3, 3.3.2-r2
dev-util/cmake:           2.8.11.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.13.4
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.6.3, 4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo my_ebuilds
ACCEPT_KEYWORDS="ia64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="ia64-unknown-linux-gnu"
CFLAGS="-mtune=itanium2 -O2 -pipe"
CHOST="ia64-unknown-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
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"
CXXFLAGS="-mtune=itanium2 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
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 unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://mirrors.linuxant.fr/distfiles.gentoo.org/"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/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/my_ebuilds"
USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvdr eds encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl session socialweb spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml xv xvid zlib" 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" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_3" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" 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"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON
Comment 2 Émeric Maschino 2014-02-16 17:58:26 UTC
emerge -pqv

[ebuild   R   ] dev-lang/python-2.7.5-r3  USE="gdbm ipv6 ncurses readline sqlite ssl threads (wide-unicode) xml -berkdb -build -doc -examples -hardened -tk -wininst"
Comment 3 Émeric Maschino 2014-02-16 17:59:12 UTC
Created attachment 370560 [details]
build.log
Comment 4 Émeric Maschino 2014-02-16 17:59:34 UTC
Created attachment 370562 [details]
environment
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-17 00:53:44 UTC
*** Bug 501512 has been marked as a duplicate of this bug. ***
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-17 00:53:52 UTC
*** Bug 501514 has been marked as a duplicate of this bug. ***
Comment 7 Jeroen Roovers (RETIRED) gentoo-dev 2014-02-17 00:54:00 UTC
*** Bug 501516 has been marked as a duplicate of this bug. ***
Comment 8 Mike Gilbert gentoo-dev 2014-02-17 16:41:56 UTC
Can anyone else reproduce this?

Do the same tests error/fail for python-2.7.6?
Comment 9 Émeric Maschino 2014-02-17 22:14:10 UTC
(In reply to Mike Gilbert from comment #8)
> Can anyone else reproduce this?
> 
> Do the same tests error/fail for python-2.7.6?

Don't know for python-2.7.6 as I'm running stable, but here's what I get with python-3.3.2-r2:
- same test_newline_decoder and test_encoding_writes failures
- same test_basic_io error
- different test_seek_and_tell error (still in test.test_io.CTextIOWrapperTest though; see below)
- new test_seeking and test_seeking_too errors (see below).

     Émeric


======================================================================
ERROR: test_seek_and_tell (test.test_io.CTextIOWrapperTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/tes
t_io.py", line 2305, in test_seek_and_tell
    test_seek_and_tell_with_data(input)
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/tes
t_io.py", line 2295, in test_seek_and_tell_with_data
    self.assertEqual(f.read(), decoded[i:])
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/tes
t_io.py", line 1822, in decode
    output += self.process_word()
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/tes
t_io.py", line 1830, in process_word
    self.o = min(99, int(self.buffer[1:] or 0)) # set output length
ValueError: invalid literal for int() with base 10: 'iabcd'

======================================================================
ERROR: test_seeking (test.test_io.CTextIOWrapperTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/tes
t_io.py", line 2258, in test_seeking
    self.assertEqual(f.tell(), prefix_size)
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/codecs.p
y", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid co
ntinuation byte

======================================================================
ERROR: test_seeking_too (test.test_io.CTextIOWrapperTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/test/tes
t_io.py", line 2270, in test_seeking_too
    f.tell()
  File "/var/tmp/portage/dev-lang/python-3.3.2-r2/work/Python-3.3.2/Lib/codecs.p
y", line 300, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-1: invalid co
ntinuation byte
Comment 10 Mike Gilbert gentoo-dev 2014-02-17 23:04:59 UTC
(In reply to Émeric Maschino from comment #9)
> Don't know for python-2.7.6 as I'm running stable

Add it to package.keywords; it would be more useful to address this in the latest ebuild.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-04-21 21:45:24 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.