gh-145633: remove support for ancient ARM platforms with mixed-endian doubles#145634
gh-145633: remove support for ancient ARM platforms with mixed-endian doubles#145634skirpichev wants to merge 5 commits intopython:mainfrom
Conversation
…endian doubles * drop DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 macro * use DOUBLE_IS_BIG/LITTLE_ENDIAN_IEEE754 to detect endianness of float/doubles * drop "unknown_format" code path in PyFloat_Pack/Unpack*()
|
Edit: Mark Dickinson suggested to keep this for alternative Python implementations. |
|
cc @diegorusso |
There was a problem hiding this comment.
This is more a generic question about the process. Shouldn't we follow the usual removal process (warning + removal)?
In this specific case, it might be still OK just to drop it as I really doubt these that the OS on these old devices wants to ship Python 3.15.
|
|
||
| /* this is for the benefit of the pack/unpack routines below */ | ||
| typedef enum _py_float_format_type float_format_type; | ||
| #define unknown_format _py_float_format_unknown |
There was a problem hiding this comment.
The struct in pycore_runtime_structs.h still has the _py_float_format_unknown
We should remove it from there as well.
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase And if you don't make the requested changes, you will be put in the comfy chair! |
I reply to my own question. This is not a language change hence safe to remove. Also the probability that this will affect users is extremely low. |
use _py_float_format_ieee_little_endian as a default.
| @@ -0,0 +1,2 @@ | |||
| Remove support for ancient ARM platforms, using mixed-endian representation | |||
| for doubles. Patch by Sergey B Kirpichev. | |||
There was a problem hiding this comment.
You might move this NEWS entry to the Build category.
| .float_state = { \ | ||
| .float_format = _py_float_format_unknown, \ | ||
| .double_format = _py_float_format_unknown, \ | ||
| .float_format = _py_float_format_ieee_little_endian, \ |
There was a problem hiding this comment.
Why not having something like that?
#ifdef DOUBLE_IS_BIG_ENDIAN_IEEE754
.double_format = _py_float_format_ieee_big_endian, \
.float_format = _py_float_format_ieee_big_endian, \
#else
.double_format = _py_float_format_ieee_little_endian, \
.float_format = _py_float_format_ieee_little_endian, \
#endif
It has the same logic that we have in floatobject.c
Uh oh!
There was an error while loading. Please reload this page.