-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Backend name specified as module gets lowercased since 3.9 #28432
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
Comments
For context, this is a problem for us, because: |
I agree third-party backends should be matched case-sensitively (or really, matching python's import system behavior, perhaps https://peps.python.org/pep-0235/ (which may have become obsolete since it was written)). |
@torokati44 The change is intended. According to PEP8 Python module names should be lowercase so your You can workaround this by adding a new |
I see. A warning would have been nice about it though... |
I'll add my opinion that I do not think we should have PEP8's style recommendations override the language implementation, forcing downstream projects to change capitalization. It may be best practice, but it is not universal practice. Our own dependencies do not always have lower case names (looking at Normalizing to lowercase for non |
If someone wishes to change the current behaviour they are welcome to do so. It is not something that I have any interest in doing. |
I think the point is that this is an unannounced regression. Let's re-open to keep discussion going. |
I also think we should respect the casing of external user's requests. I think @ksunden's proposal about distinguishing between
|
Thanks for resolving this so quickly! π |
Uh oh!
There was an error while loading. Please reload this page.
Bug summary
MPLBACKEND="module://foo.Bar"
now tries to import thefoo.bar
module as opposed tofoo.Bar
, as before.Code for reproduction
Actual outcome
foo.bar
is importedExpected outcome
foo.Bar
is importedAdditional information
This probably regressed in #27948.
Operating system
Fedora Linux 39
Matplotlib Version
3.9.0
Matplotlib Backend
No response
Python version
No response
Jupyter version
No response
Installation
None
The text was updated successfully, but these errors were encountered: