Opened 8 months ago

Closed 8 months ago

#26220 closed defect (fixed)

Fix CoercionException imports

Reported by: jhpalmieri Owned by:
Priority: major Milestone: sage-8.4
Component: python3 Keywords:
Cc: Merged in:
Authors: John Palmieri Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: fbdf022 (Commits) Commit: fbdf0226fc2baf8684a774fec46aed337ab76a75
Dependencies: Stopgaps:

Description

The lazy imports used for CoercionException cause some problems with Python 3. I think they are not necessary: instead of lazily importing from sage.structure.parent, we can import directly from sage.structure.coerce_exceptions, which should be pretty fast (that file contains almost nothing).

This fixes several Python 3 doctest issues, such as the one in the ticket description for #25927.

Change History (5)

comment:1 Changed 8 months ago by jhpalmieri

  • Branch set to u/jhpalmieri/coercionexception

comment:2 Changed 8 months ago by jhpalmieri

  • Commit set to fbdf0226fc2baf8684a774fec46aed337ab76a75
  • Status changed from new to needs_review

New commits:

fbdf022trac 26220: change import statements for CoercionException.

comment:3 Changed 8 months ago by jhpalmieri

I don't actually know if the changes in the combinat files are necessary, but these import statements look cleaner than importing from parent.

comment:4 Changed 8 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

The change to pushout was also done in #26211, but I have asked for that part to be reverted in favor of this ticket.

comment:5 Changed 8 months ago by vbraun

  • Branch changed from u/jhpalmieri/coercionexception to fbdf0226fc2baf8684a774fec46aed337ab76a75
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.