This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Forward-port future_builtins
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.5
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: brett.cannon, eric.smith, pitrou, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2015-04-08 21:53 by brett.cannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit brett.cannon, 2015-04-09 01:32
future_builtins.diff brett.cannon, 2015-04-09 01:45 review
Messages (10)
msg240287 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-04-08 21:53
future_builtins exists in Python 2.7, but not Python 3 which is annoying for code that wants to rely on it in Python 2.7 but not 2to3 (who is the primary user of the module for rewrite rules).
msg240295 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-04-09 01:32
Since the module is literally `from builtins import ascii, filter, hex, map, oct, zip`, I have attached the test file (which is also ridiculously simple).
msg240297 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015-04-09 01:42
Looks good to me.

I realize it's trivial, but is it worth putting this on PyPI for older 3.x's?
msg240298 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-04-09 01:45
I now have a patch that contains everything, including docs.
msg240301 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-04-09 01:48
It could go on PyPI if I make sure it doesn't shadow the module in Python 3.5 or 2.6/2.7.
msg240308 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-04-09 06:16
    from future_builtins import ascii, filter, hex, map, oct, zip
except ImportError:
msg240321 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-04-09 13:09
There's no need for the ImportError catch. If a builtin is missing then there is something seriously wrong and it shouldn't be made silent.
msg240323 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2015-04-09 13:23
I think Serhiy is saying that you don't need to implement future_builtins in 3.x, if your 2.7 and 3.x compatible code catches the ImportError.
msg240369 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2015-04-09 19:36
Already exists on PyPI:
msg241950 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2015-04-24 15:56
I've decided that having the module exist in Python 2.7 and 3.5 but not 3.0 - 3.4 is just asking for trouble.
Date User Action Args
2022-04-11 14:58:15adminsetgithub: 68081
2015-04-24 15:56:27brett.cannonsetstatus: open -> closed
resolution: rejected
messages: + msg241950
2015-04-09 19:36:19pitrousetnosy: + pitrou
messages: + msg240369
2015-04-09 13:23:27eric.smithsetmessages: + msg240323
2015-04-09 13:09:43brett.cannonsetmessages: + msg240321
2015-04-09 06:16:53serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg240308
2015-04-09 01:48:32brett.cannonsetmessages: + msg240301
2015-04-09 01:45:44brett.cannonsetfiles: + future_builtins.diff
keywords: + patch
messages: + msg240298
2015-04-09 01:42:36eric.smithsetmessages: + msg240297
2015-04-09 01:32:36brett.cannonsetfiles: +

nosy: + eric.smith
messages: + msg240295

stage: test needed -> patch review
2015-04-08 21:53:45brett.cannonsetassignee: brett.cannon
2015-04-08 21:53:40brett.cannoncreate