'as' will be reserved keyword in python 2.6 in objectfactory.py a potential compatibility warning reported by apt-get in ubuntu 8.10
@elias
Submitted by elias Assigned to elias @elias
Description
I do not know python but this warning seems important to keep pitivi portable among different python versions.
Here all the session, followed by a suggested fix:
$ sudo apt-get install pitivi
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gnome-pkg-tools cdbs fdupes
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
gstreamer0.10-gnonlin
The following NEW packages will be installed:
gstreamer0.10-gnonlin pitivi
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 240kB of archives.
After this operation, 1397kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com intrepid/universe gstreamer0.10-gnonlin 0.10.9-1 [64.2kB]
Get:2 http://archive.ubuntu.com intrepid/universe pitivi 0.11.1-0ubuntu1 [176kB]
Fetched 240kB in 6s (39.3kB/s)
Selecting previously deselected package gstreamer0.10-gnonlin.
(Reading database ... 218007 files and directories currently installed.)
Unpacking gstreamer0.10-gnonlin (from .../gstreamer0.10-gnonlin_0.10.9-1_i386.deb) ...
Selecting previously deselected package pitivi.
Unpacking pitivi (from .../pitivi_0.11.1-0ubuntu1_all.deb) ...
Setting up gstreamer0.10-gnonlin (0.10.9-1) ...
Setting up pitivi (0.11.1-0ubuntu1) ...
/usr/lib/pitivi/python/pitivi/objectfactory.py:399: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/pitivi/python/pitivi/objectfactory.py:400: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/pitivi/python/pitivi/objectfactory.py:401: Warning: 'as' will become a reserved keyword in Python 2.6
/usr/lib/pitivi/python/pitivi/objectfactory.py:402: Warning: 'as' will become a reserved keyword in Python 2.6
This modification replacing 'as' by 'audiostream' may fix the problem:
But I do not know nothing about name scope in python or even its syntax.
This is just what I think could work. But I did not find where 'as' was declared. Nor if 'audiostream' is a fresh name in the scope of this procedure or how to declare it before its use.
def getExportSettings(self):
""" Returns the ExportSettings corresponding to this source """
if self.settings:
return self.settings
self.settings = ExportSettings()
if self.video_info_stream:
# Fill video properties
vs = self.video_info_stream
self.settings.videowidth = vs.width
self.settings.videoheight = vs.height
self.settings.videorate = vs.framerate
self.settings.videopar = vs.par
if self.audio_info_stream:
# Fill audio properties
audiostream = self.audio_info_stream
self.settings.audiochannels = audiostream.channels
self.settings.audiorate = audiostream.rate
self.settings.audiodepth = audiostream.depth
return self.settings
Imported from https://bugzilla.gnome.org/show_bug.cgi?id=617954