We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
parse(Time, str)
ArgumentException
InexactError
This seems to be a result of #44004 where tryparse was updated to return nothing instead of an InexactError
tryparse
nothing
Julia 1.6.5 and 1.7.2 behaviour:
julia> parse(Time, "13:13:13.13142") ERROR: InexactError: convert(Dates.Decimal3, 13142) Stacktrace: [1] tryparsenext @ /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:153 [inlined] [2] tryparsenext @ /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/io.jl:41 [inlined] [3] macro expansion @ /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/parse.jl:64 [inlined] [4] tryparsenext_core(str::String, pos::Int64, len::Int64, df::DateFormat{Symbol("HH:MM:SS.s"), Tuple{Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.Delim{Char, 1}, Dates.DatePart{'s'}}}, raise::Bool) @ Dates /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/parse.jl:38 [5] macro expansion @ /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/parse.jl:150 [inlined] [6] tryparsenext_internal @ /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/parse.jl:125 [inlined] [7] parse @ /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/parse.jl:282 [inlined] [8] parse(::Type{Time}, str::String) @ Dates /usr/local/julia/share/julia/stdlib/v1.7/Dates/src/parse.jl:281 [9] top-level scope @ REPL[3]:1 julia>
Julia 1.6.6 (and probably 1.7.3) behaviour:
julia> parse(Time, "13:13:13.13142") ERROR: ArgumentError: Unable to parse date time. Expected directive DatePart(s) at char 10 Stacktrace: [1] macro expansion @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:104 [inlined] [2] tryparsenext_core(str::String, pos::Int64, len::Int64, df::DateFormat{Symbol("HH:MM:SS.s"), Tuple{Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.Delim{Char, 1}, Dates.DatePart{'s'}}}, raise::Bool) @ Dates /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:38 [3] macro expansion @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:150 [inlined] [4] tryparsenext_internal @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:125 [inlined] [5] parse @ /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:282 [inlined] [6] parse(::Type{Time}, str::String) @ Dates /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:281 [7] top-level scope @ REPL[3]:1 julia>
related comment: #44004 (comment) related MR where this issue was noticed: JuliaDatabases/LibPQ.jl#248
The text was updated successfully, but these errors were encountered:
I think it still makes sense for tryparse not to raise InexactError, but also that parse should still raise it
parse
Sorry, something went wrong.
No branches or pull requests
This seems to be a result of #44004 where
tryparse
was updated to returnnothing
instead of anInexactError
Julia 1.6.5 and 1.7.2 behaviour:
Julia 1.6.6 (and probably 1.7.3) behaviour:
related comment: #44004 (comment)
related MR where this issue was noticed: JuliaDatabases/LibPQ.jl#248
The text was updated successfully, but these errors were encountered: