New submission from Jake Merdich: There seem to have been a few issues in the past with creating the lib2to3 pickle files with the right permissions due to umask behavior (#15890). While I'm unaware of the status installer-level fixes have given, it seems prudent that the installed python should always function, given there is an obvious and trivial fallback (regenerating the grammar tables at runtime).
The current codebase will throw a PermissionDenied exception if the pickle file is unreadable, rather than fall back to generating the grammar tables. To reproduce: Install python2.6+, 3.0+ chmod o-r $PYTHON_INSTALL/lib/pythonX.Y/lib2to3/*.pickle pythonX.Y -c "import lib2to3.pygram" Notably, this sort of borked installation is quite hard to detect.... unless a user without root tries to run setuptools (*whistles*). ---------- components: 2to3 (2.x to 3.x conversion tool) files: 0001-Fallback-to-regenerating-2to3-grammars-on-read-fail.patch keywords: patch messages: 291853 nosy: Jake Merdich priority: normal severity: normal status: open title: Lib2to3 fails with unreadable pickle file type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file46811/0001-Fallback-to-regenerating-2to3-grammars-on-read-fail.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30099> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com