-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate prime number functions (isprime
, primes
, primesmask
, factor
)
#16481
Conversation
Cool. This should wait until Primes.jl is registered before merging. edit: |
|
The question is how best to handle deprecations of functions: should we do the same thing as #13897, where we throw an error (instead of |
I actually liked the way you had it where the old functions were just moved to being included from deprecated.jl. No errors that way, just warnings. |
Yeah, I wasn't sure what was the best way (I just copied what Combinatorics.jl did), which is why I kept it as a separate commit. We should figure out a consistent way to do this, especially as we're going to move more stuff out of Base. The trouble is figuring out a way so that doing the correct thing, e.g. something like |
So which (if any?) of these commits is able to do that? |
Once we merge this, my plan is to add something like the following to Primes.jl:
Then |
using |
Okay, so we could use: if VERSION >= v"0.5-dev+XXXX"
if isdefined(Base,:isprime)
import Base: isprime, primes, primesmask, factor
else
export isprime, primes, primesmask, factor
end
end Either way, we still need the commit no for this change. |
Yep. So if we prefer the error-causing version, merge this as is? |
Yes, I think it should be good to go. |
See #16357.
Current functionality has been moved to https://github.com/JuliaMath/Primes.jl