[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2017-02-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: The term "linkage" is probably a misnomer... "execformat" would be more correct: * https://en.wikipedia.org/wiki/Comparison_of_executable_file_formats Too late to change, I guess. -- ___ Python tracker

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2017-02-20 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: I think there's a misunderstanding in what platform.architecture() is meant for. The purpose is to find out more details about the executable you pass to it, e.g. whether it's a 32-bit or 64-bit binary, or whether it's an ELF or PE binary. And it's a best

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2017-02-20 Thread Ned Deily
Changes by Ned Deily : -- assignee: ronaldoussoren -> lemburg versions: +Python 3.6, Python 3.7 -Python 3.3, Python 3.4 ___ Python tracker

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2013-07-06 Thread Ronald Oussoren
Changes by Ronald Oussoren ronaldousso...@mac.com: -- versions: +Python 3.3, Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2011-03-13 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: W.r.t the MachO name: I misread the patch, MachO is fine as the name for the reasons you mention. I'm not convinced that your hack to make bits return the pointer size of the currently running architecture when testing sys.executable

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2011-03-12 Thread Ronald Oussoren
Ronald Oussoren ronaldousso...@mac.com added the comment: IMHO the change to 'bits' is bogus, it is supposed to return the bit-size of the executable, not that of the currently running executable. I'd return all executable bitsizes in bits as '32bit', '64bit' or '32bit,64bit' (as appropriate)

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2011-03-12 Thread Ned Deily
Ned Deily n...@acm.org added the comment: IMHO the change to 'bits' is bogus, it is supposed to return the bit-size of the executable, not that of the currently running executable. Perhaps but (1) the code currently does return the bit-size of the currently running executable if it can't

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Adding a warning sounds like a good idea. Is it reasonable to include a recommended cross-platform approach in the platform doc, like either the sys.maxsize test or the struct.calsize(P) test (which is used as a default fallback in

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-21 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: I'm committing a doc update in r87421 with a suggestion to use sys.maxsize. I'll let Marc-André decide how to deal with the rest of the patch. -- ___ Python tracker rep...@bugs.python.org

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Ned Deily
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file20108/issue10735-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Ned Deily
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file20109/issue10735-27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Ned Deily
Changes by Ned Deily n...@acm.org: Removed file: http://bugs.python.org/file20106/issue10735-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Ned Deily
Changes by Ned Deily n...@acm.org: Removed file: http://bugs.python.org/file20107/issue10735-27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Instead of the platform module, one must resort to hacks like examining sys.maxsize I'm not sure why you think it's a hack. To me, it's, by construction, the right way to check for 64-bitness (and also the easiest since it doesn't involved

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Ned Deily
Ned Deily n...@acm.org added the comment: It's only a hack in the sense that platform.architecture is the documented interface in the std library to report bits and, unfortunately, users try to use it to determine whether running in 64-bit or 32-bit mode. For instance, see here:

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: It's only a hack in the sense that platform.architecture is the documented interface in the std library to report bits and, unfortunately, users try to use it to determine whether running in 64-bit or 32-bit mode. For instance, see here:

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-19 Thread Ned Deily
Ned Deily n...@acm.org added the comment: Adding a warning sounds like a good idea. Is it reasonable to include a recommended cross-platform approach in the platform doc, like either the sys.maxsize test or the struct.calsize(P) test (which is used as a default fallback in

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-18 Thread Ned Deily
New submission from Ned Deily n...@acm.org: OS X Mach-O universal executable files often contain multiple architectures including a combination of 32-bit and 64-bit archs, as with the newer OS X installer variants provided on python.org. In such cases, the platform.architecture() function

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-18 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___ ___ Python-bugs-list

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-18 Thread Ned Deily
Ned Deily n...@acm.org added the comment: The attached patches for py3k (3.2+) and 2.7 correct platform.architecture() to return the bit architecture ('32bit' or '64bit') of the running interpreter in the default case where executable = sys.executable. The linkage string will also contain

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-18 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- keywords: +patch Added file: http://bugs.python.org/file20106/issue10735-py3k.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___

[issue10735] platform.architecture() gives misleading results for OS X multi-architecture executables

2010-12-18 Thread Ned Deily
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file20107/issue10735-27.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10735 ___