diff --git a/docs/changelog/next_release/+.bugfix.rst b/docs/changelog/next_release/+.bugfix.rst new file mode 100644 index 0000000..a3a5e65 --- /dev/null +++ b/docs/changelog/next_release/+.bugfix.rst @@ -0,0 +1 @@ +Avoid showing warning about deprecated ``Process`` class during module import. diff --git a/etl_entities/process/process_stack_manager.py b/etl_entities/process/process_stack_manager.py index 49a5edc..6c3a39e 100644 --- a/etl_entities/process/process_stack_manager.py +++ b/etl_entities/process/process_stack_manager.py @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 from __future__ import annotations -from dataclasses import dataclass +from dataclasses import dataclass, field from typing import ClassVar import typing_extensions @@ -22,7 +22,7 @@ class ProcessStackManager: .. deprecated:: 2.0.0 """ - default: ClassVar[Process] = Process() # noqa: WPS462 + default: ClassVar[Process] = field(default_factory=Process) "Default process returned by ``ProcessStackManager.get_current``" # noqa: WPS428 _stack: ClassVar[list[Process]] = []