What is your suggestion?
This request came up from working on renaming "python_requires" package (see #20076 for reference).
My "python_requires" package (let call it my-package) provides a class (let call it MyRecipe) that used through python_requires_extend. This MyRecipe class accesses self.python_requires["my-package"].path and this expression must be changed to support new and old names.
My current solution is to do this:
if 'my-package' in dict(self.python_requires.items()):
use(self.python_requires['my-package'].path)
else:
use(self.python_requires['my-new-package'].path)
However it would be better way to simply do this:
if 'my-package' in self.python_requires:
use(self.python_requires['my-package'].path)
else:
use(self.python_requires['my-new-package'].path)
Have you read the CONTRIBUTING guide?
What is your suggestion?
This request came up from working on renaming "python_requires" package (see #20076 for reference).
My "python_requires" package (let call it
my-package) provides a class (let call itMyRecipe) that used throughpython_requires_extend. ThisMyRecipeclass accessesself.python_requires["my-package"].pathand this expression must be changed to support new and old names.My current solution is to do this:
However it would be better way to simply do this:
Have you read the CONTRIBUTING guide?