-
-
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
InteractiveUtils.jl: fixes issue where subtypes resolves bindings and causes deprecation warnings #56306
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ViralBShah
added
backport 1.10
Change should be backported to the 1.10 release
backport 1.11
Change should be backported to release-1.11
labels
Oct 24, 2024
@KristofferC I think we need this on both 1.11 and 1.10 - but you would know better. |
Is it possible to get this one into 1.10.6? |
I don't know how to add things to the backports, but if anyone can give me a few instructions ... (i.e. is this a pull request to a specific back ports branch?) I'm happy to help ! |
47 tasks
KristofferC
pushed a commit
that referenced
this pull request
Oct 30, 2024
… causes deprecation warnings (#56306) The current version of `subtypes` will throw deprecation errors even if no one is using the deprecated bindings. A similar bug was fixed in Aqua.jl - https://github.com/JuliaTesting/Aqua.jl/pull/89/files See discussion here: - JuliaIO/ImageMagick.jl#235 (for identifying the problem) - simonster/Reexport.jl#42 (for pointing to the issue in Aqua.jl) - https://github.com/JuliaTesting/Aqua.jl/pull/89/files (for the fix in Aqua.jl) This adds the `isbindingresolved` test to the `subtypes` function to avoid throwing deprecation warnings. It also adds a test to check that this doesn't happen. --- On the current master branch (before the fix), the added test shows: ``` WARNING: using deprecated binding InternalModule.MyOldType in OuterModule. , use MyType instead. Subtypes and deprecations: Test Failed at /home/dgleich/devextern/julia/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:932 Expression: isempty(stderr_content) Evaluated: isempty("WARNING: using deprecated binding InternalModule.MyOldType in OuterModule.\n, use MyType instead.\n") Test Summary: | Fail Total Time Subtypes and deprecations | 1 1 2.8s ERROR: LoadError: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken. in expression starting at /home/dgleich/devextern/julia/stdlib/InteractiveUtils/test/runtests.jl:841 ERROR: Package InteractiveUtils errored during testing ``` --- Using the results of this pull request: ``` @test_nowarn subtypes(Integer); ``` passes without error. The other tests pass too. (cherry picked from commit 20f933a)
Enough to add the label (which is already done). |
KristofferC
pushed a commit
that referenced
this pull request
Oct 30, 2024
… causes deprecation warnings (#56306) The current version of `subtypes` will throw deprecation errors even if no one is using the deprecated bindings. A similar bug was fixed in Aqua.jl - https://github.com/JuliaTesting/Aqua.jl/pull/89/files See discussion here: - JuliaIO/ImageMagick.jl#235 (for identifying the problem) - simonster/Reexport.jl#42 (for pointing to the issue in Aqua.jl) - https://github.com/JuliaTesting/Aqua.jl/pull/89/files (for the fix in Aqua.jl) This adds the `isbindingresolved` test to the `subtypes` function to avoid throwing deprecation warnings. It also adds a test to check that this doesn't happen. --- On the current master branch (before the fix), the added test shows: ``` WARNING: using deprecated binding InternalModule.MyOldType in OuterModule. , use MyType instead. Subtypes and deprecations: Test Failed at /home/dgleich/devextern/julia/usr/share/julia/stdlib/v1.12/Test/src/Test.jl:932 Expression: isempty(stderr_content) Evaluated: isempty("WARNING: using deprecated binding InternalModule.MyOldType in OuterModule.\n, use MyType instead.\n") Test Summary: | Fail Total Time Subtypes and deprecations | 1 1 2.8s ERROR: LoadError: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken. in expression starting at /home/dgleich/devextern/julia/stdlib/InteractiveUtils/test/runtests.jl:841 ERROR: Package InteractiveUtils errored during testing ``` --- Using the results of this pull request: ``` @test_nowarn subtypes(Integer); ``` passes without error. The other tests pass too. (cherry picked from commit 20f933a)
KristofferC
added a commit
that referenced
this pull request
Nov 12, 2024
Backported PRs: - [x] #50832 <!-- Subtype: bug fix for bounds with deeper covariant var --> - [x] #51782 <!-- Fix remove-addrspaces pass in the presence of globals with addrspaces --> - [x] #55720 <!-- Fix `pkgdir` for extensions --> - [x] #55773 <!-- Add compat entry for `Base.donotdelete` --> - [x] #55886 <!-- irrationals: restrict assume effects annotations to known types --> - [x] #55867 <!-- update `hash` doc string: `widen` not required any more --> - [x] #56148 <!-- Make loading work when stdlib deps are missing in the manifest --> - [x] #55870 <!-- fix infinite recursion in `promote_type` for `Irrational` --> - [x] #56252 <!-- REPL: fix brace detection when ' is used for transpose --> - [x] #56264 <!-- inference: fix inference error from constructing invalid `TypeVar` --> - [x] #56276 <!-- move time_imports and trace_* macros to Base but remain owned by InteractiveUtils --> - [x] #56254 <!-- REPL: don't complete str and cmd macros when the input matches the internal name like `r_` to `r"` --> - [x] #56280 <!-- Fix trampoline warning on x86 as well --> - [x] #56304 <!-- typeintersect: more fastpath to skip intersect under circular env --> - [x] #56306 <!-- InteractiveUtils.jl: fixes issue where subtypes resolves bindings and causes deprecation warnings --> - [x] #42080 <!-- recommend explicit `using Foo: Foo, ...` in package code (was: "using considered harmful") --> - [x] #56441 <!-- Profile: mention `kill -s SIGUSR1 julia_pid` for Linux --> - [x] #56511 <!-- The `info` in LAPACK calls should be a Ref instead of a Ptr --> - [x] #55052 <!-- Fix `(l/r)mul!` with `Diagonal`/`Bidiagonal` --> - [x] #52694 <!-- Reinstate similar for AbstractQ for backward compatibility -->
This was referenced Nov 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport 1.10
Change should be backported to the 1.10 release
backport 1.11
Change should be backported to release-1.11
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.
The current version of
subtypes
will throw deprecation errors even if no one is using the deprecated bindings.A similar bug was fixed in Aqua.jl - https://github.com/JuliaTesting/Aqua.jl/pull/89/files
See discussion here:
This adds the
isbindingresolved
test to thesubtypes
function to avoid throwing deprecation warnings. It also adds a test to check that this doesn't happen.On the current master branch (before the fix), the added test shows:
Using the results of this pull request:
passes without error. The other tests pass too.