-
Notifications
You must be signed in to change notification settings - Fork 36
Export previous public defs #96
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
base: master
Are you sure you want to change the base?
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #96 +/- ##
=======================================
Coverage 93.26% 93.26%
=======================================
Files 16 16
Lines 817 817
Branches 118 118
=======================================
Hits 762 762
Misses 35 35
Partials 20 20 |
|
As I mentioned indirectly in #86 (comment), I’m strongly against re-adding all exports from the original monolithic module. We bumped the major version specifically to define and narrow the public API. Re-exposing legacy imports would effectively commit us to supporting all of those classes and functions indefinitely, which would severely limit our ability to refactor or redesign the internals. So this is a firm NO from my side. |
|
I am fundamentally against breaking functionality for people who depend on mediafile for the sole reason of internal restructuring - when all we have to do is to simply include the previously available API in the Please search GitHub and you will find that multiple projects import these classes/functions that I have re-added. I don't understand what is the drawback for us simply including them in |
|
The main point is that the whole reason we bumped to 1.0.0 was to define and enforce a stable public API. By re-adding internal or legacy exports to Yes, some projects currently import these legacy items, but they were never guaranteed to be stable. Changing an import path or deprecating these internal functions is exactly what a 1.0.0 release is for: it’s the first version where we define what is public and what isn’t. In other words, breaking internal imports is reasonable and expected at this stage. Re-exposing everything in Take for instance #97: if we exported |
|
Can you point me to the discussion where the specifics of what constitutes a stable public API, and what counts as legacy, have been debated, before you decided to remove these imports? I am specifically interested to see the consensus regarding downstream developers that rely on them.
Can you explain how # mediafile/__init__.py
from .fields import MediaField
__all__ = [
...
MediaField,
...
]has any impact on the refactoring that you linked? |
We regard everything defined in Generally downstream users who depend on such private or internal objects (intentionally not defined in
In short, the refactor changes the inheritance hierarchy of the Under semantic versioning, modifying class relationships in a way that breaks inheritance expectations would require a major version bump, provided that |
Export all previously publicly available definitions.
Once this is merged we should be good to go ahead with v1, I think.
Context
I found that
fetchartplugin crashed inbeetsdue to