You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having discussed this with Nick a bit more over email, he suggested that
package execution could actually be properly supported by looking for a
__main__ module inside the package and executing it instead. This is
consistent with the way .zip archives are executed and would neatly
resolve this problem. I attached a simple patch implementing this.
Nick also said that fixing this might be considered a new feature and
might have to wait until 2.7. Given that this worked on Python 2.5,
albeit unintentionally, I'd argue that this is closer to a fix of a
somewhat buggy Python 2.5 feature than a new feature in 2.6.
Added revised version of patch with test cases and documentation
updates, as well as fixing a potential recursion issue with pathological
packages where __main__ was also a package)
Missed the window for 2.6/3.0. Guido agreed on python-dev that it counts
as a new feature, so it was definitely out for the already-released 2.6,
and also wasn't really an option for the release candidate phase of 3.0.
Assigning to myself for 2.7/3.1 - I'll put it in once the 3.0
maintenance branch has been cut (so I can update both 2.x and 3.x at the
same time.
For 2.6 and 3.0 though, short run scripts such as "python -m jcc.main"
are going to be the order of the day.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: