In newly released ply 3.6 function yacc() of the yacc module no longer
accepts 'None' as the 'tabmodule' keyword parameter and expects a valid
string instead.
Meanwhile, the tabmodule file is not created unless write_tables is set
to True.
This patchset provides such a string and ensures that it is unique.
Omitting the 'tabmodule' parameter at all could possibly do the trick as
well, however that would mean that the parameter would get its default
value - 'parsetab' - which could potentially lead to a minor security
vulnerability if the the system somehow had got a malicious 'parsetab'
module (as yacc attempts to load the generated tables from module
specified by 'tabmodule' before proceeding to grammar generation).
Assigning a random value to this parameter prevents such a situation.
This patch also fixes the ply requirement to <=3.6 to prevent future
gate breakages due to unexpected changes in ply.
Reviewed: https:/ /review. openstack. org/177950 /git.openstack. org/cgit/ stackforge/ yaql/commit/ ?id=f59e459d04c c83ca99d76eebf2 a4a3fef20995c3
Committed: https:/
Submitter: Jenkins
Branch: master
commit f59e459d04cc83c a99d76eebf2a4a3 fef20995c3
Author: Alexander Tivelkov <email address hidden>
Date: Mon Apr 27 22:48:13 2015 +0300
Fixed compatibility with ply 3.6
In newly released ply 3.6 function yacc() of the yacc module no longer
accepts 'None' as the 'tabmodule' keyword parameter and expects a valid
string instead.
Meanwhile, the tabmodule file is not created unless write_tables is set
to True.
This patchset provides such a string and ensures that it is unique.
Omitting the 'tabmodule' parameter at all could possibly do the trick as
well, however that would mean that the parameter would get its default
value - 'parsetab' - which could potentially lead to a minor security
vulnerability if the the system somehow had got a malicious 'parsetab'
module (as yacc attempts to load the generated tables from module
specified by 'tabmodule' before proceeding to grammar generation).
Assigning a random value to this parameter prevents such a situation.
This patch also fixes the ply requirement to <=3.6 to prevent future
gate breakages due to unexpected changes in ply.
Closes-Bug: #1448990
Change-Id: I43647292235218 64f7cda5a932503 d7ce1b6fa36