bpo-32969: Expose some missing constants in zlib and fix the doc by zhangyangyu · Pull Request #5988 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 22 additions & 19 deletions Doc/library/zlib.rst
3 changes: 2 additions & 1 deletion Lib/test/test_zlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ def test_clear_unconsumed_tail(self):
def test_flushes(self):
# Test flush() with the various options, using all the
# different levels in order to provide more variations.
sync_opt = ['Z_NO_FLUSH', 'Z_SYNC_FLUSH', 'Z_FULL_FLUSH']
sync_opt = ['Z_NO_FLUSH', 'Z_SYNC_FLUSH', 'Z_FULL_FLUSH',
'Z_PARTIAL_FLUSH', 'Z_BLOCK']
sync_opt = [getattr(zlib, opt) for opt in sync_opt
if hasattr(zlib, opt)]
data = HAMLET_SCENE * 8
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Expose several missing constants in zlib and fix corresponding
documentation.
21 changes: 18 additions & 3 deletions Modules/zlibmodule.c