[issue27005] Faster float.fromhex()

2016-05-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Proposed patch makes float.fromhex() faster for exact float. $ ./python -m timeit -s "h = float.hex(1.23)" -- "float.fromhex(h)" Unpatched: 100 loops, best of 3: 0.886 usec per loop Patched: 100 loops, best of 3: 0.519 usec per loop -- co

[issue26993] Copy idlelib *.py files with new names

2016-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: +1 for Ned's point that PEP 434 grants the IDLE developers *permission* to backport IDLE enhancements to maintenance releases, but doesn't *oblige* them to provide such backports. For Python 3.6, another point to keep in mind is that if anyone particularly want

[issue26807] mock_open()().readline() fails at EOF

2016-05-11 Thread Robert Collins
Robert Collins added the comment: So something like for line in _state[0]: yield line while True: yield '' Will probably do it just fine. -- ___ Python tracker __

[issue26993] Copy idlelib *.py files with new names

2016-05-11 Thread Ned Deily
Ned Deily added the comment: Glad to be of help with regards to 8.4 :=) With my 3.6 release manager hat on, I think the best way to think of this is as a new feature: call it "Ttk IDLE" or some such (and not idle2 vs idle3 which I think is confusing) and, rather than inventing something new,

[issue26807] mock_open()().readline() fails at EOF

2016-05-11 Thread Robert Collins
Robert Collins added the comment: Actually, further inspection and a teddybear with Angus Lees uncovers this: diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py --- a/Lib/unittest/test/testmock/testmock.py +++ b/Lib/unittest/test/testmock/testmock.py @@

[issue26807] mock_open()().readline() fails at EOF

2016-05-11 Thread Robert Collins
Robert Collins added the comment: ./python Lib/unittest/test/testmock/testmock.py ..s. -- Ran 80 tests in 0.180s OK (skipped=1) So thats great. I am g

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Nick Coghlan
Nick Coghlan added the comment: The embedded side-effects were my main concern with Scott's original patch, so Steven's callback-based approach strikes me as a definite improvement. However, the awkwardness of the revised calling code in main does make me wonder whether or not this might be be

[issue26993] Copy idlelib *.py files with new names

2016-05-11 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ned, thank you for the helpful response. Yes, I *was* proposing two versions in 3.5 and subsequent releases until the current version could be deleted. Its an ugly, least bad alternative that only made sense under the presumption that 'idle2' had to remain i

[issue27000] improve document of filter

2016-05-11 Thread Xiang Zhang
Xiang Zhang added the comment: Not about code, just the doc. In my opinion, if ``bool`` is not called it is definitely not equivalent to ``(item for item in iterable if function(item))``, which actually calls the function, even there is nothing different in the result. But, this is a rather su

[issue27000] improve document of filter

2016-05-11 Thread Franklin? Lee
Franklin? Lee added the comment: In that case, I'm still wondering what you mean by "not equivalent". Are you saying there is code which will work only if the ``bool`` function is really called? -- ___ Python tracker

[issue27000] improve document of filter

2016-05-11 Thread Xiang Zhang
Xiang Zhang added the comment: It's OK. Thanks for all your info and do learn. BTW, Franklin, I knew what will happen when ``bool`` is passed. -- ___ Python tracker ___

[issue23640] int.from_bytes() is broken for subclasses

2016-05-11 Thread Eugene Toder
Eugene Toder added the comment: They sure do. Check the example in my comment, or if you prefer the source code, it's pretty clear as well: https://hg.python.org/cpython/file/fff0c783d3db/Modules/_datetimemodule.c#l2770 -- ___ Python tracker

[issue27001] Python Interface X-Plane 10.45

2016-05-11 Thread Erik Rasmussen
Erik Rasmussen added the comment: X-plane is a simulator - and I used the attached Interface .. but since the new version 2.7.11 it is not working .. and it DID work in version 2.7.10 ... Have tryed to downgrade Python... but not possible .. for some reason it still registered as 2.7.11 , no matt

[issue23640] int.from_bytes() is broken for subclasses

2016-05-11 Thread R. David Murray
R. David Murray added the comment: No, they do not return instances of the derived type, they return instances of the base type. This is an intentional design decision that has been discussed elsewhere (including, I think, somewhere in this tracker). -- nosy: +r.david.murray

[issue27001] Python Interface X-Plane 10.45

