sagemath/sage

Deprecate is_FiniteField etc., make sage.rings.finite_rings a namespace package

Closed this issue · 30 comments

Part of meta-ticket #32414.

Deprecating is_FiniteField, is_PrimeFiniteField, and is_FiniteFieldElement is done for uniformity but is not needed to support modularization. #32432 shows that sage.rings.finite_rings.finite_field_base (which defines the ABC FiniteField) can be imported without pulling in implementation classes.

sage.rings.finite_rings must become a namespace package because element implementations depend on various libraries.

CC: @dimpase @kwankyu @fchapoton @tscrim

Component: refactoring

Author: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/32664

Description changed:

--- 
+++ 
@@ -1 +1,4 @@
 Part of meta-ticket #32414.
+
+This is done for uniformity but is not needed to support modularization. #32432 shows that `finite_field_base` (which defines `is_FiniteField`) can be imported without pulling in implementation classes.
+

Changed dependencies from #32612 to none

Description changed:

--- 
+++ 
@@ -1,4 +1,5 @@
 Part of meta-ticket #32414.
 
-This is done for uniformity but is not needed to support modularization. #32432 shows that `finite_field_base` (which defines `is_FiniteField`) can be imported without pulling in implementation classes.
+Deprecating `is_FiniteField` is done for uniformity but is not needed to support modularization. #32432 shows that `sage.finitefinite_field_base` (which defines the ABC `FiniteField`) can be imported without pulling in implementation classes.
 
+`sage.rings.finite_rings` must become a namespace package because element implementations depend on various libraries.

Description changed:

--- 
+++ 
@@ -1,5 +1,5 @@
 Part of meta-ticket #32414.
 
-Deprecating `is_FiniteField` is done for uniformity but is not needed to support modularization. #32432 shows that `sage.finitefinite_field_base` (which defines the ABC `FiniteField`) can be imported without pulling in implementation classes.
+Deprecating `is_FiniteField` is done for uniformity but is not needed to support modularization. #32432 shows that `sage.rings.finite_rings.finite_field_base` (which defines the ABC `FiniteField`) can be imported without pulling in implementation classes.
 
 `sage.rings.finite_rings` must become a namespace package because element implementations depend on various libraries.

Description changed:

--- 
+++ 
@@ -1,5 +1,5 @@
 Part of meta-ticket #32414.
 
-Deprecating `is_FiniteField` is done for uniformity but is not needed to support modularization. #32432 shows that `sage.rings.finite_rings.finite_field_base` (which defines the ABC `FiniteField`) can be imported without pulling in implementation classes.
+Deprecating `is_FiniteField` and `is_PrimeFiniteField` is done for uniformity but is not needed to support modularization. #32432 shows that `sage.rings.finite_rings.finite_field_base` (which defines the ABC `FiniteField`) can be imported without pulling in implementation classes.
 
 `sage.rings.finite_rings` must become a namespace package because element implementations depend on various libraries.

Commit: 8af57c4

New commits:

8af57c4sage.rings.finite_rings: Deprecate is_FiniteField, is_PrimeFiniteField

Author: Matthias Koeppe

Description changed:

--- 
+++ 
@@ -1,5 +1,5 @@
 Part of meta-ticket #32414.
 
-Deprecating `is_FiniteField` and `is_PrimeFiniteField` is done for uniformity but is not needed to support modularization. #32432 shows that `sage.rings.finite_rings.finite_field_base` (which defines the ABC `FiniteField`) can be imported without pulling in implementation classes.
+Deprecating `is_FiniteField`, `is_PrimeFiniteField`, and `is_FiniteFieldElement` is done for uniformity but is not needed to support modularization. #32432 shows that `sage.rings.finite_rings.finite_field_base` (which defines the ABC `FiniteField`) can be imported without pulling in implementation classes.
 
 `sage.rings.finite_rings` must become a namespace package because element implementations depend on various libraries.

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

98b433csage.rings.finite_rings: Make it a namespace package
6323775src/sage/rings/finite_rings/finite_field_constructor.py: Restore re-export of is_FiniteField
473e9d4src/sage/rings/finite_rings/hom_finite_field.pyx: Import ABC as FiniteField_base
b82fb1esage.rings.finite_rings: Deprecate is_FiniteFieldElent

Changed commit from 8af57c4 to b82fb1e

Changed commit from b82fb1e to 106b22e

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

106b22eFixups

Changed commit from 106b22e to de5cfad

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

de5cfadFixups

Changed commit from de5cfad to 429b372

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

429b372Fixup: Elements of finite fields are not instances of FieldElement

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

e633d8fsrc/sage/crypto/mq/rijndael_gf.py: Fix imports

Changed commit from 429b372 to e633d8f

Changed commit from e633d8f to 886bc1a

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

886bc1asrc/sage/crypto/mq/rijndael_gf.py: Fix imports
comment:16

shouldn't this branch be based on #34804 ?

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

53ede8csage.rings.finite_rings: Deprecate is_FiniteField, is_PrimeFiniteField
8d4d8e5sage.rings.finite_rings: Make it a namespace package
6ce26bcsrc/sage/rings/finite_rings/finite_field_constructor.py: Restore re-export of is_FiniteField
98a5484src/sage/rings/finite_rings/hom_finite_field.pyx: Import ABC as FiniteField_base
2e6b5efsage.rings.finite_rings: Deprecate is_FiniteFieldElent
3be7c97Fixups
97a363eFixups
0c01403Fixup: Elements of finite fields are not instances of FieldElement
9f4d1c4src/sage/crypto/mq/rijndael_gf.py: Fix imports

Changed commit from 886bc1a to 9f4d1c4

comment:18

Replying to Dima Pasechnik:

shouldn't this branch be based on #34804 ?

There's no relation. #34804 merges cleanly with this branch

Changed commit from 9f4d1c4 to 9ebadcf

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

9ebadcfMerge tag '9.8.beta6' into t/32664/add_sage_rings_abc_finitefield__deprecate_is_finitefield

Tests ran successfully in https://github.com/sagemath/sagetrac-mirror/actions/runs/3860089783 (before the migration).

Needs review

Removed branch from issue description; replaced by PR #35119