[Rpm-maint] [rpm-software-management/rpm] pythondistdeps: Switch to importlib.metadata (#1317)

torsava notifications at github.com
Tue Sep 29 08:27:10 UTC 2020


@torsava commented on this pull request.



>  from warnings import warn
 
+try:
+    from importlib.metadata import PathDistribution
+except ImportError:
+    from importlib_metadata import PathDistribution
+
+try:
+    from pathlib import Path
+except ImportError:
+    from pathlib2 import Path
+
+
+class Req(Requirement):
+    @property
+    def key(self):
+        return self.name.lower().replace('_', '-')

@s-t-e-v-e-n-k I wasn't against ceasing to use the `key` property, I was against passing different values in it's place. The name of the property/function is immaterial.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1317#discussion_r496524935
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200929/a06c0d9d/attachment.html>


More information about the Rpm-maint mailing list