Skip to content

Commit

Permalink
Remove old deprecations (Nemocas#1605)
Browse files Browse the repository at this point in the history
* Remove old deprecations

* Remove non-existent export

* Replace deprecated uses of `intersection`
  • Loading branch information
lgoettgens authored and ooinaruhugh committed Feb 15, 2024
1 parent e15f098 commit 95660fa
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 130 deletions.
2 changes: 1 addition & 1 deletion docs/src/ideal.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ false
julia> contains(I, J)
true
julia> intersection(I, J) == J
julia> intersect(I, J) == J
true
```

Expand Down
1 change: 0 additions & 1 deletion src/AbstractAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,6 @@ export map_with_section
export map_with_section_from_func
export map1
export map2
export mat
export matrix
export matrix_repr
export matrix_ring
Expand Down
84 changes: 0 additions & 84 deletions src/Aliases.jl
Original file line number Diff line number Diff line change
@@ -1,84 +0,0 @@
# for backwards compatibility
Base.@deprecate_binding iscompatible is_compatible
Base.@deprecate_binding isconstant is_constant
Base.@deprecate_binding isdegree is_degree
Base.@deprecate_binding isdivisible_by is_divisible_by
Base.@deprecate_binding isdomain_type is_domain_type
Base.@deprecate_binding isexact_type is_exact_type
Base.@deprecate_binding isgen is_gen
Base.@deprecate_binding ishessenberg is_hessenberg
Base.@deprecate_binding ishnf is_hnf
Base.@deprecate_binding ishomogeneous is_homogeneous
Base.@deprecate_binding isinvertible is_invertible
Base.@deprecate_binding isinvertible_with_inverse is_invertible_with_inverse
Base.@deprecate_binding isirreducible is_irreducible
Base.@deprecate_binding isisomorphic is_isomorphic
Base.@deprecate_binding ismonic is_monic
Base.@deprecate_binding ismonomial is_monomial
Base.@deprecate_binding ismonomial_recursive is_monomial_recursive
Base.@deprecate_binding isnegative is_negative
Base.@deprecate_binding ispopov is_popov
Base.@deprecate_binding ispower is_power
Base.@deprecate_binding isprobable_prime is_probable_prime
Base.@deprecate_binding isreverse is_reverse
Base.@deprecate_binding isrimhook is_rimhook
Base.@deprecate_binding isrref is_rref
Base.@deprecate_binding issnf is_snf
Base.@deprecate_binding issquare is_square
Base.@deprecate_binding issquare_with_sqrt is_square_with_sqrt
Base.@deprecate_binding issquarefree is_squarefree
Base.@deprecate_binding issubmodule is_submodule
Base.@deprecate_binding isterm is_term
Base.@deprecate_binding isterm_recursive is_term_recursive
Base.@deprecate_binding isunit is_unit
Base.@deprecate_binding isunivariate is_univariate
Base.@deprecate_binding isweak_popov is_weak_popov
Base.@deprecate_binding iszero_column is_zero_column
Base.@deprecate_binding iszero_row is_zero_row
Base.@deprecate_binding Localization localization

#
# Some deprecation aliases follow. They use Base.@deprecate_binding instead of @deprecate
# because there are still packages adding methods for them, which would break
# if we used @deprecate. Once those packages are updated, we can switch to
# using @deprecate
#

# Deprecated in 0.27.*

Base.@deprecate_binding MatrixSpace matrix_space

Base.@deprecate_binding PolynomialRing polynomial_ring
Base.@deprecate_binding PowerSeriesRing power_series_ring
Base.@deprecate_binding LaurentPolynomialRing laurent_polynomial_ring
Base.@deprecate_binding LaurentSeriesRing laurent_series_ring
Base.@deprecate_binding LaurentSeriesField laurent_series_field
Base.@deprecate_binding FractionField fraction_field

Base.@deprecate_binding FunctionField function_field
Base.@deprecate_binding RationalFunctionField rational_function_field

Base.@deprecate_binding PolyElem PolyRingElem
Base.@deprecate_binding NCPolyElem NCPolyRingElem
Base.@deprecate_binding MPolyElem MPolyRingElem
Base.@deprecate_binding UnivPolyElem UniversalPolyRingElem
Base.@deprecate_binding LaurentPolyElem LaurentPolyRingElem
Base.@deprecate_binding LaurentMPolyElem LaurentMPolyRingElem

Base.@deprecate_binding UnivPolyRing UniversalPolyRing

Base.@deprecate_binding AbsSeriesRing AbsPowerSeriesRing
Base.@deprecate_binding AbsSeriesElem AbsPowerSeriesRingElem
Base.@deprecate_binding RelSeriesRing RelPowerSeriesRing
Base.@deprecate_binding RelSeriesElem RelPowerSeriesRingElem

Base.@deprecate_binding FreeAssociativeAlgebra free_associative_algebra

Base.@deprecate_binding TotalRingOfFractions total_ring_of_fractions

Base.@deprecate_binding DirectSum direct_sum

# Deprecated in 0.34.*
Base.@deprecate_binding PuiseuxSeriesField puiseux_series_field
Base.@deprecate_binding PuiseuxSeriesRing puiseux_series_ring
Base.@deprecate_binding istrivial is_trivial
29 changes: 0 additions & 29 deletions src/Deprecations.jl
Original file line number Diff line number Diff line change
@@ -1,29 +0,0 @@
# Deprecated in 0.28.*

# we can't use @deprecate because this is also a typename
function ResidueRing(R::Ring, a::RingElement; cached::Bool = true)
Base.depwarn("'ResidueRing(R::Ring, a::RingElement; cached::Bool = true)' is deprecated, use "*
"'residue_ring(R::Ring, a::RingElement; cached::Bool = true)' instead.", :ResidueRing)
return residue_ring(R, a; cached)
end

# we can't use @deprecate because this is also a typename
function ResidueField(R::Ring, a::RingElement; cached::Bool = true)
Base.depwarn("'ResidueField(R::Ring, a::RingElement; cached::Bool = true)' is deprecated, use "*
"'residue_field(R::Ring, a::RingElement; cached::Bool = true)' instead.", :ResidueField)
return residue_field(R, a; cached)
end

# Deprecated in 0.30.*

@deprecate factor(f::FracElem, R::Ring) factor(R, f)

@deprecate factor(f::PolyRingElem, R::Field) factor(R, f)

@deprecate roots(f::PolyRingElem, R::Field) roots(R, f)

# deprecated in 0.32.x
@deprecate mat(f::Map(FPModuleHomomorphism)) matrix(f::Map(FPModuleHomomorphism))

# deprecated in 0.35.x
Base.@deprecate_binding intersection intersect
14 changes: 1 addition & 13 deletions src/Generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -344,23 +344,11 @@ include("generic/Misc/Localization.jl")

# TODO/FIXME: deprecate aliases, remove in the future
import ..AbstractAlgebra: @alias
# Deprecated in 0.35.*
Base.@deprecate_binding ResF EuclideanRingResidueFieldElem
Base.@deprecate_binding ResField EuclideanRingResidueField
Base.@deprecate_binding Res EuclideanRingResidueRingElem
Base.@deprecate_binding ResRing EuclideanRingResidueRing

Base.@deprecate_binding Rat RationalFunctionFieldElem

Base.@deprecate_binding AbsSeriesRing AbsPowerSeriesRing
Base.@deprecate_binding AbsSeriesElem AbsPowerSeriesRingElem
Base.@deprecate_binding RelSeriesRing RelPowerSeriesRing
Base.@deprecate_binding RelSeriesElem RelPowerSeriesRingElem

# Deprecated in 0.34.*
@alias Frac FracFieldElem
@alias FactoredFrac FactoredFracFieldElem

# Deprecated in 0.35.*
Base.@deprecate_binding ResidueField EuclideanRingResidueField
Base.@deprecate_binding ResidueFieldElem EuclideanRingResidueFieldElem
Base.@deprecate_binding ResidueRing EuclideanRingResidueRing
Expand Down
2 changes: 1 addition & 1 deletion test/generic/Ideal-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ end
end
end

@testset "Generic.Ideal.intersection" begin
@testset "Generic.Ideal.intersect" begin
# multivariate
R, (x, y) = polynomial_ring(ZZ, ["x", "y"]; ordering=:degrevlex)

Expand Down
2 changes: 1 addition & 1 deletion test/generic/Module-test.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ end
end
end

@testset "Generic.Module.intersection" begin
@testset "Generic.Module.intersect" begin
for R in [ZZ, QQ]
for iter = 1:100
M = rand_module(R, -10:10)
Expand Down

0 comments on commit 95660fa

Please sign in to comment.