Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork937
Should the effect version stamping achieves be preserved?#1895
-
Much of the dynamic logic in From the discussion there, it seems a goal is to have Changes in#1886 have the additional effect of making it so this can be done at any time, since there is already a mechanism in place, and in use for some other attributes, to provide dynamically computed attributes of the top-level The question is what the logic should actually be. A common and straightforward approach is to simply use def__getattr__(name):ifname=="__version__":warnings.warn("Accessing jsonschema.__version__ is deprecated and will be ""removed in a future release. Use importlib.metadata directly ""to query for jsonschema's version.",DeprecationWarning,stacklevel=2, )fromimportlibimportmetadatareturnmetadata.version("jsonschema")elif ... This can of course be done without deprecating However, it may not always work quite how one wants. For example, if one makes an editable install, and then pulls changes that increase the version number, the old version number that was installed with will still be used. This could be confusing, and this sort of thing may have been part of why the complex version stamping logic in I believe, though, that we can achieve something effectively equivalent to that, by using other facilities of That the version If GitPython is also to deprecate What should be done here? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment
-
Thanks for bringing this up! To me it seems going with the simple versionand deprecating Thanks to your work, in huge parts, I think using deprecations generously leads the way to an eventual version 4.0 with moderately breaking changes, for a GitPython that will feel more modern than ever. |
BetaWas this translation helpful?Give feedback.