Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Return NULL instead of None. Add third pass to check warning-to-error…
… promotion.
  • Loading branch information
rhettinger committed May 26, 2023
commit 4fefb7ee622fc90ffb7c0c12202f44e17d114759
12 changes: 9 additions & 3 deletions Lib/test/test_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@
import warnings

def pickle_deprecated(testfunc):
""" Run the test twice. On the first pass, verify that a
Deprecation Warning is raised. On the second pass, run
normally but with DeprecationWarnings temporarily disabled.
""" Run the test three times.
First, verify that a Deprecation Warning is raised.
Second, run normally but with DeprecationWarnings temporarily disabled.
Third, run with warnings promoted to errors.
"""
def inner(self):
with self.assertWarns(DeprecationWarning):
testfunc(self)
with warnings.catch_warnings():
warnings.simplefilter("ignore", category=DeprecationWarning)
testfunc(self)
with warnings.catch_warnings():
warnings.simplefilter("error", category=DeprecationWarning)
with self.assertRaises((DeprecationWarning, AssertionError, SystemError)):
testfunc(self)

return inner

maxsize = support.MAX_Py_ssize_t
Expand Down
2 changes: 1 addition & 1 deletion Modules/itertoolsmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class itertools.pairwise "pairwiseobject *" "clinic_state()->pairwise_type"
PyExc_DeprecationWarning, \
"Itertool pickle/copy/deepcopy support " \
"will be removed in a Python 3.14.", 1) < 0) { \
Py_RETURN_NONE; \
return NULL; \
}

/* batched object ************************************************************/
Expand Down