Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: I4364729223521864f7cda5a932503d7ce1b6fa36
- Loading branch information