msg63718 - (view) |
Author: Brett Cannon (brett.cannon) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
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) *  |
Date: 2012-10-12 19:39 |
I don't remember.
|
msg178590 - (view) |
Author: Berker Peksag (berker.peksag) *  |
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) *  |
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) *  |
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.
|
|
Date |
User |
Action |
Args |
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 -> 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 | |