Opened 3 years ago

Closed 3 years ago

#24256 closed enhancement (fixed)

Deprecate sage.structure.element.generic_power

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-8.2
Component: coercion Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: f855f20 (Commits) Commit: f855f208243324d4038306cb8d0f4a56eae2738e
Dependencies: Stopgaps:

Description

In #24247, the implementation of generic_power was moved to a new module sage.arith.power. The old implementation should be deprecated. This is done in a separate ticket instead of #24247 because that ticket already does a lot.

Change History (14)

comment:1 Changed 3 years ago by jdemeyer

  • Dependencies changed from #24247 to #5574

comment:2 Changed 3 years ago by jdemeyer

  • Branch set to u/jdemeyer/ticket/24256

comment:3 Changed 3 years ago by git

  • Commit set to 6f5a9982408e133faa781f0fda03db7b9cb1d76f

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

6f5a998Deprecate sage.structure.element.generic_power

comment:4 Changed 3 years ago by jdemeyer

  • Status changed from new to needs_review

comment:5 Changed 3 years ago by git

  • Commit changed from 6f5a9982408e133faa781f0fda03db7b9cb1d76f to 64837df2c32641a257082b63ed3a3f1b9f80007d

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

64837dfDeprecate sage.structure.element.generic_power

comment:6 Changed 3 years ago by jdemeyer

  • Dependencies #5574 deleted

comment:7 follow-up: Changed 3 years ago by tscrim

  • Milestone changed from sage-8.1 to sage-8.2
  • Reviewers set to Travis Scrimshaw

I believe you are still missing one in schemes/morphism.py:

from sage.structure.element import (AdditiveGroupElement, RingElement,
        Element, generic_power, parent, coercion_model)

From the old patchbot reports, there are also some deprecation warnings popping up for NTL. The only plausible reason I can see from grepping is it is fixed by #5574.

Also, I don't understand why you did not make the change in groups/generic.py?

comment:8 in reply to: ↑ 7 ; follow-up: Changed 3 years ago by jdemeyer

Replying to tscrim:

Also, I don't understand why you did not make the change in groups/generic.py?

What is "the change"? I kept the import because some code might be importing power from that module. But it's the same generic_power function, so it's still deprecated (as indicated by the comment).

comment:9 in reply to: ↑ 8 ; follow-up: Changed 3 years ago by tscrim

Replying to jdemeyer:

Replying to tscrim:

Also, I don't understand why you did not make the change in groups/generic.py?

What is "the change"?

-from sage.structure.element import generic_power
+from sage.arith.power import generic_power

I kept the import because some code might be importing power from that module. But it's the same generic_power function, so it's still deprecated (as indicated by the comment).

I see, you are de facto deprecating the import from there as well.

comment:10 in reply to: ↑ 9 Changed 3 years ago by jdemeyer

Replying to tscrim:

I see, you are de facto deprecating the import from there as well.

Yes, exactly.

comment:11 Changed 3 years ago by git

  • Commit changed from 64837df2c32641a257082b63ed3a3f1b9f80007d to f855f208243324d4038306cb8d0f4a56eae2738e

Branch pushed to git repo; I updated commit sha1. New commits:

f855f20Further fixes to generic_power use

comment:12 Changed 3 years ago by jdemeyer

Green bot now.

comment:13 Changed 3 years ago by tscrim

  • Status changed from needs_review to positive_review

Thanks.

comment:14 Changed 3 years ago by vbraun

  • Branch changed from u/jdemeyer/ticket/24256 to f855f208243324d4038306cb8d0f4a56eae2738e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.