Plugin pyo files may be ignored and recreated from source
Bug #600803 reported by
Martin Packman
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Windows Installers |
Fix Released
|
Undecided
|
Martin Packman |
Bug Description
At least some of the pyo files under the plugin dir as shipped in the Bazaar windows installers get overwritten the first time the module is imported.
This means that on first import, or every import if the user running bzr.exe doesn't have write privs to the install dir, python is rejecting the existing pyo file, reading and compiling the accompanying py file, and writing (or trying to) write the bytecode back out to disk.
The problem became apparent with Bazaar 2.2b3 where docstring stripping has been added and then breaks the plugins, however testing reveals it also exists for at least the 2.1.1 installer as well.
Related branches
lp:~gz/bzr-windows-installers/use_utc_timestamps_600803
- John A Meinel: Approve
-
Diff: 20 lines (+10/-0)1 file modifiedtemplates/inno/bzr.iss (+10/-0)
lp:~garyvdm/bzr-windows-installers/maybe
- Bazaar Developers: Pending requested
-
Diff: 2916 lines (+108/-2599)20 files modifiedbazaar_releases.py (+89/-33)
build.py (+5/-5)
filesets/bootstrap/buildout.cfg (+2/-2)
issgen.py (+2/-0)
templates/inno/bzr.iss (+10/-0)
tools/win32/__init__.py (+0/-1)
tools/win32/bazaar.url (+0/-7)
tools/win32/bootstrap.py (+0/-77)
tools/win32/build_release.py (+0/-207)
tools/win32/buildout-templates/bin/build-installer.bat.in (+0/-160)
tools/win32/buildout.cfg (+0/-288)
tools/win32/bzr-win32-bdist-postinstall.py (+0/-145)
tools/win32/bzr.iss.cog (+0/-372)
tools/win32/bzr_postinstall.py (+0/-353)
tools/win32/file_version.py (+0/-38)
tools/win32/hacks/setup.py (+0/-714)
tools/win32/info.txt (+0/-6)
tools/win32/ostools.py (+0/-144)
tools/win32/run_script.py (+0/-16)
tools/win32/start_bzr.bat (+0/-31)
To post a comment you must log in.
John thought this might be Python version related, but both before and after pyo files seem to have '\xb3\xf2\r\n' as the magic. Rather, it seems to be timestamps. Bazaar 2.1.1 has plugin py files from 2010-03-26 00:44 but pyo files from 2010-03-26 00:50 and the check is != rather than > for recompilation.