Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265805 - dev-python/fonttools-2.2: SyntaxError exceptions (as)
Summary: dev-python/fonttools-2.2: SyntaxError exceptions (as)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Fonts Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: python-2.6
  Show dependency tree
 
Reported: 2009-04-11 20:20 UTC by Martin Mokrejš
Modified: 2009-11-14 03:38 UTC (History)
4 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 Martin Mokrejš 2009-04-11 20:20:39 UTC
Due to bug #259945 I did install myself a patched ebuild and the byte-compiling step raised some weird messages.

>>> Emerging (1 of 1) dev-python/pychecker-0.8.18 from unknown repo
 * pychecker-0.8.18.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                                                                                                                                                     [ ok ]
 * checking ebuild checksums ;-) ...                                                                                                                                                                                           [ ok ]
 * checking auxfile checksums ;-) ...                                                                                                                                                                                          [ ok ]
 * checking miscfile checksums ;-) ...                                                                                                                                                                                         [ ok ]
>>> Unpacking source...
>>> Unpacking pychecker-0.8.18.tar.gz to /var/tmp/portage/dev-python/pychecker-0.8.18/work
 * Applying pychecker-0.8.17-no-data-files.patch ...                                                                                                                                                                            [ ok ]
 * Applying pychecker-0.8.18-pychecker2.patch ...                                                                                                                                                                               [ ok ]
 * Applying pychecker-0.8.18-fix-package_path.patch ...                                                                                                                                                                         [ ok ]
>>> Source unpacked in /var/tmp/portage/dev-python/pychecker-0.8.18/work
>>> Compiling source in /var/tmp/portage/dev-python/pychecker-0.8.18/work/pychecker-0.8.18 ...
running build
running build_py
creating build
[cut]
>>> Source compiled.
>>> Test phase [not enabled]: dev-python/pychecker-0.8.18

>>> Install pychecker-0.8.18 into /var/tmp/portage/dev-python/pychecker-0.8.18/image/ category dev-python
running install
running build
running build_py
running build_scripts
creating empty script build/scripts-2.6/pychecker
running install_lib
creating /var/tmp/portage/dev-python/pychecker-0.8.18/image/usr/lib/python2.6/site-packages/pychecker2
[cut]
copying build/lib/pychecker/Config.py -> /var/tmp/portage/dev-python/pychecker-0.8.18/image/usr/lib/python2.6/site-packages/pychecker
copying build/lib/pychecker/msgs.py -> /var/tmp/portage/dev-python/pychecker-0.8.18/image/usr/lib/python2.6/site-packages/pychecker
writing byte-compilation script '/var/tmp/portage/dev-python/pychecker-0.8.18/temp/tmpxycnBv.py'
/usr/bin/python -O /var/tmp/portage/dev-python/pychecker-0.8.18/temp/tmpxycnBv.py
removing /var/tmp/portage/dev-python/pychecker-0.8.18/temp/tmpxycnBv.py
running install_scripts
filling in script build/scripts-2.6/pychecker
creating /var/tmp/portage/dev-python/pychecker-0.8.18/image/usr/bin
copying build/scripts-2.6/pychecker -> /var/tmp/portage/dev-python/pychecker-0.8.18/image/usr/bin
changing mode of /var/tmp/portage/dev-python/pychecker-0.8.18/image/usr/bin/pychecker to 755
running install_egg_info
Writing /var/tmp/portage/dev-python/pychecker-0.8.18/image/usr/lib/python2.6/site-packages/PyChecker-0.8.18-py2.6.egg-info
>>> Completed installing pychecker-0.8.18 into /var/tmp/portage/dev-python/pychecker-0.8.18/image/


>>> Installing dev-python/pychecker-0.8.18
 * Cleaning orphaned Python bytecode from /usr/lib/python2.6/site-packages/ ..
 * Byte compiling python modules for python-2.6 .. ...
//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py:177: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(       (data == None and (ttFont == None), "Need both data and ttFont arguments"))
//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py:265: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(       (data == None and (ttFont == None), "Need both data and ttFont arguments"))
//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py:635: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(       (data == None and (ttFont == None), "Need both data and ttFont arguments"))
//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py:839: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(       (data == None and (ttFont == None), "Need both data and ttFont arguments"))
//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py:927: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(       (data == None and (ttFont == None), "Need both data and ttFont arguments"))
//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py:1089: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(       (data == None and (ttFont == None), "Need both data and ttFont arguments"))
//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py:1280: SyntaxWarning: assertion is always true, perhaps remove parentheses?
  assert(       (data == None and (ttFont == None), "Need both data and ttFont arguments"))
Compiling //usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py ...
SyntaxError: ('invalid syntax', ('//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py', 397, 3, '\tas = p.getAssembly()\n'))

Compiling //usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py ...
SyntaxError: ('invalid syntax', ('//usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/ttProgram.py', 397, 3, '\tas = p.getAssembly()\n'))
                                                                                                                                                                                                                                [ ok ]
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

