[issue31503] Enhance dir(module) to be informed by __all__ by updating module.__dir__
New submission from Cody Piersall: If a some_module defines __all__, dir(some_module) should only return what is in __all__. This is already a mechanism that Python provides to specify module-level APIs. Currently, dir(some_module) returns some_module.__dict__.keys(). The concern with this enhancement is backwards compatibility. It is conceivable that some library's code would be broken with the different return value of dir(some_module). However, it seems unlikely that any code, other than tests, depends on the current behavior of dir(some_module). If __all__ is not defined in some_module, the old behavior is preserved. -- messages: 302404 nosy: codypiersall priority: normal pull_requests: 3631 severity: normal status: open title: Enhance dir(module) to be informed by __all__ by updating module.__dir__ type: enhancement versions: Python 3.7 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31503> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)
Cody Piersall added the comment: Agreed. An ounce of data is worth a pound of theory as the saying goes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)
New submission from Cody Piersall: Whenever I tried to run the embeddable zip file from https://www.python.org/downloads/windows/ for Python 3.5.0b3, the program crashes with the message The program can't start because api-ms-win-crt-math-l1-1-0.dll is missing from your computer. Try reinstalling the program to fix this problem. I suspect that this happens because I don't have any version of Visual Studio on my computer, but I'm not sure what causes it. It happens with both the 32-bit and 64-bit zip file. Steps to reproduce: 1. Download the zip file https://www.python.org/ftp/python/3.5.0/python-3.5.0b3-embed-win32.zip 2. Extract the contents 3. Click on the Python executable 4. Do not have Visual Studio installed on your computer I am running Windows 7 Enterprise, 64-bit I have attached a screenshot of the error message. -- files: bug.PNG messages: 247063 nosy: Cody Piersall, steve.dower priority: normal severity: normal status: open title: Windows embeddable Python zip file crashes (cannot find a dll) Added file: http://bugs.python.org/file39969/bug.PNG ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)
Cody Piersall added the comment: Yeah, having embeddable in the name is a good hint, I think. It was almost enough for me to not even try downloading it. Is it possible / even worth the time to give a more helpful error message? I'm not sure that it's possible, based on when the dll is laoded, or if it were possible whether it's worth doing. It might require more code than it's worth to maintain. You'd have to... 1. In the main function in C, check whether you're running the embedded Python (probably with an #ifdef) 2. If so, check that the required CRT is found (which probably requires _another_ #ifdef for 32/64 bit, and maybe Python version) 3. If it isn't found, create a message box using the Windows API explaining the problem. Which may require including the GUI libraries into the Python executable, and I don't think those are small things. I'm not sure if that is either possible or desirable, though. Or if what I explained would even work; I'm not sure if the DLLs are loaded right when the executable starts, or only as needed whenever functions from the DLLs are called. And I have _no_ idea how to check for the presence of the CRT. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)
Changes by Cody Piersall cody.piers...@gmail.com: -- components: +Windows nosy: +paul.moore, tim.golden, zach.ware type: - crash ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue24679] Windows embeddable Python zip file crashes (cannot find a dll)
Cody Piersall added the comment: Ah! That makes sense. I still think the embeddable Python could be useful, but I don't actually have a vested interest in it at the moment. Mostly I feel like it would be useful if Python is an implementation detail of an application, and you want to make sure that the user of your application doesn't mess up the Python installation. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24679 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com