Skip to content

What does "Use Vendor the code instead" mean? #23244

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

Closed
pllim opened this issue Jun 10, 2022 · 3 comments
Closed

What does "Use Vendor the code instead" mean? #23244

pllim opened this issue Jun 10, 2022 · 3 comments

Comments

@pllim
Copy link

pllim commented Jun 10, 2022

We started getting this deprecation warning but I don't know what to do with it. Is there somewhere in your documentation that would explain this more? Thanks! Example log: https://github.com/astropy/astropy/runs/6838665326?check_suite_focus=true

matplotlib._api.deprecation.MatplotlibDeprecationWarning: The checkdep_usetex function
was deprecated in Matplotlib 3.6 and will be removed two minor releases later.
Use Vendor the code instead.

We use it like this:

 TEX_UNAVAILABLE = not matplotlib.checkdep_usetex(True)

Hard to tell from the traceback where this is coming from inside matplotlib because the warning went through a generic matplotlib/_api/deprecation.py.

@timhoffm
Copy link
Member

timhoffm commented Jun 10, 2022

@pllim Sorry for the confusion. The message is a bit awkward because it’s generated via a template.

checkdep_usetex was not intended as public API and we are going to remove it. If you need the functionality you should take a copy of the code and maintain it yourself.

@pllim
Copy link
Author

pllim commented Jun 11, 2022

That is unfortunate. Won't that promote code duplication, especially since you'll still be using it internally anyway? Anyways, my original question is answered, so I am closing the issue. Thanks!

@jklymak
Copy link
Member

jklymak commented Jun 11, 2022

Downstream libraries (or anyone) are certainly welcome to use our private methods. We simply don't guarantee their stability. If you want to avoid the warning just use the private method (but don't raise an issue if it breaks in the future).

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

No branches or pull requests

3 participants