# emerge --info
Portage 2.1.6.11 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29.1 i686)
=================================================================
System uname: Linux-2.6.29.1-i686-Mobile_Intel-R-_Pentium-R-_4_-_M_CPU_1.80GHz-with-gentoo-2.0.0
Timestamp of tree: Fri, 10 Apr 2009 10:45:02 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
app-shells/bash:     4.0_p17
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2, 2.6.1-r1
dev-python/pycrypto: 2.0.1-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.9
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -mmmx -msse -msse2 -pipe -fno-strict-aliasing -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind /var/qmail/alias /var/qmail/control /var/spool/torque /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium4 -mmmx -msse -msse2 -pipe -fno-strict-aliasing -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer nostrip parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirror.web4u.cz"
LDFLAGS="-Wl,-O1"
LINGUAS="en cs cz"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/java-overlay /usr/local/portage/layman/science /usr/local/portage /usr/local/java-experimental /usr/local/portage/layman/java-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="7zip R X Xaw3d a52 aac aalib ace acl acpi alsa amr amrnb amrwb apache2 audacious audiofile bash-completion bcmath berkdb blas bluetooth boost branding bzip2 cairo cblas cddb cdparanoia cdr clamav cli colordiff compress cpio cracklib crypt cscope css ctype cups curl curlwrappers cxx dbus dga dia directfb djbfft dri dts dv dvb dvd dvdr dvdread eds emacs emboss emf enblend encode enscript exif expat fam fame fat fbcon ffmpeg fftw firefox flac flash foomaticdb fortran fpx ftp gcj gd gdbm ggi gif gimp gimpprint glibc-compat20 glibc-omitfp glut gmp gnuplot gnutls gpgme gphoto2 gpm graphviz gs gsl gsm gstreamer gtk gtkhtml hal hdf hdf5 hp2xx i8x0 icc iconv icu id3 ieee1394 ifc imagemagick imlib inifile innodb isdnlog ithreads jack java javascript jbig jce jikes jpeg jpeg2k kdtree kerberos lame lapack laptop lcms leim libcaca libedit libnotify libwww live lzo lzw mad maildir matroska mhash midi mikmod mime ming mjpeg mmap mmx mng mod_python modperl modplug motif mozilla moznoirc mp2 mp3 mp4 mpeg mpi mpi_njtree mpich2 mplayer mudflap mule musepack mxdatetime mysql mysqli ncurses netcdf netpbm network nls nntp nptl nptlonly nsplugin ntfs numeric ogg opengl openmp pam pango pcmcia pcntl pcre pdf perl plotutils plugin png pnm postproc postscript ppds pppd procmail pymol python qt3 qt3support qt4 quicktime rar raw readline recode reflection reiserfs rpm samba sasl scanner scp seamonkey server session sftp sift slp smime sndfile soap sockets spell spl sqlite srt sse sse2 ssl startup-notification subtitles subversion svg svgz sysfs sysvipc t1lib tcl tcpd tetex theora threads tidy tiff tk transcode truetype unicode urandom usb userlocales uuencode v4l v4l2 vcd vhook vim-syntax vim-with-x vorbis wifi win32codecs wmf wxwindows x264 x86 xanim xcf xfs xft xinerama xinetd xml xorg xpm xprint xsl xslt xulrunner xv xvid xvmc yv12 zip zlib" ALSA_CARDS="intel-8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config mem_cache mime mime_magic rewrite setenvif speling status unique_id userdir usertrack vhost_alias negotiation" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en cs cz" USERLAND="GNU" VIDEO_CARDS="radeon vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Martin Mokrejš 2009-04-11 20:26:01 UTC
# equery belongs /usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py
[ Searching for file(s) /usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py in *... ]
dev-python/fonttools-2.2 (/usr/lib/python2.6/site-packages/FontTools/fontTools/ttLib/tables/_c_m_a_p.py)
#
Comment 2 Rafał Mużyło 2009-04-11 20:51:14 UTC
This looks invalid,
'as' is now a keyword, so those lines are syntax errors.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-04-12 04:47:33 UTC
(In reply to comment #2)
> This looks invalid,
> 'as' is now a keyword, so those lines are syntax errors.

There are also some SyntaxWarnings above SyntaxErrors.

Compare:
$ python -c 'assert (1 == 2, "some string")'
<string>:1: SyntaxWarning: assertion is always true, perhaps remove parentheses?
$ python -c 'assert 1 == 2, "some string"'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AssertionError: some string
$ 

The former asserts that the '(1 == 2, "some string")' tuple is non-empty.

http://docs.python.org/reference/simple_stmts.html#the-assert-statement
Comment 4 Christian Faulhammer (RETIRED) gentoo-dev 2009-08-13 23:28:27 UTC
This seems to be a Python 2.6 incompatability.
Comment 5 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-14 15:15:25 UTC
(In reply to comment #4)
> This seems to be a Python 2.6 incompatability.

No. Syntax of assert statements was identical in older versions, but older versions weren't detecting incorrect usage of assert statements.
Comment 6 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-14 15:32:46 UTC
I hadn't noticed 2 SyntaxErrors due to useless summary...
Comment 7 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-14 15:35:17 UTC
Fixed.
Comment 8 Paul Wise (Debian) 2009-11-08 15:38:11 UTC
Fixed the two SyntaxWarnings upstream (the SyntaxErrors were long since fixed). It would have been nice if the SyntaxWarnings part of the patch had been forwarded upstream.
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2009-11-12 18:24:03 UTC
Paul, thanks for pushing all reported here bugs upstream. BTW, do you want to be CC'ed to fonttools bugs reported in our bugzilla? If yes, I'll add your e-mail to metadata.xml and you'll be automatically CC'ed.
Comment 10 Paul Wise (Debian) 2009-11-14 03:38:35 UTC
Nah, just send anything upstream relevant to the upstream sourceforge bug tracker please.