)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":31245,"name":"Daniel Bengtsson","email":"dbengt@redhat.com","username":"damani42"},"change_message_id":"a14c4b8e37dc42cadcad6e99f0871f25f33cfd86","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"a6b94e9f_d80a2595","updated":"2022-01-20 10:44:20.000000000","message":"\u003e Patch Set 3:\n\u003e \n\u003e I\u0027ve done similar opportunistic importlib use in some of my projects, you can simply use it if it\u0027s available and fall back to pkg_resources imports if not.\n\nDo you have a link with an example please?","commit_id":"413f27a3c3d8704913bac59ab73c0f2f9c103016"},{"author":{"_account_id":31245,"name":"Daniel Bengtsson","email":"dbengt@redhat.com","username":"damani42"},"change_message_id":"3df2d308937760150844d7c51bc38de9c46367c7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"979ee3f0_249be97d","updated":"2022-01-19 15:29:34.000000000","message":"Any update the patch still relevant?","commit_id":"413f27a3c3d8704913bac59ab73c0f2f9c103016"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"7be8af021c37507dd9994fc43fb76b8597e70a69","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"ec5bce98_cd5840a9","in_reply_to":"979ee3f0_249be97d","updated":"2022-01-19 16:34:50.000000000","message":"No, I haven\u0027t been able to look or think about python packaging for a while. The whole pkg_resources system ends up being very difficult to remove anyway beacuse something else will just end up pull it in incurring the cost. Testing at the time also showed this was slower for python2 but that is less important these days.\n\nIf someone else wants to pick this up again I can try and help with reviews but don\u0027t currently have time to push it along myself.","commit_id":"413f27a3c3d8704913bac59ab73c0f2f9c103016"},{"author":{"_account_id":31245,"name":"Daniel Bengtsson","email":"dbengt@redhat.com","username":"damani42"},"change_message_id":"a057ca2fcf1f73432ec597b907d7cde8e725b7f3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"dc90a185_ce58537c","updated":"2022-02-28 09:24:37.000000000","message":"recheck","commit_id":"0e2ab65098e980dd7534aecd9d5052ad439b7251"}],"pbr/version.py":[{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"d98e2b15d1043002c826d03bcde591e302c505ae","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import operator"},{"line_number":23,"context_line":"import sys"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"import importlib_metadata"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def _is_int(string):"}],"source_content_type":"text/x-python","patch_set":3,"id":"dd7620f5_7e121edb","line":25,"updated":"2022-01-20 15:22:32.000000000","message":"You can do the import like...\n\n    # TODO: simplify this once Python 3.8 is the oldest we support","commit_id":"413f27a3c3d8704913bac59ab73c0f2f9c103016"},{"author":{"_account_id":5263,"name":"Jeremy Stanley","display_name":"fungi","email":"fungi@yuggoth.org","username":"fungi","status":"missing, presumed fed"},"change_message_id":"d98e2b15d1043002c826d03bcde591e302c505ae","unresolved":false,"context_lines":[{"line_number":22,"context_line":"import operator"},{"line_number":23,"context_line":"import sys"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"import importlib_metadata"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def _is_int(string):"}],"source_content_type":"text/x-python","patch_set":3,"id":"0509da2c_d2f28e44","line":25,"updated":"2022-01-20 15:22:32.000000000","message":"try:\n        import importlib.metadata\n        use_importlib \u003d True\n    except ModuleNotFoundError:\n        import pkg_resources\n        use_importlib \u003d False\n\nAnd then wrap the new code in checks for use_importlib with the old code in an else fallback block. Bonus points for moving all the metadata lookup code into isolated functions to better contain the split logic.","commit_id":"413f27a3c3d8704913bac59ab73c0f2f9c103016"}]}