2016-05-11 Thread R. David Murray
R. David Murray added the comment: I don't know what X-Plane is, but it isn't part of python. You should talk to the maintainers of it, and if they find there's a bug in python causing problems, open a specific issue about whatever that bug is. You could also try asking for help on the pytho

[issue27000] improve document of filter

2016-05-11 Thread R. David Murray
R. David Murray added the comment: Thanks for wanting to improve the docs, but the docs are a specification of syntax and behavior, not of implementation. So, the existing docs are correct, and changing them would over-specify the function. Since Raymond has also voted for rejection, I'm clo

[issue26993] Copy idlelib *.py files with new names

2016-05-11 Thread Ned Deily
Ned Deily added the comment: Terry, I'm all for having IDLE using the newer Ttk widgets and for refactoring to make it easier to enhance and maintain IDLE. I'm not sure I understand the proposal to make two sets of IDLE files: does this mean there would be two versions of IDLE in one branch,

[issue27003] Python 3.5.1 fails at HTTPSTest with SSL CERT error

2016-05-11 Thread SilentGhost
Changes by SilentGhost : -- components: +Extension Modules -Build nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou type: compile error -> behavior ___ Python tracker ___

[issue27003] Python 3.5.1 fails at HTTPSTest with SSL CERT error

2016-05-11 Thread Bennet Fauber
Bennet Fauber added the comment: Just for the sake of completeness, I tested outside of the test harness. /sw/arcts/centos7/python-dev/3.5.1/bin/python3 [bennet@flux-build-centos7-dev test]$ python3 Python 3.5.1 (default, May 11 2016, 08:50:05) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux Ty

[issue21099] Switch applicable importlib tests to use PEP 451 API

