Open srikanthccv opened 1 year ago
Hi @srikanthccv I am picking this issue #outreachy
@Buduzz Looking at the pull request changes, I don't think you understood the issue. What is needed is the removal of this logic (in all other places), which tries to infer the version by checking the code behavior and introduce the conditional logic by checking the backoff
version using pkg_resources.
@srikanthccv thank you, I'll make the adjustments and revert
I'll just note here that pkg_resources
is deprecated. If you want to look up and parse versions explicitly, this should be done with importlib.metadata
:
In [1]: from importlib.metadata import version
In [2]: version('backoff')
Out[2]: '1.0'
In [1]: from importlib.metadata import version
In [2]: version('backoff')
Out[2]: '2.2.1'
You will likely still need apkg_resources
fallback so long as you are still supporting Python 3.7.
Is this issue resolved? I am looking for a "good first issue" as I have never contributed to open source before.
This is not resolved yet, but there is already one PR attempting to address it, so I suggest you pick another good-first-issue.
@nickstenning
You will likely still need apkg_resources fallback so long as you are still supporting Python 3.7.
Is this not why the backport of importlib_metadata
and importlib_resources
exists?
Side note: This seems to be linked to #2927
@srikanthccv if this issue is still open I would like to work on it?
This is a better way to check for a package version number:
Originally posted by @ocelotl in https://github.com/open-telemetry/opentelemetry-python/issues/2980#issuecomment-1297529699