[issue3441] Regression in module as a script command-line option

2008-07-26 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

Now, if someone was to provide a 2.7 rfe with associated patch that
implements this feature properly, and includes an explanation for why it
doesn't subtly break imports the way 2.5 does, that would be a
completely different story.

But it isn't as simple as just getting rid of the explicit check that
prevents packages from being executed.

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3441
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3441] Regression in module as a script command-line option

2008-07-26 Thread Richard Jones

Richard Jones [EMAIL PROTECTED] added the comment:

I'm afraid it's all a bit opaque to an outsider like me. I've no idea 
what subtle breakage the feature was causing. I just saw it working 
quite nicely for me in 2.5 :)

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3441
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3441] Regression in module as a script command-line option

2008-07-26 Thread Nick Coghlan

Nick Coghlan [EMAIL PROTECTED] added the comment:

If I recall correctly (it's been a while), the breakages were tied in
with relative imports - probably something like explicit relative
imports not working at all, and implicit relative imports appearing to
work, but resulting in incorrect module names and sys.modules entries
(similar to running a file from inside a package directly).

Doing python -m package.__init__ instead of python -m package is
actually better behaved (although still a little odd - the
__init__ module code gets run once on the actual package import, and
then again as __main__).

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3441
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3441] Regression in module as a script command-line option

2008-07-25 Thread Georg Brandl

Changes by Georg Brandl [EMAIL PROTECTED]:


--
assignee:  - ncoghlan
nosy: +ncoghlan

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3441
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3441] Regression in module as a script command-line option

2008-07-24 Thread Richard Jones

New submission from Richard Jones [EMAIL PROTECTED]:

The Python 2.5 -m command-line option allowed execution of a package
directly, by invoking the __init__.py module.

Python 2.6 no longer allows this.

This is a quite unfortunate regression, and I would urge the decision to
hobble it to be reconsidered.

--
messages: 70240
nosy: richard
severity: normal
status: open
title: Regression in module as a script command-line option
versions: Python 2.6

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3441
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3441] Regression in module as a script command-line option

2008-07-24 Thread Richard Jones

Changes by Richard Jones [EMAIL PROTECTED]:


--
type:  - behavior

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3441
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com