Revert "Bump cherrypy from 18.8.0 to 18.9.0 (#2266)"

This reverts commit faef9a94c4.
This commit is contained in:
JonnyWong16 2024-03-24 17:40:56 -07:00
parent fcd8ef11f4
commit 2fc618c01f
No known key found for this signature in database
GPG key ID: B1F1F9807184697A
673 changed files with 11579 additions and 159846 deletions

View file

@ -1,21 +1,22 @@
import collections.abc
import contextlib
import datetime
import functools
import numbers
import time
import collections.abc
import contextlib
import jaraco.functools
class Stopwatch:
"""
A simple stopwatch that starts automatically.
A simple stopwatch which starts automatically.
>>> w = Stopwatch()
>>> _1_sec = datetime.timedelta(seconds=1)
>>> w.split() < _1_sec
True
>>> import time
>>> time.sleep(1.0)
>>> w.split() >= _1_sec
True
@ -26,13 +27,13 @@ class Stopwatch:
>>> w.split() < _1_sec
True
Launch the Stopwatch in a context:
It should be possible to launch the Stopwatch in a context:
>>> with Stopwatch() as watch:
... assert isinstance(watch.split(), datetime.timedelta)
After exiting the context, the watch is stopped; read the
elapsed time directly:
In that case, the watch is stopped when the context is exited,
so to read the elapsed time:
>>> watch.elapsed
datetime.timedelta(...)