)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"86e82c9e105aa6be28340fc1bbe6a28485124f1d","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"pkg_resources API is deprecated. Sadly, the new upstream API is not"},{"line_number":10,"context_line":"ideal for DIB cases, as it returns a context-manager-managed path to"},{"line_number":11,"context_line":"allow for cases when resources are in zip files."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Icc2fdbbfb672e2d29f13957367ed31f22ee0a004"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"59628720_f87ea1ef","line":11,"updated":"2024-02-04 23:53:43.000000000","message":"How is this getting installed as a .zip file?  I don\u0027t think that\u0027s something that has ever or will ever work, because all the element resources are in shell and expect relative files to be in the right place?\n\nMy understanding is that wheels are basically not installed as zip files.  If we\u0027re talking about older egg installs, we should definitely be setting zip_safe as \"False\".","commit_id":"9572b4913c2c76868102cab1766ed7883782071b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"6e1e110dea87d0b64a7e1b8ff8008b4db9b93181","unresolved":true,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"pkg_resources API is deprecated. Sadly, the new upstream API is not"},{"line_number":10,"context_line":"ideal for DIB cases, as it returns a context-manager-managed path to"},{"line_number":11,"context_line":"allow for cases when resources are in zip files."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Icc2fdbbfb672e2d29f13957367ed31f22ee0a004"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9d873d2e_f6be2c16","line":11,"in_reply_to":"59628720_f87ea1ef","updated":"2024-02-05 03:18:25.000000000","message":"The main motivation of this PR is to migrate away from the deprecated API once it was pointed out to me. The interface is shaped this way now, and as far as I can tell we can\u0027t opt out.\n\nIt\u0027s good we\u0027ll never hit the \"in a zip file\" case, because that would mean we\u0027d be using more disk space when accessing the resources in those files (because they get unzipped to the disk to a temp location -- which the context manager gives the location to). In the normal case (which sounds like 100% of the time from what you\u0027re saying), it\u0027ll just return the path to the resource you need without doing any extra work (in this case; the context manager does nothing on exit).","commit_id":"9572b4913c2c76868102cab1766ed7883782071b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"89717323678314b4dd5bcc7e4f3d5a496dd37a8b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"93256be3_6d74b494","updated":"2024-02-12 19:32:26.000000000","message":"recheck nodepool images were updates which should fix the dnf issues.","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"532999d18fea70e75cbd8dd335350f52ec1962b4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"521c72f0_598c98fb","updated":"2025-03-24 01:25:03.000000000","message":"recheck","commit_id":"d29a58c362f01c84e7ff78b2577ac11adf98f955"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"cdbf0280ffbd1aca958f3f4a83c19f04b4d03117","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"819e35ad_248e5527","updated":"2025-06-11 15:09:34.000000000","message":"I\u0027m going to abandon this. I will not have time to finish this before my sabbatical and I do not believe I will be able to reach consensus with reviewers.","commit_id":"49d12b4a851d8d75cc624939fc637161d58adafa"}],"diskimage_builder/disk_image_create.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"f13bee1caa8a9bb630fa404b14c37acac29a0932","unresolved":true,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # note(JayF): We cannot execve here, python script must remain running"},{"line_number":41,"context_line":"    #             for us to guarantee the libdir environment set above will"},{"line_number":42,"context_line":"    #             still exist."},{"line_number":43,"context_line":"    os.exec(\"/bin/bash\", [\u0027bash\u0027, script] + sys.argv[1:], environ)"}],"source_content_type":"text/x-python","patch_set":3,"id":"0232e6f5_470e479d","line":42,"updated":"2024-02-05 05:26:14.000000000","message":"I\u0027m not sure what this is referring to?  I think the prior discussion where we mentioned .zip files, which we don\u0027t support?\n\nI think this should be left as-is","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"832db030d3a0d3f8822c86dcf9970ea34da9002a","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    # note(JayF): We cannot execve here, python script must remain running"},{"line_number":41,"context_line":"    #             for us to guarantee the libdir environment set above will"},{"line_number":42,"context_line":"    #             still exist."},{"line_number":43,"context_line":"    os.exec(\"/bin/bash\", [\u0027bash\u0027, script] + sys.argv[1:], environ)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fe32f79_60f8ced6","line":42,"in_reply_to":"0232e6f5_470e479d","updated":"2024-12-11 00:03:41.000000000","message":"Done","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"}],"diskimage_builder/paths.py":[{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"34c83c808280ac4b5ef01948292519ef71d4d4c4","unresolved":true,"context_lines":[{"line_number":41,"context_line":"        #             sooner."},{"line_number":42,"context_line":"        #             In the case where the resources are already on disk,"},{"line_number":43,"context_line":"        #             there is nothing to cleanup when the ctxtmgr exits."},{"line_number":44,"context_line":"        ref \u003d importlib_resources.files(__name__.rstrip(\".paths\")).joinpath(var)"},{"line_number":45,"context_line":"        path \u003d mgr.enter_context(importlib_resources.as_file(ref))"},{"line_number":46,"context_line":"        atexit.register(mgr.close)"},{"line_number":47,"context_line":"        return path"}],"source_content_type":"text/x-python","patch_set":1,"id":"1c309579_69f0e08b","line":44,"updated":"2024-02-04 22:18:45.000000000","message":"The rstrip here is obviously not ideal, but was needed to make unit tests pass. I assume there\u0027s probably a better approach to take here, but I\u0027m unsure what it is.","commit_id":"9572b4913c2c76868102cab1766ed7883782071b"},{"author":{"_account_id":36752,"name":"Eli Schwartz","display_name":"Eli Schwartz","email":"eschwartz93@gmail.com","username":"eschwartz"},"change_message_id":"61c9bcf31cd9f2c842f030c2c1e1bbe9133acafb","unresolved":true,"context_lines":[{"line_number":41,"context_line":"        #             sooner."},{"line_number":42,"context_line":"        #             In the case where the resources are already on disk,"},{"line_number":43,"context_line":"        #             there is nothing to cleanup when the ctxtmgr exits."},{"line_number":44,"context_line":"        ref \u003d importlib_resources.files(__name__.rstrip(\".paths\")).joinpath(var)"},{"line_number":45,"context_line":"        path \u003d mgr.enter_context(importlib_resources.as_file(ref))"},{"line_number":46,"context_line":"        atexit.register(mgr.close)"},{"line_number":47,"context_line":"        return path"}],"source_content_type":"text/x-python","patch_set":1,"id":"6dcb9c6a_6923cf76","line":44,"in_reply_to":"1c309579_69f0e08b","updated":"2024-02-04 22:36:37.000000000","message":"You could do `files(\u0027diskimage_builder\u0027)` as my assumption is the overall goal is to get resources relative to the top-level module in all caes.","commit_id":"9572b4913c2c76868102cab1766ed7883782071b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"832db030d3a0d3f8822c86dcf9970ea34da9002a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        #             sooner."},{"line_number":42,"context_line":"        #             In the case where the resources are already on disk,"},{"line_number":43,"context_line":"        #             there is nothing to cleanup when the ctxtmgr exits."},{"line_number":44,"context_line":"        ref \u003d importlib_resources.files(__name__.rstrip(\".paths\")).joinpath(var)"},{"line_number":45,"context_line":"        path \u003d mgr.enter_context(importlib_resources.as_file(ref))"},{"line_number":46,"context_line":"        atexit.register(mgr.close)"},{"line_number":47,"context_line":"        return path"}],"source_content_type":"text/x-python","patch_set":1,"id":"6e0b8934_8e02d7a5","line":44,"in_reply_to":"6dcb9c6a_6923cf76","updated":"2024-12-11 00:03:41.000000000","message":"Done","commit_id":"9572b4913c2c76868102cab1766ed7883782071b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"f13bee1caa8a9bb630fa404b14c37acac29a0932","unresolved":true,"context_lines":[{"line_number":32,"context_line":"def get_path(var):"},{"line_number":33,"context_line":"    if var \u003d\u003d \"lib\" or var \u003d\u003d \"elements\":"},{"line_number":34,"context_line":"        mgr \u003d ExitStack()"},{"line_number":35,"context_line":"        # todo(JayF): We have to use a context manager for the new API because"},{"line_number":36,"context_line":"        #             the resources may be in a .zip file. If they are, they"},{"line_number":37,"context_line":"        #             are extracted to a temp location. This may increase disk"},{"line_number":38,"context_line":"        #             usage. We can reduce this risk by making this interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"4a59aaa7_5295bbec","line":35,"updated":"2024-02-05 05:26:14.000000000","message":"so as mentioned, these won\u0027t be in a zip file.\n\nIsn\u0027t this just need to be\n\n```\nfrom importlib.resources import files\nfiles(\u0027diskimage_builder.paths\u0027).joinpath(\u003crelative paths\u003e)\n```","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"b3b055639820fdb413a51485579864ec258efc63","unresolved":true,"context_lines":[{"line_number":32,"context_line":"def get_path(var):"},{"line_number":33,"context_line":"    if var \u003d\u003d \"lib\" or var \u003d\u003d \"elements\":"},{"line_number":34,"context_line":"        mgr \u003d ExitStack()"},{"line_number":35,"context_line":"        # todo(JayF): We have to use a context manager for the new API because"},{"line_number":36,"context_line":"        #             the resources may be in a .zip file. If they are, they"},{"line_number":37,"context_line":"        #             are extracted to a temp location. This may increase disk"},{"line_number":38,"context_line":"        #             usage. We can reduce this risk by making this interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"9cf4ba22_6dbc587d","line":35,"in_reply_to":"0374e122_4d2f3825","updated":"2024-02-09 03:37:29.000000000","message":"This is along the lines of what I was thinking (assert the thing will work or bail). I\u0027ll try to get an update to this tomorrow.","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":36752,"name":"Eli Schwartz","display_name":"Eli Schwartz","email":"eschwartz93@gmail.com","username":"eschwartz"},"change_message_id":"aa47c4bf7a5137186c3250dfa9d9db8ab0863010","unresolved":true,"context_lines":[{"line_number":32,"context_line":"def get_path(var):"},{"line_number":33,"context_line":"    if var \u003d\u003d \"lib\" or var \u003d\u003d \"elements\":"},{"line_number":34,"context_line":"        mgr \u003d ExitStack()"},{"line_number":35,"context_line":"        # todo(JayF): We have to use a context manager for the new API because"},{"line_number":36,"context_line":"        #             the resources may be in a .zip file. If they are, they"},{"line_number":37,"context_line":"        #             are extracted to a temp location. This may increase disk"},{"line_number":38,"context_line":"        #             usage. We can reduce this risk by making this interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"0374e122_4d2f3825","line":35,"in_reply_to":"4a59aaa7_5295bbec","updated":"2024-02-09 01:37:24.000000000","message":"Yes -- if you are positive that the files you are using are not ever inside of a module imported via `zipimport`, then the files() API will always return a Traversable based on pathlib.Path, and not one that is based off of zipfile.Path.\n\nIf you use files() directly as os.Pathlike compatible \"paths to existing files\" and it is:\n- a zipfile.Path, you get an error because the zipfile version doesn\u0027t exist on disk\n- a pathlib.Path, it \"just works\"\n\n\nThe goal of as_file() is to take the first case and extract it as a tempfile, while transparently doing nothing in the second case (just returning the input as-is).\n\nSo a valid move here is to say \"dib cannot ever reference a zipfile-based path because we do not support this and it isn\u0027t allowed\", and avoid the complexity of trying to handle it.\n\nMaybe use `assert isinstance(ref, pathlib.Path), \u0027dib does not support being run from a zipfile\u0027` if that makes things more comfortable (\u003d\u003d tested).","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"ee224cee2efc2572c7216bbd7dbdc2e23bef218f","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def get_path(var):"},{"line_number":33,"context_line":"    if var \u003d\u003d \"lib\" or var \u003d\u003d \"elements\":"},{"line_number":34,"context_line":"        mgr \u003d ExitStack()"},{"line_number":35,"context_line":"        # todo(JayF): We have to use a context manager for the new API because"},{"line_number":36,"context_line":"        #             the resources may be in a .zip file. If they are, they"},{"line_number":37,"context_line":"        #             are extracted to a temp location. This may increase disk"},{"line_number":38,"context_line":"        #             usage. We can reduce this risk by making this interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"1bd15637_1e50170f","line":35,"in_reply_to":"624a5838_d67d303b","updated":"2024-12-11 16:43:34.000000000","message":"Thanks, fixed.","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"832db030d3a0d3f8822c86dcf9970ea34da9002a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"def get_path(var):"},{"line_number":33,"context_line":"    if var \u003d\u003d \"lib\" or var \u003d\u003d \"elements\":"},{"line_number":34,"context_line":"        mgr \u003d ExitStack()"},{"line_number":35,"context_line":"        # todo(JayF): We have to use a context manager for the new API because"},{"line_number":36,"context_line":"        #             the resources may be in a .zip file. If they are, they"},{"line_number":37,"context_line":"        #             are extracted to a temp location. This may increase disk"},{"line_number":38,"context_line":"        #             usage. We can reduce this risk by making this interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"a7348185_ea879702","line":35,"in_reply_to":"9cf4ba22_6dbc587d","updated":"2024-12-11 00:03:41.000000000","message":"Done","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":36752,"name":"Eli Schwartz","display_name":"Eli Schwartz","email":"eschwartz93@gmail.com","username":"eschwartz"},"change_message_id":"d352cdd4ac22ab8a1273fc3cf7570f68773dd10d","unresolved":true,"context_lines":[{"line_number":32,"context_line":"def get_path(var):"},{"line_number":33,"context_line":"    if var \u003d\u003d \"lib\" or var \u003d\u003d \"elements\":"},{"line_number":34,"context_line":"        mgr \u003d ExitStack()"},{"line_number":35,"context_line":"        # todo(JayF): We have to use a context manager for the new API because"},{"line_number":36,"context_line":"        #             the resources may be in a .zip file. If they are, they"},{"line_number":37,"context_line":"        #             are extracted to a temp location. This may increase disk"},{"line_number":38,"context_line":"        #             usage. We can reduce this risk by making this interface"}],"source_content_type":"text/x-python","patch_set":3,"id":"624a5838_d67d303b","line":35,"in_reply_to":"a7348185_ea879702","updated":"2024-12-11 01:04:12.000000000","message":"The linter failure is warning you that you should not add function call parentheses for asserts -- assert isn\u0027t a function, so `assert(thing, error_message)` will trranslate as:\n\n```\nif __debug__:\n     if not (thing, error_message):\n         raise AssertionError()\n```\n\n(and of course the truth value of a tuple with two elements is always true)","commit_id":"4f1563fd27f183a9cb9648839139858de735359b"},{"author":{"_account_id":36752,"name":"Eli Schwartz","display_name":"Eli Schwartz","email":"eschwartz93@gmail.com","username":"eschwartz"},"change_message_id":"fcfafda5a58342c8c251934ef0e6d3b1ef10d4f6","unresolved":true,"context_lines":[{"line_number":36,"context_line":"        #             explicitly do not support this case; assert \u0026 fail fast"},{"line_number":37,"context_line":"        errmsg \u003d \u0027dib does not support being run from a zipfile\u0027"},{"line_number":38,"context_line":"        assert isinstance(path, pathlib.Path), errmsg"},{"line_number":39,"context_line":"        return path"},{"line_number":40,"context_line":"    else:"},{"line_number":41,"context_line":"        print(\"Unknown path request!\")"},{"line_number":42,"context_line":"        sys.exit(1)"}],"source_content_type":"text/x-python","patch_set":7,"id":"5e0031a4_2d9dd2c1","line":39,"updated":"2024-12-13 00:29:17.000000000","message":"CI failure indicates the return type of this should be str (e.g. it is used to set an environment variable). Although some use cases for a string containing a path are going to transparently support strings and os.Pathlike, setting an environment block isn\u0027t one of them. 😄\n\n\n```suggestion\n        return path.as_posix()\n```","commit_id":"5ff83b70652d48ba73d03d07856bec46fe762787"}],"requirements.txt":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"af66dc2f104fb747a77de94974959d63e743e09e","unresolved":true,"context_lines":[{"line_number":5,"context_line":"# NOTE(ianw) in here because dib-lint uses flake8"},{"line_number":6,"context_line":"flake8\u003c7.0.0,\u003e\u003d3.6.0 # MIT"},{"line_number":7,"context_line":"jsonschema\u003e\u003d3.0.2 # MIT"},{"line_number":8,"context_line":"importlib_resources\u003c5.1.0,\u003e\u003d5.0.0 ; python_version \u003c \"3.10\" # Apache-2.0"}],"source_content_type":"text/plain","patch_set":9,"id":"20e46b63_858c08e0","line":8,"updated":"2025-05-02 01:00:40.000000000","message":"This does seem to be causing conflicts.  @jay@jvf.cc I think it\u0027s probably true that we\u0027re kind of old guys that have memories eggs and zips and other terrible things 😊 but I\u0027m reading https://setuptools.pypa.io/en/latest/deprecated/zip_safe.html and is it something we need to worry about today?  It feels like you can still use a .zip, but nothing is going to really create one?","commit_id":"49d12b4a851d8d75cc624939fc637161d58adafa"},{"author":{"_account_id":36752,"name":"Eli Schwartz","display_name":"Eli Schwartz","email":"eschwartz93@gmail.com","username":"eschwartz"},"change_message_id":"77de15a78cefd1dbbba4c96908adc6d9b28dbc16","unresolved":true,"context_lines":[{"line_number":5,"context_line":"# NOTE(ianw) in here because dib-lint uses flake8"},{"line_number":6,"context_line":"flake8\u003c7.0.0,\u003e\u003d3.6.0 # MIT"},{"line_number":7,"context_line":"jsonschema\u003e\u003d3.0.2 # MIT"},{"line_number":8,"context_line":"importlib_resources\u003c5.1.0,\u003e\u003d5.0.0 ; python_version \u003c \"3.10\" # Apache-2.0"}],"source_content_type":"text/plain","patch_set":9,"id":"dfe153fb_a8f6bb45","line":8,"in_reply_to":"20e46b63_858c08e0","updated":"2025-05-02 01:54:41.000000000","message":"\"Well, technically...\"\n\nYou can create a \"zipapp\" https://docs.python.org/3/library/zipapp.html and some people do exactly that so they can deploy a program as a single-executable file.\n\nSome people use https://pyinstaller.org/ to build genuine honest to goodness ELF files out of a python script, that embed the actual code as a data section and unpack *.so modules at runtime into /tmp -- but don\u0027t unpack the *.py files, for performance reasons -- before running the bundled python interpreter. In that case you cannot even rely on sys.executable to be a python interpreter, because it\u0027s not one -- it directly starts your python script.\n\nPeople tend to get very imaginative about this sort of thing. Deprecate \"eggs\" and someone else will reinvent them under a different name and people will suddenly decide it\u0027s great again.\n\nTake a look at \"shiv\" and \"pex\" if you really want to have fun learning about weird deployment strategies. ;)\n\n...\n\nAnyway, the actual chances of people trying to do this aren\u0027t exactly high but you can never tell, I guess.","commit_id":"49d12b4a851d8d75cc624939fc637161d58adafa"}]}
