Opened 8 years ago

Closed 8 years ago

#17458 closed defect (fixed)

import_statements should ignore lazy imports with deprecation

Reported by: Jeroen Demeyer Owned by:
Priority: major Milestone: sage-6.5
Component: misc Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Vincent Delecroix
Report Upstream: N/A Work issues:
Branch: 528e64a (Commits, GitHub, GitLab) Commit: 528e64a33c3d3267d0a5e4e8531bad6a1d16a05e
Dependencies: Stopgaps:

Status badges

Description (last modified by Vincent Delecroix)

After this ticket import_statements will ignore lazy imports (and raise a LookupError if only deprecated objects are found).

Change History (8)

comment:1 Changed 8 years ago by Jeroen Demeyer

Authors: Jeroen Demeyer

comment:2 Changed 8 years ago by Jeroen Demeyer

Branch: u/jdemeyer/ticket/17458
Created: Dec 7, 2014, 8:55:24 PMDec 7, 2014, 8:55:24 PM
Modified: Dec 7, 2014, 10:35:43 PMDec 7, 2014, 10:35:43 PM

comment:3 Changed 8 years ago by Jeroen Demeyer

Commit: 0321aa107fbd1900345b89c6e4bd0b47523bdb27
Status: newneeds_review

New commits:

0321aa1import_statements should ignore deprecated lazy imports

comment:4 Changed 8 years ago by Vincent Delecroix

Branch: u/jdemeyer/ticket/17458u/vdelecroix/17458
Commit: 0321aa107fbd1900345b89c6e4bd0b47523bdb274058557aeb437667548d9614f6ea98eb1458865b
Description: modified (diff)

Hello,

I added the trac ticket number to the LookupError. I wonder why there is no specification for the _deprecation argument of LazyImport...

If you like it, you can set to positive review.

Vincent


New commits:

4058557trac #17458: add ticket number to the LookupError

comment:5 Changed 8 years ago by Jeroen Demeyer

Branch: u/vdelecroix/17458u/jdemeyer/ticket/17458
Modified: Dec 8, 2014, 8:27:36 AMDec 8, 2014, 8:27:36 AM

comment:6 Changed 8 years ago by Jeroen Demeyer

Commit: 4058557aeb437667548d9614f6ea98eb1458865b528e64a33c3d3267d0a5e4e8531bad6a1d16a05e
Reviewers: Vincent Delecroix

I think it's a good idea to add the ticket number, but then we might as well always return the ticket when asking for the deprecation (since 0 is False in a boolean context, this works as expected). Needs review.


New commits:

528e64aRename _is_deprecated() as _get_deprecation_ticket()

comment:7 Changed 8 years ago by Vincent Delecroix

Status: needs_reviewpositive_review

Perfect!

comment:8 Changed 8 years ago by Volker Braun

Branch: u/jdemeyer/ticket/17458528e64a33c3d3267d0a5e4e8531bad6a1d16a05e
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.