You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
importlib_metadata.metadata("") start raising ValueError since 4.12.0 #395
it is possible to restore old behaviour for old version of python to not break existing code? I understand that new version of libraries should be fixed, but such updates should not break existing code.
The fact that metadata("") or metadata(None) did not raise an error was a bug and probably didn't do what you intended it to do. It was unexpected that users would rely on this behavior, which is why it was released as a minor release and not a major (breaking) release. I'd suggest to pin to importlib_metadata<4.12 in affected environments to work around the issue.
Because it was a backward-incompatible change introduced in a point release, it's conceivable that we should roll back the change, and then re-apply the change in a major release (5.0), but I suspect that wouldn't help your situation. Would that help any more than for you to pin to <4.12?
it is possible to restore old behaviour for old version of python to not break existing code?
importlib_metadata attempts to provide a uniform implementation across all versions of Python and does not wish to provide divergent implementations based on Python versions.
The core problem for us is that it affects the already released version that is available on pypi. New releases are working, but in science, it sometimes needs to install old releases for reproducibility. But if you think that such change is wrong we will try to put proper information in documentation.
New releases are working, but in science, it sometimes needs to install old releases for reproducibility.
I understand reproducibility is important. In that case, the best thing to do to maintain reproducibility and compatibility is not to update importlib_resources (keep the pin to <4.12).
But if you think that such change is wrong we will try to put proper information in documentation.
Indeed, I don't see a way short of restoring the prior behavior and re-introducing the bug. I'm not sure what documentation you speak of, but yes, I'd recommend to link to this issue to inform any users affected. Thanks.
Activity
jaraco commentedon Jul 29, 2022
The fact that
metadata("")ormetadata(None)did not raise an error was a bug and probably didn't do what you intended it to do. It was unexpected that users would rely on this behavior, which is why it was released as a minor release and not a major (breaking) release. I'd suggest to pin toimportlib_metadata<4.12in affected environments to work around the issue.Because it was a backward-incompatible change introduced in a point release, it's conceivable that we should roll back the change, and then re-apply the change in a major release (5.0), but I suspect that wouldn't help your situation. Would that help any more than for you to pin to <4.12?
importlib_metadataattempts to provide a uniform implementation across all versions of Python and does not wish to provide divergent implementations based on Python versions.Czaki commentedon Jul 29, 2022
The core problem for us is that it affects the already released version that is available on pypi. New releases are working, but in science, it sometimes needs to install old releases for reproducibility. But if you think that such change is wrong we will try to put proper information in documentation.
jaraco commentedon Jul 29, 2022
I understand reproducibility is important. In that case, the best thing to do to maintain reproducibility and compatibility is not to update importlib_resources (keep the pin to
<4.12).Indeed, I don't see a way short of restoring the prior behavior and re-introducing the bug. I'm not sure what documentation you speak of, but yes, I'd recommend to link to this issue to inform any users affected. Thanks.