After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 731042 - pygobject-3.12.2: pyflakes tests fail
pygobject-3.12.2: pyflakes tests fail
Status: RESOLVED WONTFIX
Product: pygobject
Classification: Bindings
Component: general
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-31 11:19 UTC by Pacho Ramos
Modified: 2014-08-06 02:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pacho Ramos 2014-05-31 11:19:03 UTC
With pyflakes-0.7.3:

make -j5 check 
Making check in .
make[1]: Entering directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3'
for f in gi/__init__.py gi/types.py gi/module.py gi/importer.py gi/pygtkcompat.py gi/docstring.py gi/_constants.py gi/_propertyhelper.py gi/_signalhelper.py gi/_option.py; do \
	[ -e ./$f ] || \
		ln -s /var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3/$f ./$f; \
done
make  check-local
make[2]: Entering directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3'
for f in gi/__init__.py gi/types.py gi/module.py gi/importer.py gi/pygtkcompat.py gi/docstring.py gi/_constants.py gi/_propertyhelper.py gi/_signalhelper.py gi/_option.py; do \
	[ -e ./$f ] || \
		ln -s /var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3/$f ./$f; \
done
  CHECK  Pyflakes examples gi tests pygtkcompat
examples/properties.py:18: invalid syntax
print "MyObject properties: ", list(MyObject.props)
                             ^
tests/runtests-windows.py:47: invalid syntax
        except Exception, e:
                         ^
gi/_option.py:40: undefined name 'basestring'
gi/_propertyhelper.py:46: undefined name 'basestring'
gi/_propertyhelper.py:47: undefined name 'long'
gi/overrides/GObject.py:259: undefined name 'unicode'
gi/overrides/Gtk.py:35: undefined name 'basestring'
tests/test_properties.py:35: undefined name 'unicode'
tests/test_properties.py:842: undefined name 'long'
tests/test_everything.py:30: undefined name 'unicode'
tests/compathelper.py:66: undefined name 'long'
tests/compathelper.py:67: undefined name 'basestring'
tests/compathelper.py:69: undefined name 'unicode'
tests/test_gi.py:29: undefined name 'unicode'
make[2]: *** [check-local] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/var/tmp/portage/dev-python/pygobject-3.12.2/work/pygobject-3.12.2-python3_3'
make: *** [check-recursive] Error 1
Comment 1 Simon Feltman 2014-07-26 01:46:30 UTC
I've fixed some of this with:
https://git.gnome.org/browse/pygobject/commit/?id=4941691

The remaining undefined names 'basestring', long', and 'unicode' are a problem because they are only used in the context of Python 2.7 where they are valid. Note that these errors only show up when running pyflakes under Python3.

"make check" should only be using the Python 2.7 version of pyflakes (named /usr/bin/pyflakes on my system), why is your system using the Python 3 version by default? In Fedora this is named "python3-pyflakes" which is done exactly to avoid these kinds of problems...
Comment 2 Simon Feltman 2014-08-06 02:22:05 UTC
I've fixed what I could. If the distro being used is installing a Python 3 version of pyflakes as /usr/bin/pyflakes then that is a broken distro...