-
-
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 DevNull, STDIN, STDOUT, and STDERR to lowercase #25959
Conversation
In that case, shouldn't we make all of these lower-caps instead? (that's how they are in C, for example: stdin / stdout / stderr / stdio / devnull). EDIT: clarification: these aren't constants |
I don't understand what you mean. We don't do that for anything else, and these aren't just for C compatibility. |
base/exports.jl
Outdated
@@ -40,7 +40,7 @@ export | |||
DenseMatrix, | |||
DenseVecOrMat, | |||
DenseVector, | |||
DevNull, | |||
DEVNULL, |
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.
Should move this to the constants block alongside STDOUT
etc.
Most of our global singletons like pipeline(`echo Hello`, stdout=stderr) i.e. temporarily replace |
In the particular example of
Note that the keyword argument value of |
That's only an issue for the method definition, not call sites. In the method definition these default to |
493e85d
to
ee0280f
Compare
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 think there's still some controversy here over whether we want lowercase or uppercase.
Per triage consensus, this now deprecates |
I find this to be rather pleasant. Thanks for doing it despite dissenting, Alex! In 1.0 we could rename DevNullStream to DevNull. Not sure if that’s even a public name. |
be5bed1
to
818b8ce
Compare
Hm, looks like there's an issue building the docs. I'm not sure what the deal is yet. EDIT: I think it's a Documenter thing. |
a14aa17
to
0f5d47b
Compare
Okay, doc building is apparently still an issue, even after updating Documenter. |
In case you already didn't come to the same conclusion:
It works fine on Edit: here's the error (I think)
|
Hm, somewhere it's using |
This is because binding deprecations only work with constants. The simplest fix is to also update the old names in reinit_stdio in libuv.jl. But of course that won't handle any other cases of changing the variables. |
They are changed to acquire more functionality after bootstrap, and they're changed by the |
Are you close here or should I make the remaining change? |
Sorry, been distracted with other things. If you know what needs to happen then go for it. |
This includes bumping the Documenter requirement to 0.13.2, which contains similar changes for usages of these names as variables
Will do. |
0f5d47b
to
06c8e34
Compare
06c8e34
to
d564af7
Compare
julia> print(STDOUT, "foo")
WARNING: Base.STDOUT is deprecatednothing
in module Main
foo |
(Unfortunately, this PR is going to cause an huge number of deprecation warnings, and just switching to lowercase and doing |
Why can't |
Because functions like |
That is annoying. I'm not sure what we can do about it though. |
I thought about using |
How about making |
Seems like we could have Compat override the |
This has the critically unfortunate consequence of conflicting with |
Note that the SciPy |
Sorry for jumping in here so late, but what about |
That is a constant so how does the discussion here apply? |
ah, I see:
Thanks. |
* Adjust some uses of std(in|out|err) as a variable name This includes bumping the Documenter requirement to 0.13.2, which contains similar changes for usages of these names as variables
EDIT: Initially this PR was just to capitalize
DevNull
but the intent has since changed. The text below summarizes the initial state of the PR.This is consistent with the other stream constants, i.e.
STDOUT
,STDIN
, andSTDERR
, and indeed this was a violation of the typical style of all-caps constants.Fixes #25786.