[issue46852] Remove the float.__setformat__() method

2022-02-27 Thread Mark Dickinson


Mark Dickinson  added the comment:

> I reopen the issue for the second part of my plan

Hmm. That sounds like it should be a separate issue, or at the least, this 
issue should be retitled. It's helpful to keep issue titles accurate.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-27 Thread STINNER Victor


STINNER Victor  added the comment:

I reopen the issue for the second part of my plan:

"Once they will be removed, it will become possible to move the detection of 
the IEEE 754 format in the build step (./configure script) rather than doing 
the detection at runtime (slower). It would remove an "if" in _PyFloat_Pack4() 
and _PyFloat_Pack8(), and allow to specialize these functions for the detected 
format at build time. These functions are used by serialization formats: 
marshal, pickle and struct."

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-27 Thread Mark Dickinson


Mark Dickinson  added the comment:

Thanks, Victor. I think this can be closed now.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5a1c637ec6264790d3cfeef46815c62c32b510f3 by Victor Stinner in 
branch 'main':
bpo-46852: Restore test_getformat() test (GH-31601)
https://github.com/python/cpython/commit/5a1c637ec6264790d3cfeef46815c62c32b510f3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29724
pull_request: https://github.com/python/cpython/pull/31601

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29715
pull_request: https://github.com/python/cpython/pull/31592

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 5ab745fc51e159ead28b523414e52f0bcc1ef353 by Victor Stinner in 
branch 'main':
bpo-46852: Remove the float.__set_format__() method (GH-31585)
https://github.com/python/cpython/commit/5ab745fc51e159ead28b523414e52f0bcc1ef353


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor

STINNER Victor  added the comment:

Mark Dickinson:
> I'd be happy to see `float.__setformat__` go, if it's not still needed for 
> Python's test suite (which was its entire raison d'ĂȘtre). If no-one noticed 
> the accidental misnaming, then it's pretty clear no-one's been using it.

Nobody noticed the since Python 3.7 (released in June 2018). Well, even 
test_float didn't use it :-D (I just fixed the typo yesterday.) So I expect 
that no one uses it.

> I'd like to bet that there are at least a few people out there using 
> float.__getformat__, despite that its docstring says "You probably don't want 
> to use this function".

Yeah, I changed my mind and I prefer to leave it unchanged for now. It doesn't 
prevent me to optimize _PyFloat_Pack8().

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread Mark Dickinson

Mark Dickinson  added the comment:

I'd be happy to see `float.__setformat__` go, if it's not still needed for 
Python's test suite (which was its entire raison d'ĂȘtre). If no-one noticed the 
accidental misnaming, then it's pretty clear no-one's been using it.

I'd like to bet that there are at least a few people out there using 
float.__getformat__, despite that its docstring says "You probably don't want 
to use this function".

Maybe we could consider moving the information contained in __getformat__ to 
somewhere more accessible (e.g., a new field in sys.float_info)?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29708
pull_request: https://github.com/python/cpython/pull/31585

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a549cd1fc55888e2e287714b25e2cb2251913909 by Victor Stinner in 
branch '3.9':
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) 
(GH-31581)
https://github.com/python/cpython/commit/a549cd1fc55888e2e287714b25e2cb2251913909


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29704
pull_request: https://github.com/python/cpython/pull/31581

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0848da19ce8ea037ab1cfc569778e94bf8e3b24a by Victor Stinner in 
branch '3.10':
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558) 
(GH-31578)
https://github.com/python/cpython/commit/0848da19ce8ea037ab1cfc569778e94bf8e3b24a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-25 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29700
pull_request: https://github.com/python/cpython/pull/31578

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-24 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 7d03c8be5af2f1559dbc35b775b3116dfd63cfb6 by Victor Stinner in 
branch 'main':
bpo-46852: Rename float.__set_format__() to float.__setformat__() (GH-31558)
https://github.com/python/cpython/commit/7d03c8be5af2f1559dbc35b775b3116dfd63cfb6


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46852] Remove the float.__setformat__() method

2022-02-24 Thread STINNER Victor


STINNER Victor  added the comment:

We can keep the float.__getformat__() method, it doesn't harm. I change the 
issue title to only propose to remove the float.__setformat__() method.

--
title: Remove float.__get_format__() and  float.__set_format__() -> Remove the 
float.__setformat__() method

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com