Skip to content

Commit 64bb6cb

Browse files
committed
docs: stdlib migration: ZstdFile's filename param
1 parent ea7d45d commit 64bb6cb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/stdlib.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,22 @@ zstd.DecompressionParameter.window_log_max
5959

6060
Finally, the `CParameter.targetCBlockSize` parameter is not available for now. Assuming a version of libzstd supporting it is used at runtime (1.5.6 or later), the integer `130` can be used as a key in the dictionary passed to the `options` parameter.
6161

62+
## `ZstdFile`'s `filename` parameter
63+
64+
The first parameter of `ZstdFile` (`filename`) is now positional-only.
65+
66+
```python
67+
# before
68+
pyzstd.ZstdFile("file.zst")
69+
pyzstd.ZstdFile(fileobj)
70+
pyzstd.ZstdFile(filename="file.zst")
71+
pyzstd.ZstdFile(filename=fileobj)
72+
73+
# after
74+
zstd.ZstdFile("file.zst")
75+
zstd.ZstdFile(fileobj)
76+
```
77+
6278
## `ZstdCompressor._set_pledged_input_size`
6379

6480
The method `_set_pledged_input_size` of the `ZstdCompressor` class has been renamed to `set_pledged_input_size`.

0 commit comments

Comments
 (0)