feat: allow download of large files #221
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces chunked file download support to the
file_access_downloadmethod, improving memory efficiency when downloading large files. It also adds comprehensive tests for the new chunked download functionality, updates dependencies and CI workflows, and makes minor documentation and compatibility improvements.Chunked file download support and tests:
file_access_downloadinsrc/odsbox/con_i.pyto stream file downloads in chunks (default 8KB), reducing memory usage and adding achunk_sizeparameter. The HTTP request now usesstream=True, and file writing iterates over non-empty chunks. [1] [2] [3] [4]tests/test_con_i_chunked_download.pywith extensive tests covering chunk size handling, data integrity, Content-Disposition, and binary data preservation for chunked downloads.tests/test_con_i_file_access.pyto useiter_contentinstead ofcontentfor compatibility with the new chunked download implementation. [1] [2] [3] [4] [5]Dependency and workflow updates:
banditandblackto latest versions inpyproject.tomlfor test dependencies.actions/checkoutto v6.0.2 in GitHub Actions workflow files for improved CI reliability. (.github/workflows/schedule-update-actions.yml,.github/workflows/template-sync.yml) [1] [2]ipythonto documentation requirements indocs/requirements.txt.Other improvements:
1.0.17insrc/odsbox/__init__.py.SECURITY.mdfile.