Skip to content

Commit

Permalink
Disable asserts with pytest in Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Oct 2, 2024
1 parent a2fd9f8 commit 80e9dce
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/cibuildwheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,20 @@ jobs:
pip install -e .[test]
- name: Test sdist package with pytest
# Python 3.13 fails without -O flag:
# from blosc2.schunk import SChunk
# ../venv/lib/python3.13/site-packages/blosc2/schunk.py:1346: in <module>
# @_inherit_doc_parameter(blosc2.Storage, "initial_mapping_size:", {r"r\+ w\+, or c": "r+ or c"})
# ../venv/lib/python3.13/site-packages/blosc2/helpers.py:15: in wrapper
# match is not None
# E AssertionError: Parameter initial_mapping_size: not found in the docstring of Storage
run: |
cd ./dist/blosc2-*/
pytest
if [[ "${{ matrix.python-version }}" == "3.13" ]]; then
pytest -O
else
pytest
fi
upload_pypi:
needs: [ build_wheels, build_sdist ] # last but not least
Expand Down
2 changes: 2 additions & 0 deletions src/blosc2/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class Storage:
This is currently a beta feature (especially write operations) and we
recommend trying it out and reporting any issues you may encounter.
initial_mapping_size: int, optional
The initial size of the mapping for the memory-mapped file when writes are
allowed (r+ w+, or c mode). Once a file is memory-mapped and extended beyond the
Expand All @@ -196,6 +197,7 @@ class Storage:
On Windows, the size of the mapping is directly coupled to the file size.
When the schunk gets destroyed, the file size will be truncated to the
actual size of the schunk.
meta: dict or None
A dictionary with different metalayers. One entry per metalayer:
Expand Down

0 comments on commit 80e9dce

Please sign in to comment.