2016-05-11 Thread Brett Cannon
Brett Cannon added the comment: Patch LGTM -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue26647] ceval: use Wordcode, 16-bit bytecode

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry for misleading. I was going to continue reviewing peephole.c after found issues would addressed. In any case the patch needs to be synchronized with current sources (I expected that changes for modulefinder is no longer needed and changes for dis w

[issue27000] improve document of filter

2016-05-11 Thread Franklin? Lee
Franklin? Lee added the comment: > Although I still think it's telling readers incorrect info in the second > part. For ``bool``, it is not equivalent to ``(item for item in iterable if > function(item))`` but ``(item for item in iterable if item)``. For CPython, > you are not telling the trut

[issue27004] Handle script shbang options

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yet one option: - Add a wrapper /usr/bin/python2-s and pass it to to --executable. $ cat /usr/bin/python2-s #!/bin/sh exec /usr/bin/python2 -s "$@" -- nosy: +serhiy.storchaka ___ Python tracker

[issue27004] Handle script shbang options

2016-05-11 Thread Orion Poplawski
New submission from Orion Poplawski: Fedora would like to enforce that python scripts installed into /usr/bin use the "-s" option. We have tried to enforce this by doing: python setup.py build --executable '/usr/bin/python2 -s' However, as reported here: https://bugzilla.redhat.com/show_bug.c

[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor. Fixed. > IMHO it's worth to add an optional argument to skip extended opcodes in _unpack_opcodes() to simplify the code in modulefinder. But this would complicate the code in dis. If the disassembler would changed to skip extended opcodes,

[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset d60040b3bb8c by Serhiy Storchaka in branch '3.5': Removed duplicated NEWS entity for issue #26881. https://hg.python.org/cpython/rev/d60040b3bb8c -- ___ Python tracker

[issue26884] android: cross-compilation of extension module links to the wrong python library

2016-05-11 Thread Xavier de Gaye
Xavier de Gaye added the comment: Another description of the problem: * On the build system, the native python (in one of the search directories of PATH) has been built without --with-pydebug. * The cross-compilation is done on this build system with --with-pydebug. * The cross-compilation of al

[issue27003] Python 3.5.1 fails at HTTPSTest with SSL CERT error

2016-05-11 Thread Bennet Fauber
New submission from Bennet Fauber: I downloaded the source tar file for Python 3.5.1 and compiled. Upon running make test, it fails at test_networked_good_cert (test_httplib.HTTPSTest) ... ERROR Abbreviated Traceback looks like: ===

[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset f0a4d563b32e by Serhiy Storchaka in branch '3.5': Issue #26881: Restored the name of scan_opcodes_25(). https://hg.python.org/cpython/rev/f0a4d563b32e -- ___ Python tracker

[issue27000] improve document of filter

2016-05-11 Thread Raymond Hettinger
Raymond Hettinger added the comment: > bool is not enough of a special case to call it out without > confusing the issue. I concur. It would be easy to make the docs less usable by elaborating on this special case. For the most part, a user should use None if they just want to test the trut

[issue19717] resolve() fails when the path doesn't exist

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have written a patch that implements all three mode for posixpath.realpath() (issue27002). Having the implementation we can test and research it. After discussion this solution can be adopted for Path.resolve(). -- versions: +Python 3.6 -Python 3.4

[issue27002] Support different modes in posixpath.realpath()

2016-05-11 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For now posixpath.realpath() don't raise an exception if encounter broken link. Instead it just lefts broken link name and following path components unresolved. This is dangerous since broken link name can be collapsed with following ".." and resulting val

[issue23640] int.from_bytes() is broken for subclasses

2016-05-11 Thread Eugene Toder
Eugene Toder added the comment: There's a similar issue with replace() methods on date/time/datetime classes. They create instances of derived types without calling derived __new__/__init__, thus potentially leaving those uninitialized. >>> from datetime import date >>> class D(date): ... de

[issue27001] Python Interface X-Plane 10.45

2016-05-11 Thread Erik Rasmussen
New submission from Erik Rasmussen: Hi Python!! Thanks for your work on python .. really appreciated. Program to integrate python in X-Plane 10.45+ It worked fine on Python 2.7.10 but after the new release X-Plane Crashes completely with plugin .. ?? Assistance please... Kindly Erik (The Vi

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-11 Thread SilentGhost
Changes by SilentGhost : -- nosy: +vinay.sajip versions: +Python 3.6 -Python 3.5 ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue26881] modulefinder should reuse the dis module

2016-05-11 Thread STINNER Victor
STINNER Victor added the comment: It looks like the change is mentionned twice in Misc/NEWS. IMHO it's worth to add an optional argument to skip extended opcodes in _unpack_opcodes() to simplify the code in modulefinder. Is the scancode method public? If yes, I'm not sure that it's ok to rename

[issue27000] improve document of filter

2016-05-11 Thread Xiang Zhang
Xiang Zhang added the comment: First I have to clarify that my mistake is not in understanding but in writing. What I mean by 'identify the return value True or False' is actually what you say, 'evaluate for truth or falsehood'. I also notice the lowercase false and true in the doc. I know the

[issue27000] improve document of filter

2016-05-11 Thread Josh Rosenberg
Josh Rosenberg added the comment: bool is not enough of a special case to call it out without confusing the issue. No, the bool constructor is not actually called. But it will still behave as if it was called for all intents and purpose, it just skips the reference counting shenanigans for the

[issue26039] More flexibility in zipfile write interface

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have added comments for tests and documentation. The implementation looks correct. But I prefer simpler solution on this stage. Here is something between zipfile-open-w5.patch and zipfile-open-w8.patch, close to zipfile-open-w5.patch with fixed issues. *

[issue27000] improve document of filter

2016-05-11 Thread Josh Rosenberg
Josh Rosenberg added the comment: Franklin said it better: The only difference between documentation and behavior is invisible implementation details, which have no business being documented in any event (since they needlessly tie the hands of maintainers of CPython and other Python interprete

[issue27000] improve document of filter

2016-05-11 Thread Franklin? Lee
Franklin? Lee added the comment: Aren't these both implementation details? As in, they only affect efficiency, not effect, right? -- nosy: +leewz ___ Python tracker ___

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't understand which repeat functionality you're referring to. https://docs.python.org/3/library/timeit.html#timeit.Timer.repeat (or, similarly, what timeit's __main__ does: report the minimum of all N runs) -- __

[issue27000] improve document of filter

2016-05-11 Thread Xiang Zhang
New submission from Xiang Zhang: I think filter's doc can be improved[1]: 1. It doesn't mention ``bool``. ``bool`` is treated the same way as ``None``. It is not called. But this is not mentioned. 2. 'the identity function is assumed' is confusing, at least for me. It looks like when ``None``

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: > I would suggest making the 0.2 tunable as an optional argument. Sounds like a good idea to me. > I also notice the repeat functionality isn't included in the patch, is there > a reason? I don't understand which repeat functionality you're referring to. --

[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: I was thinking the (somewhat hacky) dlopen() approach so that gethostbyname_r() works in API 21 builds. If a universal build is not necessary this patch is OK. -- ___ Python tracker

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would suggest making the 0.2 tunable as an optional argument. Different applications (benchmarks) may want different duration / precision tradeoffs. I also notice the repeat functionality isn't included in the patch, is there a reason? -- __

[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Xavier de Gaye
Xavier de Gaye added the comment: So what is problematic with this new patch ? Obviously you need to build with API 23 to get gethostbyname_r() since it was not supported by android before, with the previous patch you don't get gethostbyname_r(), even when building with API 23. -- _

[issue18454] distutils crashes when uploading to PyPI having only the username (no pw) defined

2016-05-11 Thread 池昌言
池昌言 added the comment: Patch for Python 3.5, using getpass module -- nosy: +池昌言 Added file: http://bugs.python.org/file42817/issue18454_py35_prompt.patch ___ Python tracker ___ _

[issue6422] timeit called from within Python should allow autoranging

2016-05-11 Thread Steven D'Aprano
Steven D'Aprano added the comment: This issue seems to have lost momentum, I'd like to revive it by proposing a slightly different interface for the autorange function. Attached is a proof-of-concept patch. I've moved the code which determines the number of loops out of the main function into

[issue26983] float() can return not exact float instance

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, sorry, how could I miss it? -- Added file: http://bugs.python.org/file42815/float_exact2.patch ___ Python tracker ___

[issue26998] Unable to import "site" in an embedded application

2016-05-11 Thread AlexWMF
AlexWMF added the comment: I found the following PEP https://www.python.org/dev/peps/pep-0514/ According to this PEP, starting from python 2.7.11 the backward compatibility was broken, because .dll can't read from the following registry keys anymore: HKEY_LOCAL_MACHINE\Software\Python\PythonCor

[issue26983] float() can return not exact float instance

2016-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: Can you please attach the new patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: By the way, socketmodule_2.patch is problematic. Developers may choose to build CPython against API level 21 and run it on all devices with API level >= 21. In general Android keeps ABI compatibility between consecutive versions. That is, most binaries built fo

[issue26998] Unable to import "site" in an embedded application

2016-05-11 Thread AlexWMF
AlexWMF added the comment: The output of both x86 and x86_64 python interpreters is attached -- Added file: http://bugs.python.org/file42814/Clipboard29.png ___ Python tracker __

[issue21099] Switch applicable importlib tests to use PEP 451 API

2016-05-11 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue26998] Unable to import "site" in an embedded application

2016-05-11 Thread AlexWMF
AlexWMF added the comment: Could you provide link to that PEP? As I posted in the previous message, both x86 and x86_64 python27.dll have version string "2.7-32" (shown in sys.winver). Is this right? Any of installers (x86 nor x86_64) don't create "2.7-32" subkey. I understand that python shou

[issue26999] Add child separator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-11 Thread Richard Neumann
Changes by Richard Neumann : -- title: Add child seperator keyword to logging.basicConfig and use it in Logger.getChild() -> Add child separator keyword to logging.basicConfig and use it in Logger.getChild() ___ Python tracker

[issue26999] Add child seperator keyword to logging.basicConfig and use it in Logger.getChild()

2016-05-11 Thread Richard Neumann
New submission from Richard Neumann: Currently Python's logging library has the Child-Separator hard-coded in Logger.getChild() as '.'. It would be useful to have the ability to preset this via an optional basicConfig() argument like 'child_sep=' and preset it to '.' to retain the current beha

[issue26998] Unable to import "site" in an embedded application

2016-05-11 Thread R. David Murray
R. David Murray added the comment: As far as I know the registry key is a supplament and not a requirement for a correctly functioning python. There is an entire PEP about the registry keys and what to do with them...I'm not sure what the current status is on 2.7, but like I said, I believe t

[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: > Can people upgrade their devices or do they have to buy a new one? AFAIK most models other than Nexus won't get updates with a bumped major version. (5.x => 6.x for example) -- ___ Python tracker

[issue26857] gethostbyname_r() is broken on android

2016-05-11 Thread Stefan Krah
Stefan Krah added the comment: How about supporting API >= 23 only? Can people upgrade their devices or do they have to buy a new one? -- nosy: +Chi Hsuan Yen ___ Python tracker ___

[issue26998] Unable to import "site" in an embedded application

2016-05-11 Thread AlexWMF
AlexWMF added the comment: I've checked the x86_64 version of python27.dll. It contains "2.7-32" as well as x86 python dll. So strange, seems like "-32" is always there, independently of target bitness. -- ___ Python tracker

[issue26855] android: add platform.android_ver()

2016-05-11 Thread Chi Hsuan Yen
Chi Hsuan Yen added the comment: Version 3. Still using a try-catch clause to enclose the subprocess call, as _syscmd_ver does the same thing. -- Added file: http://bugs.python.org/file42813/android_ver.patch ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: used diff -rNu Python-2.7.11 Python-2.7.11.4 to generate Note: content same as those from yesterday - except Lib/ctype/test/test_loading.py is no longer changed. No longer needed. -- Added file: http://bugs.python.org/file42812/Python2.issue26439.160511.

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: used diff -rNu Python-3.5.1 Python-3.5.1.1 to generate -- Added file: http://bugs.python.org/file42811/Python3.issue26439.160511.patch ___ Python tracker

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: re: AIX: CDLL("libcrypto.a(libcrypto.so.1.0.0)", DEFAULT_MODE | RTLD_MEMBER) Officially it would be dlopen("libcrypto.a(libcrypto.so.1.0.0)", RTLD_NOW | RTLD_MEMBER) Further, that would only load the 32-bit version, as there is a legacy naming scheme for the 64

[issue26998] Unable to import "site" in an embedded application

2016-05-11 Thread AlexWMF
New submission from AlexWMF: Unable to import "site" error occurs in an embedded application. I have made small research and found why this module isn't visible for python core. I have run the python 2.7.11 x86 (for all users) at my win 7x64. The installer writes the registry key "Software\Wow

[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

2016-05-11 Thread Michael Felt
Michael Felt added the comment: a) https://bugs.python.org/review/26439/#msg12, but getting HTML 500 error) The call to find_library here is for "ease of use" with existing code who use, e.g., cdll("libcrypto.so"). This format fails unless someone has previously done, e.g.: (cd /usr/lib; ar -X

[issue26996] Add secrets module as per PEP 506.

2016-05-11 Thread Berker Peksag
Berker Peksag added the comment: If you have time, documenting this at https://docs.python.org/3.6/whatsnew/3.6.html#new-features would be great :) -- nosy: +berker.peksag ___ Python tracker __

[issue26997] Docs for pdb should note that __future__ magic doesn't work

2016-05-11 Thread Martin Jones
New submission from Martin Jones: when debugging a program at the pdb prompt, attempting to import from the __future__ module appears successful, but actually doesn't work: (Pdb) from __future__ import division (Pdb) 2/3 0 This leads to inconsistencies between statements evaluated on the pdb p

[issue25998] doctest terminates when accessing __wrapped__ raises an error

2016-05-11 Thread Jakub Stasiak
Changes by Jakub Stasiak : -- nosy: +jstasiak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue26983] float() can return not exact float instance

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is updated patch. Differences: * Deprecation warning is now emitted in functions accepting floats (like math.sqrt). * Improved error messages. Now reported wrong type name and a type of wrong __float__ method. * float() now returns the same object for e

[issue26983] float() can return not exact float instance

2016-05-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Add tests for parsing float and object arguments ___ Python tracker ___ ___ Python-bug

[issue26983] float() can return not exact float instance

2016-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: > As I understand, the conclusion of the Python-Dev discussion is that __int__, > __float__, __complex__, etc should return exact int, float, complex, not > subclasses. Agreed; that matches my understanding. I'm only observing that it would be difficult (and

[issue26983] float() can return not exact float instance

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The warning message is copied from __int__. As I understand, the conclusion of the Python-Dev discussion is that __int__, __float__, __complex__, etc should return exact int, float, complex, not subclasses. I have another patch that adds a warning for __comp

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2016-05-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Regenerated for review. -- nosy: +serhiy.storchaka Added file: http://bugs.python.org/file42810/issue11549.patch ___ Python tracker ___ __

[issue26983] float() can return not exact float instance

2016-05-11 Thread Mark Dickinson
Mark Dickinson added the comment: +1 for the idea, and the patch LGTM. I was initially a bit confused by the wording of the warning: presumably, we're not going to change Python to make returning an instance of a strict float subclass from __float__ illegal (I don't really see how that would b

[issue26855] android: add platform.android_ver()

2016-05-11 Thread Xavier de Gaye
Xavier de Gaye added the comment: IMHO returning an integer for the sdk field would be better. The patch could use shutil.which() to avoid subprocess calls when getprop is not available. It would be better to use a 'try/except ValueError' clause instead of isdigit(). The OSError and UnicodeDec