[issue40108] Improve error message for -m option when .py is present

2020-09-14 Thread Brett Cannon


Change by Brett Cannon :


--
components: +Library (Lib) -XML

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40108] Improve error message for -m option when .py is present

2020-09-11 Thread Jay Cee Garcia


Change by Jay Cee Garcia :


--
components: +XML
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40108] Improve error message for -m option when .py is present

2020-03-31 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40108] Improve error message for -m option when .py is present

2020-03-31 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset ef67512b40240f765026ad41d60b0c9a6dacd2b9 by Pablo Galindo in 
branch 'master':
bpo-40108: Improve the error message in runpy when importing a module that 
includes the extension (GH-19239)
https://github.com/python/cpython/commit/ef67512b40240f765026ad41d60b0c9a6dacd2b9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40108] Improve error message for -m option when .py is present

2020-03-30 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
keywords: +patch
nosy: +pablogsal
nosy_count: 2.0 -> 3.0
pull_requests: +18596
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/19239

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40108] Improve error message for -m option when .py is present

2020-03-30 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40108] Improve error message for -m option when .py is present

2020-03-29 Thread Raymond Hettinger


New submission from Raymond Hettinger :

I think we can do better than the following:

$ python3.8 -m unicode_math_symbols.py
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8: Error while 
finding module specification for 'unicode_math_symbols.py' 
(ModuleNotFoundError: __path__ attribute not found on 'unicode_math_symbols' 
while trying to find 'unicode_math_symbols.py')

It is a reasonably common mistake to add .py to the module name for module 
names loaded by the -m command-line launcher.  The error mess is somewhat 
opaque and not suggestive of what the actual problem is or how to fix it.

--
messages: 365286
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Improve error message for -m option when .py is present
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com