Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add SPEC7: Seeding pseudo-random number generation #180
Add SPEC7: Seeding pseudo-random number generation #180
Changes from all commits
b233242
1e0d3f9
009453f
cfa4fd8
9bf299a
fb64c31
d55c0b2
935fed2
a17eba9
0703ee8
3fd8fc7
7c163df
e2d6541
9894af0
8d89cc8
151d68d
5491549
f4cf078
9d60785
7531111
c196b74
415f173
efc6428
83a1d92
7a4258e
4679d40
14ab4a4
07a2235
07744f2
be41cd6
4b1c1c4
a6e1caa
38341b1
63a7bf5
ef35bb9
4f8a441
e6cf422
a7d844f
83b28b6
cef9c51
f894a7a
044ff76
27934c7
636bc5d
bd32f7b
6ec3b6a
4aa7051
37ff883
2dcf128
cc43293
7b4c61b
ab3f448
0ae7919
b7ddc1f
81da885
b106497
1180190
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why using the deprecated keyword shouldn't also be a
FutureWarning
when using the deprecated position is. It's both aimed at end users (Python warning categories).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll let @mdhaber take that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not familiar with that being the official distinction. This was written based on what I've seen in SciPy.
In our release notes, there is a standard note about users checking for
DeprecationWarning
s:In SciPy, I have always seen a
DeprecationWarning
when something is going to raise an error in the future (i.e. in line with Hinsen principle) and aFutureWarning
when something is going to change behavior but not raise an error (i.e. in violation of the Hinsen principle).Often
DeprecationWarning
s are used for functions and keywords being removed.FutureWarning
s are a lot less common. Here's an example of a decision made between the two.In this case, a keyword is being removed in the sense that if a user passes
random_state=10
they will get an error, so SciPy would probably emit aDeprecationWarning
. If they pass10
torandom_state
by position, on the other hand, they will not get an error in the future, but the behavior will change, so SciPy would probably emit aFutureWarning
.I suppose we can mention that projects are welcome to follow their conventions about which type of warning to emit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main important distinction here seem to be: by default, users won't see the
DeprecationWarning
s (without explicitly hunting for them with-Wd
), whereas they will seeFutureWarning
s "out the box".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's usually why we default to
FutureWarning
in scikit-image. Though, I'm happy for this SPEC to recommend whatever. 😉