[issue28494] is_zipfile false positives
Change by John Jolly : -- nosy: +gregory.p.smith ___ Python tracker <https://bugs.python.org/issue28494> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28494] is_zipfile false positives
John Jolly added the comment: Is there any chance that this will make it into 3.7 or is my reminder too late? -- ___ Python tracker <https://bugs.python.org/issue28494> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32476] Add concat functionality to ElementTree xpath find
John Jolly added the comment: I understand that the feature is likely too late, but I do not want it to get lost. Is there any way to make certain this feature is accepted for the next release? Do I just select the 3.8 version for this issue? -- ___ Python tracker <https://bugs.python.org/issue32476> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32476] Add concat functionality to ElementTree xpath find
Change by John Jolly : -- pull_requests: +5098 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32476> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32476] Add concat functionality to ElementTree xpath find
Change by John Jolly : -- nosy: +eli.bendersky ___ Python tracker <https://bugs.python.org/issue32476> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue32476] Add concat functionality to ElementTree xpath find
New submission from John Jolly : The current implementation of the xpath specification in ElementTree does not allow for predicates that may contain both an apostrophe and a quote. Either one or the other is allowed, but escaping (either string escaping using the backslash or html escaping) is not supported. A simple solution would be to implement the xpath concat function for predicates. This would allow the combination of quote types in the predicate. Attached is a proposed patch for this fix. -- components: Library (Lib) files: etree-concat.patch keywords: patch messages: 309344 nosy: jjolly priority: normal severity: normal status: open title: Add concat functionality to ElementTree xpath find type: enhancement versions: Python 3.7 Added file: https://bugs.python.org/file47360/etree-concat.patch ___ Python tracker <https://bugs.python.org/issue32476> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28494] is_zipfile false positives
John Jolly added the comment: Fix submitted that evaluates the ECD structure and validates the first CD entry. The fix also handles empty zipfiles. IMO the purpose of this API is to *quickly* verify that the file is a valid zipfile. With this fix, the API only reads another 46 bytes of data (after a seek, of course). This should still qualify as "quick", especially after having potentially read 64k of data. Perhaps a full zip validator would be appropriate in addition to is_zipfile. That would be more appropriate as a full feature rather than in this bugfix. -- nosy: +jjolly ___ Python tracker <https://bugs.python.org/issue28494> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue28494] is_zipfile false positives
Change by John Jolly : -- pull_requests: +4934 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue28494> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue22908] ZipExtFile in zipfile can be seekable
John Jolly added the comment: Please be gentle, this is my first submission to python. The use case for me was a recursive zip-within-a-zip situation. I wanted to allow the creation of a zipfile.ZipFile from an existing zipfile.ZipExtFile, but the lack of seek prevented this. I simply treated forward seeks as a read, and backward seeks as a reset-and-read. The reset was the tricky part as it required restoring several original values such as the remaining compressed length, remaining data length, and the running crc32. I pushed this into the latest upstream branch, but as I am testing this in v3.4 it should be easy to backport if necessary (I suspect not). I based my fix on a little program that I wrote to test the feasibility of this idea. I am attaching that test program here. -- nosy: +jjolly Added file: https://bugs.python.org/file47345/ziz.py ___ Python tracker <https://bugs.python.org/issue22908> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com