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.
Created on 2015年04月08日 21:53 by brett.cannon, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test_future_builtins.py | 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 | |
try: from future_builtins import ascii, filter, hex, map, oct, zip except ImportError: pass |
|||
| 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: https://pypi.python.org/pypi/future/ |
|||
| 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. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:15 | admin | set | github: 68081 |
| 2015年04月24日 15:56:27 | brett.cannon | set | status: open -> closed resolution: rejected messages: + msg241950 |
| 2015年04月09日 19:36:19 | pitrou | set | nosy:
+ pitrou messages: + msg240369 |
| 2015年04月09日 13:23:27 | eric.smith | set | messages: + msg240323 |
| 2015年04月09日 13:09:43 | brett.cannon | set | messages: + msg240321 |
| 2015年04月09日 06:16:53 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg240308 |
| 2015年04月09日 01:48:32 | brett.cannon | set | messages: + msg240301 |
| 2015年04月09日 01:45:44 | brett.cannon | set | files:
+ future_builtins.diff keywords: + patch messages: + msg240298 |
| 2015年04月09日 01:42:36 | eric.smith | set | messages: + msg240297 |
| 2015年04月09日 01:32:36 | brett.cannon | set | files:
+ test_future_builtins.py nosy: + eric.smith messages: + msg240295 stage: test needed -> patch review |
| 2015年04月08日 21:53:45 | brett.cannon | set | assignee: brett.cannon |
| 2015年04月08日 21:53:40 | brett.cannon | create | |