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 2008年03月17日 19:22 by brett.cannon, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| exceptions_fixer.patch | benjamin.peterson, 2008年08月25日 17:55 | |||
| issue2350.diff | berker.peksag, 2012年12月30日 17:24 | review | ||
| Messages (11) | |||
|---|---|---|---|
| msg63718 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2008年03月17日 19:22 | |
Importing 'exceptions' should raise at least a Py3K warning, if not a full DeprecationWarning. |
|||
| msg63769 - (view) | Author: Douglas Mayle (douglas) * | Date: 2008年03月17日 20:53 | |
I ran python through a debugger and found that the exceptions module is imported automatically at load time. Because of this, when "import exceptions" is parsed, the module is already loaded, and PyImport_Import is not called. In order to correct this, we'll have to either catch this at the AST, or just handle it in 2to3... |
|||
| msg71886 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2008年08月24日 21:51 | |
I'm not sure how we could implement a warning on import of exceptions aside from implementing it in the compiler. I suppose 2to3 could just remove the import... |
|||
| msg71902 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2008年08月24日 23:39 | |
On Sun, Aug 24, 2008 at 2:51 PM, Benjamin Peterson <report@bugs.python.org> wrote: > > Benjamin Peterson <musiccomposition@gmail.com> added the comment: > > I'm not sure how we could implement a warning on import of exceptions > aside from implementing it in the compiler. I suppose 2to3 could just > remove the import... > ... and would also have to change all references. But that would probably work out fine. |
|||
| msg71949 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2008年08月25日 17:55 | |
Here's my 2to3 fixer for the job. It cleanly removes the imports and changes the usage. |
|||
| msg72971 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2008年09月10日 16:02 | |
Given that this is now a request for a fixer, and not a request for a deprecation warning, I don't see why this is considered a release blocker. Lowering the priority to normal. Even if the fixer isn't added to the 2to3 copy shipped with 2.6.0, I think 2to3 improvements can well be incorporated into 2.6.1 (including additional fixers). |
|||
| msg172772 - (view) | Author: Martin v. Löwis (loewis) * (Python committer) | Date: 2012年10月12日 19:31 | |
Brett: Why did you close the issue? Benjamin's change was never committed... |
|||
| msg172773 - (view) | Author: Brett Cannon (brett.cannon) * (Python committer) | Date: 2012年10月12日 19:39 | |
I don't remember. |
|||
| msg178590 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2012年12月30日 17:24 | |
I've converted Benjamin's patch to extended diff format, fixed some PEP 8 violations and typos, removed the {get, set}_prefix usage, added more tests and updated the documentation. |
|||
| msg178591 - (view) | Author: Benjamin Peterson (benjamin.peterson) * (Python committer) | Date: 2012年12月30日 17:30 | |
This is something people can easily convert in there 2.x code, so I don't think the need for it is great. |
|||
| msg379318 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2020年10月22日 17:54 | |
Updating the versions, though it seems that you may want to close this as rejected based on the discussion. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:32 | admin | set | github: 46603 |
| 2021年10月20日 23:05:39 | iritkatriel | set | status: open -> closed superseder: Close 2to3 issues and list them here resolution: wont fix stage: patch review -> resolved |
| 2020年10月22日 17:54:32 | iritkatriel | set | versions:
+ Python 3.8, Python 3.9, Python 3.10, - Python 2.7, Python 3.2, Python 3.3, Python 3.4 nosy: + iritkatriel messages: + msg379318 keywords: - patch, needs review |
| 2016年12月09日 19:29:58 | berker.peksag | link | issue28922 superseder |
| 2012年12月30日 17:30:59 | benjamin.peterson | set | assignee: collinwinter -> messages: + msg178591 |
| 2012年12月30日 17:24:51 | berker.peksag | set | files:
+ issue2350.diff nosy: + berker.peksag messages: + msg178590 |
| 2012年10月20日 13:03:25 | cjmayo | set | nosy:
+ cjmayo |
| 2012年10月19日 19:04:45 | jcea | set | nosy:
+ jcea versions: + Python 2.7, Python 3.2, Python 3.3, Python 3.4, - Python 2.6 |
| 2012年10月15日 13:04:20 | brett.cannon | link | issue16214 superseder |
| 2012年10月12日 19:39:02 | brett.cannon | set | status: closed -> open resolution: fixed -> (no value) messages: + msg172773 stage: patch review |
| 2012年10月12日 19:31:04 | loewis | set | messages: + msg172772 |
| 2008年12月03日 23:35:59 | brett.cannon | set | status: open -> closed resolution: fixed |
| 2008年09月10日 16:02:56 | loewis | set | priority: release blocker -> normal nosy: + loewis messages: + msg72971 |
| 2008年09月09日 13:14:07 | barry | set | priority: deferred blocker -> release blocker |
| 2008年09月04日 01:10:11 | benjamin.peterson | set | priority: release blocker -> deferred blocker |
| 2008年08月25日 17:56:35 | benjamin.peterson | set | keywords: + needs review, - 26backport |
| 2008年08月25日 17:55:57 | benjamin.peterson | set | files:
+ exceptions_fixer.patch assignee: collinwinter type: enhancement components: + 2to3 (2.x to 3.x conversion tool) title: Warn against importing 'exceptions' -> 'exceptions' import fixer keywords: + patch nosy: + collinwinter messages: + msg71949 |
| 2008年08月24日 23:39:54 | brett.cannon | set | messages: + msg71902 |
| 2008年08月24日 21:51:35 | benjamin.peterson | set | nosy:
+ benjamin.peterson messages: + msg71886 |
| 2008年08月21日 18:34:27 | brett.cannon | set | priority: critical -> release blocker |
| 2008年03月17日 20:53:28 | douglas | set | nosy:
+ douglas messages: + msg63769 |
| 2008年03月17日 20:14:26 | brett.cannon | set | priority: release blocker -> critical |
| 2008年03月17日 19:22:08 | brett.cannon | create | |