[Python-Dev] deprecating .pyo and -O

Antoine Pitrou solipsis at pitrou.net
Thu Jun 14 12:25:24 CEST 2012


On Wed, 13 Jun 2012 12:36:55 -0700
Ethan Furman <ethan at stoneleaf.us> wrote:
> 
> Currently, the alternative to supporting this behavior is to either:
> 
>    1) require the end-user to specify -O (major nuisance)
> 
>    or
> 
>    2) have the distributor rename the .pyo file to .pyc
> 
> I think 1 is a non-starter (non-finisher? ;) but I could live with 2 -- 
> after all, if someone is going to the effort of removing the .py file 
> and moving the .pyo file into its place, renaming the .pyo to .pyc is 
> trivial.
> 
> So the question, then, is: is option 2 better than just supporting .pyo 
> files without -O when they are all that is available?

Honestly, I think the best option would be to deprecate .pyo files as
well as the useless -O option. They only cause confusion without
providing any significant benefits.

(also, they ironically make Python installs bigger since both .pyc
and .pyo files have to be provided by system packages)

Regards

Antoine.




More information about the Python-Dev mailing list