Skip to content
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 1 argument write. fix #17612 #17654

Merged
merged 1 commit into from
Aug 9, 2016
Merged

Conversation

dhoegh
Copy link
Contributor

@dhoegh dhoegh commented Jul 27, 2016

As Jeff points out in #17612, this is not a good shortcut for writing to STDOUT. To make the mater even worse if write("a") is executed it invokes the method in

write(filename::AbstractString, args...) = open(io->write(io, args...), filename, "w")
. This method will create an empty file named a, while write(1) would write data to STDOUT, this could be quite surprising.

@@ -801,6 +801,8 @@ macro MIME(s)
end
end)

@deprecate write(x) write(STDOUT::IO, x)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably go at the end of the file, I don't think we're going to squeeze in any deprecations right now

@kshyatt kshyatt added the kind:bugfix This change fixes an existing bug label Jul 27, 2016
@dhoegh
Copy link
Contributor Author

dhoegh commented Jul 28, 2016

I have updated to 0.6 deprecation.

@JeffBezanson JeffBezanson added this to the 0.6.0 milestone Jul 28, 2016
@JeffBezanson JeffBezanson merged commit d64cfe4 into JuliaLang:master Aug 9, 2016
@Sacha0 Sacha0 added the needs news A NEWS entry is required for this change label May 14, 2017
Sacha0 added a commit to Sacha0/julia that referenced this pull request May 14, 2017
@Sacha0 Sacha0 added the kind:deprecation This change introduces or involves a deprecation label May 14, 2017
@tkelman tkelman removed the needs news A NEWS entry is required for this change label May 16, 2017
singam-sanjay pushed a commit to singam-sanjay/julia that referenced this pull request May 16, 2017
tkelman pushed a commit that referenced this pull request May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bugfix This change fixes an existing bug kind:deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants