Re: PEP for the removal of PYO files
Ethan Furman <[email protected]> Fri, 27 Feb 2015 10:36:20 -0800
| Newsgroups | gmane.comp.python.import |
|---|---|
| Message-ID | <[email protected]> |
On 02/27/2015 10:28 AM, Barry Warsaw wrote: > from the PEP: >> The "opt-" prefix was chosen so as to provide a visual separator >> from the cache tag. The placement of the optimization level after >> the cache tag was chosen to preserve lexicographic sort order of >> bytecode file names based on module name and cache tag which will >> not vary for a single interpreter. The "opt-" prefix was chosen over >> "o" so as to be somewhat self-documenting. The "opt-" prefix was >> chosen over "O" so as to not have any confusion with "0" while being >> so close to the interpreter version number. > > I get it, and the examples you include in the open questions is helpful, but I > still don't like "opt-". We'll no doubt bikeshed on this until Guido > decides but looking at the examples below I'd be okay with 'O<level>'. Did > you consider 'opt<level>', e.g. imporlib.cpython-35.opt0.pyc ? I can live with either '.opt-N.' or just '.optN.' but all the others I thought were horrid. >> Compatibility Considerations >> ============================ > > Just as PEP 3147 had to make backward compatibility concessions to .pyc files > living outside __pycache__ (which I think is still supported, right?) I think > you'll have to do the same for traditional .pyo files, at least for Python > 3.5. You won't have to *write* such files, but if they exist and the > corresponding optimization level pyc file isn't present in __pycache__, you'll > have to load them. > > It might in fact make sense to add some language to this PEP saying that in > Python 3.6, support for old-style .pyc and .pyo files will be removed. +1 -- ~Ethan~ _______________________________________________ Import-SIG mailing list [email protected] https://mail.python.org/mailman/listinfo/import-sig
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBAgAGBQJU8LknAAoJENZ7D1rrH75NEC4QAJQZPuaWvNf0NAdaWhvksBcZ 6pt+v769h/lLCi4cOwCrQEx/XLdJg68r8LmUXrk04wrrsRbVgmrmP8A3iiN+3vAV qHdzFDz9tkESpfThAE5eitoZaZvfC1k4f4Y+q/Vx7G3glxOru4GmX0ydTyc6Vp5j rcSgONju60Qis3c/id2r+ZgaDi0xMgDN5uk+I0F7qWHE0rb6aZTUr6lo+QjaRJ0A QnXl4slU1QMxvUJCKANUTr6vft3IY/aHCxgFZ+M/v8NoW8Jf+GiZLS7/xYEFX2ke xTAZsHd9KRmLmWvlAVU2JhBDRczZXPw5Ls9MR3qiLWuRrAoUihTYv2PWLORiL5Hy 3GUZ+BsXmAQ2exhM4vrlfyUC/ueuxaRF1EiiFdssD5Y8Nflaj4wfRvImDZWrCh9h GZUW1SqlXrGaccy4kozXDbuYl8wZrxp9fJ1VfdTDMW8mjx+HTt3oGTLDhpAJSjNl n0YDsOpz1OxHqVZlGPgY9YlzfMRURWfT/6G735W72ftefHwCuTuhYFsZPgmJzDEg cbANfEnte+JmFm8PA45UNtJhphw7jLB5KhrgvL9fI2QE1AuPcBNiX2N3LhynIgmm wuu2GFg+pQuZ8fObU5/lUtIgZeQ7HactwFt5EtBd/RPAl1M6y1JWMMQ4VdZY/JMd Q8sJPX036/TYzDz6yugd =DfBn -----END PGP SIGNATURE-----