diff --git a/CHANGELOG.md b/CHANGELOG.md index e9110c8f284ee709df4a8b56f63b3e7e9559822b..f58623ce61b01d92a284ce94835706c92368b672 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,3 @@ -# v2.25.0 +# v2.25.1 -* added safe_listdir -* fixed a bug occurring in Python 3.10 with whereis -* DirectorySource will raise an exception if directory does not exist and on_fail is set to RAISE - -Build system -============ - -* Python 3.6 support dropped as it does not employ pyproject.toml, which is necessary - to build this -* fixed unit tests to run on Py3.12 -* removed Docker unit tests -* a unit test had some problems running under PyPy +* added parameters for EmptyContextManager diff --git a/satella/__init__.py b/satella/__init__.py index 879384944dd2d8047218ffb59b95afc2eac91ebf..6ec890752e9e56077799501480d3ad597933d09c 100644 --- a/satella/__init__.py +++ b/satella/__init__.py @@ -1 +1 @@ -__version__ = '2.25.0' +__version__ = '2.25.1' diff --git a/satella/coding/ctxt_managers.py b/satella/coding/ctxt_managers.py index 62bc2cbb5128ac3a141b3052bb141594946e0a00..7dd1123b718adb432a1e672dd15f0dabdac95f03 100644 --- a/satella/coding/ctxt_managers.py +++ b/satella/coding/ctxt_managers.py @@ -9,8 +9,13 @@ class EmptyContextManager: >>> ctxt = EmptyContextManager() >>> with ctxt: >>> ... + + Note that it will accept any parameters, and then throw them on the ground. """ + def __init__(self, *args, **kwargs): + pass + def __enter__(self): return self diff --git a/tests/test_coding/test_debug.py b/tests/test_coding/test_debug.py index d9ce597e45113bba0c80c547782946122579f2c7..d577137b93bb84d5bd04e5bdf1420e09b06204a6 100644 --- a/tests/test_coding/test_debug.py +++ b/tests/test_coding/test_debug.py @@ -9,7 +9,7 @@ from satella.exceptions import PreconditionError class TestTypecheck(unittest.TestCase): def test_empty_ctxt_manager(self): - with EmptyContextManager() as p: + with EmptyContextManager(1, 2) as p: pass def test_except_exception(self):