-
Couldn't load subscription status.
- Fork 654
Address blf GzipFile negative seek error #1385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #1385 +/- ##
===========================================
- Coverage 65.28% 59.87% -5.42%
===========================================
Files 81 81
Lines 8830 8726 -104
===========================================
- Hits 5765 5225 -540
- Misses 3065 3501 +436 |
|
Now that I've tried out other zip formats:
I'm uncertain what should be done about #1378. |
| if type(file) == gzip.GzipFile: | ||
| raise ValueError( | ||
| f"The BLFWriter is currently incompatible with " | ||
| f"{gzip.GzipFile.__name__}s. Try using a different zip format." | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unaware of any zip format that could be made compatible with the current implementation of BLFWriter.
|
I would move the check here: Line 107 in cd51ec4
A comparison of real_suffix against a list of incompatible suffixes (all binary formats) should be sufficient.
I'd suggest to release 4.1.0 once this one is merged. |
This reverts commit 07e0510.
|
@zariiii9003 Okay, I made modifications. |
|
@zariiii9003 tests are passing. Ready for your review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @j-c-cook, why are we also removing GZip support for the other formats? I was under the impression that this PR was only to remove GZip for the BLF format, wich make sense because already uses compression internally and GZip is not really necessary.
Anything wrong with for example the ASC GZip support?
…dbyte#1422)" This reverts commit fb892d6.
This reverts commit d3103d8.
This reverts commit 4b43f33.
This reverts commit 0c82d2c.
This reverts commit 99fea55.
This reverts commit 451ce48.
This reverts commit b639560.
This reverts commit a144f25.
This reverts commit 23b6b19.
This reverts commit b2b2a80.
…ardbyte#1392)" This reverts commit c3a5c7a.
)" This reverts commit 366e239.
This reverts commit 1e11f21.
This reverts commit 40f6cce.
…faces (hardbyte#1369)" This reverts commit ad8b948.
This reverts commit 9d9cb16.
|
@pierreluctg I've made a mistake here. I'll open up a new PR. |
|
@pierreluctg @zariiii9003 This PR is now migrated to #1429. |
* Add gzip check to compress method Addresses @zariiii9003 from #1385 (comment) * Update can/io/logger.py Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com> * Update logger.py Co-authored-by: zariiii9003 <52598363+zariiii9003@users.noreply.github.com>
The current implementation of the
BLFWriterrequires that the file be negatively sought (#1379 (comment)). Thecpythonimplementation does not allow forGzipFilesto be negatively sought while in write mode. Modifyinggzipis outside of the scope of this project. I see two options here:BLFWriterto close, seek then re-open (@christiansandberg says this was previously being done)GzipFileformat is not compatible with theBLFWriter(later enhancingpython-canso that zip formats that can be negatively sought are available)I'm proposing option 2.
closes #1378