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

Dropping 0.4 #372

Merged
merged 14 commits into from
Jul 19, 2017
Merged

Dropping 0.4 #372

merged 14 commits into from
Jul 19, 2017

Conversation

rofinn
Copy link
Contributor

@rofinn rofinn commented Jun 21, 2017

I'll leave updating the test cases till after this has been reviewed to minimize breaking existing functionality.

Fixes #361

@tkelman tkelman requested review from timholy and tkelman June 21, 2017 20:15
@stevengj
Copy link
Member

Don't forget to remove things from the README that are no longer needed for v0.5+.

README.md Outdated
@@ -119,8 +94,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* `foreach`, similar to `map` but when the return value is not needed ([#13744])
Copy link
Member

@stevengj stevengj Jun 22, 2017

Choose a reason for hiding this comment

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

foreach (JuliaLang/julia#13774) was added in 0.5 too.

README.md Outdated
@@ -119,8 +94,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* `foreach`, similar to `map` but when the return value is not needed ([#13744])

* `walkdir`, returns an iterator that walks the directory tree of a directory ([#13707])

* `allunique`, checks whether all elements in an iterable appear only once ([#15914])
Copy link
Member

Choose a reason for hiding this comment

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

allunique was added in 0.5

README.md Outdated
@@ -119,8 +94,6 @@ Currently, the `@compat` macro supports the following syntaxes:

* `foreach`, similar to `map` but when the return value is not needed ([#13744])

* `walkdir`, returns an iterator that walks the directory tree of a directory ([#13707])

* `allunique`, checks whether all elements in an iterable appear only once ([#15914])

* `Base.promote_eltype_op` is available as `Compat.promote_eltype_op`
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
* `bytestring(::Ptr, ...)` has been replaced with `unsafe_string`

* `super` is now `supertype` ([#14338])

* `qr(A, pivot=b)` is now `qr(A, Val{b})`, likewise for `qrfact` and `qrfact!`
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
* `Compat.LinAlg.checksquare` ([#14601])

* `issym` is now `issymmetric` ([#15192])

* `istext` is now `istextmime` ([#15708])
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
* `istext` is now `istextmime` ([#15708])

* `symbol` is now `Symbol` ([#16154])

* `write(::IO, ::Ptr, len)` is now `unsafe_write` ([#14766])
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
* `slice` is now `view` ([#16972]); do `import Compat.view` and then use `view` normally without the `@compat` macro

* `fieldoffsets` has been deprecated in favor of `fieldoffset` ([#14777])

* `print_escaped` is now another method of `escape_string`, `print_unescaped` a method of `unescape_string`, and `print_joined` a method of `join` ([#16603])
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
* `slice` is now `view` ([#16972]); do `import Compat.view` and then use `view` normally without the `@compat` macro

* `fieldoffsets` has been deprecated in favor of `fieldoffset` ([#14777])

* `print_escaped` is now another method of `escape_string`, `print_unescaped` a method of `unescape_string`, and `print_joined` a method of `join` ([#16603])

* `writemime` has been merged into `show` ([#16563]). Note that to extend this function requires `@compat`; see the [Supported Syntax](#supported-syntax) section for more information
Copy link
Member

Choose a reason for hiding this comment

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

renamed in 0.5

README.md Outdated
@@ -221,8 +169,6 @@ Currently, the `@compat` macro supports the following syntaxes:

## New macros

* `@static` has been added ([#16219])

* `@functorize` (not present in any Julia version) takes a function (or operator) and turns it into a functor object if one is available in the used Julia version. E.g. something like `mapreduce(Base.AbsFun(), Base.MulFun(), x)` can now be written as `mapreduce(@functorize(abs), @functorize(*), x)`, and `f(::Base.AbsFun())` as `f(::typeof(@functorize(abs)))`, to work across different Julia versions. `Func{1}` can be written as `supertype(typeof(@functorize(abs)))` (and so on for `Func{2}`), which will fall back to `Function` on Julia 0.5.
Copy link
Member

Choose a reason for hiding this comment

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

@functorize is obsolete in 0.5

Copy link
Contributor

Choose a reason for hiding this comment

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

the no-op should probably be left in but with a deprecation warning to avoid hard-breaking anyone that was using it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For 0.5+ the existing code does:

macro functorize(f)
    f === :scalarmax       ? :(Base.scalarmax) :
    f === :scalarmin       ? :(Base.scalarmin) :
    f === :centralizedabs2fun ? :(primarytype(typeof(Base.centralizedabs2fun(0)))) :
    f
end

Should this be changed to something like:

macro functorize(f)
    return quote
        Base.depwarn("@functorize is obsolete as of 0.5", Symbol("@functorize"))
        f
    end
end

?

README.md Outdated
@@ -221,8 +169,6 @@ Currently, the `@compat` macro supports the following syntaxes:

## New macros

* `@static` has been added ([#16219])

* `@functorize` (not present in any Julia version) takes a function (or operator) and turns it into a functor object if one is available in the used Julia version. E.g. something like `mapreduce(Base.AbsFun(), Base.MulFun(), x)` can now be written as `mapreduce(@functorize(abs), @functorize(*), x)`, and `f(::Base.AbsFun())` as `f(::typeof(@functorize(abs)))`, to work across different Julia versions. `Func{1}` can be written as `supertype(typeof(@functorize(abs)))` (and so on for `Func{2}`), which will fall back to `Function` on Julia 0.5.

* `Compat.@blasfunc` makes functionality of `Base.LinAlg.BLAS.@blasfunc` available on older Julia versions
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
`Base.FS` on Julia 0.4 and `Base.Filesystem` on Julia 0.5.

* `cov` and `cor` don't allow keyword arguments anymore. Loading Compat defines compatibility methods for the new API ([#13465])

* On versions of Julia that do not contain a Base.Threads module, Compat defines a Threads module containing a no-op `@threads` macro.

* `Base.SingleAsyncWork` is now `Base.AsyncCondition`
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
`Base.SingleAsyncWork` on Julia 0.4 and `Base.AsyncCondition` on Julia 0.5.

* `repeat` now accepts any `AbstractArray` ([#14082]): `Compat.repeat` supports this new API on Julia 0.4, and calls `Base.repeat` on 0.5.
`Base.AsyncCondition` on Julia 0.5.

* `OS_NAME` is now `Sys.KERNEL`. OS information available as `is_apple`, `is_bsd`, `is_linux`, `is_unix`, and `is_windows` ([#16219])
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

README.md Outdated
`Base.SingleAsyncWork` on Julia 0.4 and `Base.AsyncCondition` on Julia 0.5.

* `repeat` now accepts any `AbstractArray` ([#14082]): `Compat.repeat` supports this new API on Julia 0.4, and calls `Base.repeat` on 0.5.
`Base.AsyncCondition` on Julia 0.5.

* `OS_NAME` is now `Sys.KERNEL`. OS information available as `is_apple`, `is_bsd`, `is_linux`, `is_unix`, and `is_windows` ([#16219])

* `cholfact`, `cholfact!`, and `chol` require that input is either `Hermitian`, `Symmetric`
Copy link
Member

Choose a reason for hiding this comment

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

added in 0.5

@rofinn rofinn changed the title WIP: Dropping 0.4 Dropping 0.4 Jun 25, 2017
@rofinn
Copy link
Contributor Author

rofinn commented Jun 25, 2017

Travis failed to download nightly on macos.

@rofinn
Copy link
Contributor Author

rofinn commented Jun 30, 2017

Does anyone see any other issues with this?

@@ -81,31 +73,12 @@ Currently, the `@compat` macro supports the following syntaxes:

* `@compat Base.IndexStyle(::Type{<:MyArray}) = IndexLinear()` and `@compat Base.IndexStyle(::Type{<:MyArray}) = IndexCartesian()` to define traits for abstract arrays, replacing the former `Base.linearindexing{T<:MyArray}(::Type{T}) = Base.LinearFast()` and `Base.linearindexing{T<:MyArray}(::Type{T}) = Base.LinearSlow()`, respectively.

* `Compat.collect(A)` returns an `Array`, no matter what indices the array `A` has (Julia 0.5 and higher). [#21257]
Copy link
Contributor

Choose a reason for hiding this comment

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

this seems recent, it just never worked for 0.4?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this should just remove the (Julia 0.5 and higher part).

end
include("ngenerate.jl")
using .CompatCartesian
export @ngenerate, @nsplat
Copy link
Contributor

Choose a reason for hiding this comment

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

should deprecate these

src/Compat.jl Outdated
@@ -690,79 +256,10 @@ end

export @functorize
macro functorize(f)
Copy link
Contributor

Choose a reason for hiding this comment

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

should deprecate this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should this be moved to to-be-deprecated.jl then?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah good idea, since I don't think we want to keep this around forever

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On a similar note, should we merge to-be-deprecated.jl and ngenerate.jl into a deprecated.jl file?

@ararslan
Copy link
Member

This looks good to me; I think we should go ahead and merge this. Any objections or further comments?

@tkelman
Copy link
Contributor

tkelman commented Jul 16, 2017

I'm a little concerned that the deprecations being introduced may never be fixed on 0.5 if packages have moved on to being 0.6-only already. Maybe we should make the deprecation warning 0.6-only since they won't be removed until an 0.6-only version of Compat gets released.

@rofinn
Copy link
Contributor Author

rofinn commented Jul 17, 2017

@tkelman Would you be comfortable with an explicit if block in each deprecation?
Example)

if VERSION >= v"0.6.0"
    Base.depwarn(...)
end
# code

@tkelman
Copy link
Contributor

tkelman commented Jul 17, 2017

yeah that would be fine imo

src/Compat.jl Outdated
const view = slice
end
const UTF8String = Core.String
const ASCIIString = Core.String
Copy link
Contributor

Choose a reason for hiding this comment

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

we should probably move these to deprecated.jl, have them const for 0.5, deprecate_binding for 0.6

end
else
new_style_call_overload(ex::Expr) = false
function new_style_call_overload(ex::Expr)
Copy link
Contributor

Choose a reason for hiding this comment

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

just in case anyone was calling it from other packages?

Copy link
Contributor Author

@rofinn rofinn Jul 18, 2017

Choose a reason for hiding this comment

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

Yeah, I'm not sure why they would, but I figured I should try to err on the side of caution.

@tkelman
Copy link
Contributor

tkelman commented Jul 18, 2017

Thanks so much for doing this! I think we're good to go here.

@ararslan
Copy link
Member

I'll wait on #380 and rebase it once this is merged. Easier to rebase that than this.

@ararslan ararslan merged commit bdf61d8 into JuliaLang:master Jul 19, 2017
@yuyichao yuyichao mentioned this pull request Jul 23, 2017
martinholters added a commit that referenced this pull request Aug 27, 2018
* new style call overloading (added in #181, removed in #385)
* `get(io, s false)` (added in #212, #215, #225, removed in #385)
* `.=` (added in #292 and #316, removed in #372)
martinholters added a commit that referenced this pull request Aug 31, 2018
* Remove at-compat for type aliases

  Was added in #326, now obsolete as no longer required on minimum
  supported Julia version 0.6.

* Remove at-compat for Nullable construction

  Was added in #287, now obsolete as no longer required on minimum 
  supported Julia version 0.6.

* Remove at-compat for Foo{<:Bar} sugar

  Was added in #317 (and #336), now obsolete as no longer required on 
  minimum supported Julia version 0.6.

* Remove at-compat for index styles

  Was added in #329, now obsolete as no longer required on minimum 
  supported Julia version 0.6.

* Remove at-compat for type declarations

  Was added in #325, now obsolete as no longer required on minimum 
  supported Julia version 0.6.

* Remove unused at-compat helper functions

* Remove README entries for removed at-compat functionality

  * new style call overloading (added in #181, removed in #385)
  * `get(io, s false)` (added in #212, #215, #225, removed in #385)
  * `.=` (added in #292 and #316, removed in #372)

* Remove `Compat.collect(A)`

  Was added in #350 and #351, now obsolete as no longer required on 
  minimum supported Julia version 0.6.
martinholters added a commit that referenced this pull request Oct 8, 2019
martinholters added a commit that referenced this pull request Oct 8, 2019
martinholters added a commit that referenced this pull request Oct 13, 2019
* Bump required Julia version to 1.0

* Remove compatibility support code for:
  * `at-__MODULE__` (from #363)
  * `devnull`, `stdin`, `stdout`, and `stderr` from #499
  * `at-nospecialize` (from #385 and #409)
  * `isabstracttype` and `isconcretetype` (from #477)
  * `invokelatest` from #424
  * array-like access to `Cmd` from #379
  * `Val(n)` and `ntuple`/`reshape` with `Val` from #381 and #399
  * `logdet(::Any)` fallback from #382
  * `chol(::UniformScaling)` from #382
  * `pushfirst!`, `popfirst!` from #444
  * `fieldcount` from #386
  * `read(obj, ::Type{String})` from #385 and #580
  * `InexactError`, `DomainError`, and `OverflowError` constructors from #393
  * `corrected` kw arg to `cov` from #401
  * `adjoint` from #401
  * `partialsort` from #401
  * `pairs` from #428
  * `AbstractRange` from #400
  * `rtoldefault` from #401
  * `Dates.Period` rounding from #462
  * `IterativeEigensolvers` from #435
  * `occursin` from #520
  * `Char` concatenation from #406
  * `BitSet` from #407
  * `diagm` and `spdiagm` with pairs from #408
  * `Array` c'tors from `UniformScaling` from #412 and #438
  * `IOContext` ctor taking pairs from #427
  * `undef` from #417 and #514
  * `get` on `ENV` from #430
  * `ComplexF...` from #431
  * `tr` from #614
  * `textwidth` from #644
  * `isnumeric` from #543
  * `AbstractDict` from #435
  * `axes` #435 and #442
  * `Nothing` and `Cvoid` from #435
  * `Compat.SuiteSparse` from #435
  * `invpermute!` from #445
  * `replace` with a pair from #445
  * `copyto!` from #448
  * `contains` from #452
  * `CartesianIndices` and `LinearIndices` from #446, #455, and #524
  * `findall` from #466 (and #467).
  * `argmin` and `argmax` from #470, #472, and #622
  * `parentmodule` from #461
  * `codeunits` from #474
  * `nameof` from #471
  * `GC` from #477
  * `AbstractDisplay` from #482
  * `bytesavailable` from #483
  * `firstindex` and `lastindex` from #480 and #494
  * `printstyled` from #481
  * `hasmethod` from #486
  * `objectid` from #486
  * `Compat.find*` from #484 and #513
  * `repr` and `showable` from #497
  * `Compat.names` from #493 and #505
  * `Compat.round` and friends #500, #530, and #537
  * `IOBuffer` from #501 and #504
  * `range` with kw args and `LinRange` from #511
  * `cp` and `mv` from #512
  * `indexin` from #515
  * `isuppercase` and friends from #516
  * `dims` and `init` kwargs from #518, #528, #590, #592, and #613
  * `selectdim` from #522 and #531
  * `repeat` from #625
  * `fetch(::Task)` from #549
  * `isletter` from #542
  * `isbitstype` from #560
  * `at-cfunction` from #553 and #566
  * `codeunit` and `thisind` and friends from #573
  * `something` from #562
  * `permutedims` from #582
  * `atan` from #574
  * `split` and `rsplit` from #572
  * `mapslices` from #588
  * `floatmin` and `floatmax` from #607
  * `dropdims` from #618
  * required keyword arguments from #586
  * `CartesianRange` in `at-compat` from #377
  * `finalizer` from #416
  * `readline`, `eachline`, and `readuntil` from #477, #541, and #575
  * curried `isequal`, `==`, and `in` from #517
  * `Some` from #435 and #563
  * `at-warn` and friends from #458

* Remove old deprecations

* Deprecate:
  * `Compat.Sockets` from #545 and #594
  * `TypeUtils` from #304
  * `macros_have_sourceloc` from #355
  * `Compat.Sys` from #380, #433, and #552
  * `Compat.MathConstants` from #401
  * `Compat.Test`, `Compat.SharedArrays`, `Compat.Mmap`, and `Compat.DelimitedFiles` from #404
  * `Compat.Dates` from #413
  * `Compat.Libdl` from #465 (and #467)
  * `AbstractDateTime` from #443
  * `Compat.Printf` from #435
  * `Compat.LinearAlgebra` from #463
  * `Compat.SparseArrays` from #459
  * `Compat.Random` from #460, #601, and #647
  * `Compat.Markdown` from #492
  * `Compat.REPL` from #469
  * `Compat.Serialization` from #473
  * `Compat.Statistics` from #583
  * `Fix2` from #517
  * `Compat.Base64` from #418
  * `Compat.Unicode` from #432 and #507
  * `notnothing` from #435 and #563
  * `Compat.IteratorSize` and `Compat.IteratorEltype` from #451
  * `enable_debug(::Bool)` from #458
  * `Compat.Distributed` from #477
  * `Compat.Pkg` from #485
  * `Compat.InteractiveUtils` from #485
  * `Compat.LibGit2` from #487
  * `Compat.UUIDs` from #490
  * `Compat.qr` from #534
  * `Compat.rmul!` from #546
  * `Compat.norm` abd friends from #577

* Remove obsolete README entry, missed in #385

* Remove obsolete tests (e.g. missed in #372)

* Remove obsolete `VERSION` conditionals and some minor clean-up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants