[issue42210] float.hex discards sign from -nan
New submission from Sree : float.hex(float.fromhex("-nan")) returns 'nan'. PyOS_double_to_string seems to check only if it is a NaN, but ignores the sign (unlike its handling of inf a few lines below): <https://github.com/python/cpython/blob/e9e7d284c434768333fdfb53a3663eae74cb995a/Python/pystrtod.c#L903> Issue 5981 (https://bugs.python.org/issue5981) added the ability for fromhex to recognize -nan, but hex should probably have been updated at the same time. Encountered when testing float implementations. -- components: Interpreter Core messages: 379979 nosy: sree314 priority: normal severity: normal status: open title: float.hex discards sign from -nan type: behavior versions: Python 3.6 ___ Python tracker <https://bugs.python.org/issue42210> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue42210] float.hex discards sign from -nan
Sree added the comment: Thanks, all. I just wanted to know if this was a deliberate decision or an oversight. It also took me a while to realize it washex, and not fromhex. That allows the current behaviour to be easily worked around in Python code, and a backwards compatible optional parameter to hex() might allow -nan in the future without breaking existing software. Surprisingly, the standard does allow this [but this may not have been the intent] -- (Section 6.2) "Recognize that format conversions, including conversions between supported formats and external representations as character sequences, might be unable to deliver the same NaN." The conversion to character sequences text is key since I'm using a test harness written in Python that writes out and reads back text files containing float data. Section 6.3 in the standard also adds more details on when the sign bit in NaNs is relevant. -- ___ Python tracker <https://bugs.python.org/issue42210> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41014] sqlite3_trace deprecated
New submission from Sree Vaddi : details in the attached python.compile.log -- components: macOS files: python.compile.log messages: 371784 nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: sqlite3_trace deprecated type: enhancement Added file: https://bugs.python.org/file49242/python.compile.log ___ Python tracker <https://bugs.python.org/issue41014> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41015] warning: 'sqlite3_enable_shared_cache' is deprecated
New submission from Sree Vaddi : details in the attached python.compile.log -- components: macOS files: python.compile.log messages: 371785 nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'sqlite3_enable_shared_cache' is deprecated type: enhancement Added file: https://bugs.python.org/file49243/python.compile.log ___ Python tracker <https://bugs.python.org/issue41015> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41014] warning: 'sqlite3_trace' is deprecated
Change by Sree Vaddi : -- title: sqlite3_trace deprecated -> warning: 'sqlite3_trace' is deprecated ___ Python tracker <https://bugs.python.org/issue41014> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41016] warning: 'Tk_GetNumMainWindows' is deprecated
Change by Sree Vaddi : -- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'Tk_GetNumMainWindows' is deprecated type: enhancement Added file: https://bugs.python.org/file49244/python.compile.log ___ Python tracker <https://bugs.python.org/issue41016> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41017] warning: 'Tk_Init' is deprecated: first deprecated
Change by Sree Vaddi : -- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'Tk_Init' is deprecated: first deprecated Added file: https://bugs.python.org/file49245/python.compile.log ___ Python tracker <https://bugs.python.org/issue41017> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41018] warning: 'Tk_MainWindow' is deprecated: first deprecated
Change by Sree Vaddi : -- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: warning: 'Tk_MainWindow' is deprecated: first deprecated Added file: https://bugs.python.org/file49246/python.compile.log ___ Python tracker <https://bugs.python.org/issue41018> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41019] The necessary bits to build these optional modules were not found:
Change by Sree Vaddi : -- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: The necessary bits to build these optional modules were not found: Added file: https://bugs.python.org/file49247/python.compile.log ___ Python tracker <https://bugs.python.org/issue41019> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41020] Could not build the ssl module!
Change by Sree Vaddi : -- components: macOS files: python.compile.log nosy: ned.deily, ronaldoussoren, svaddi priority: normal severity: normal status: open title: Could not build the ssl module! Added file: https://bugs.python.org/file49248/python.compile.log ___ Python tracker <https://bugs.python.org/issue41020> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41004] Hash collisions in IPv4Interface and IPv6Interface
Change by Sree Vaddi : -- keywords: +patch nosy: +svaddi nosy_count: 3.0 -> 4.0 pull_requests: +20137 stage: -> patch review pull_request: https://github.com/python/cpython/pull/20956 ___ Python tracker <https://bugs.python.org/issue41004> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41020] Could not build the ssl module!
Sree Vaddi added the comment: openssl brew installed and upto date. despite build says it could not build the ssl module. i followed the macos instructions at the dev guide. svaddi@cpython % brew --prefix openssl /usr/local/opt/openssl@1.1 -- ___ Python tracker <https://bugs.python.org/issue41020> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com