Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate poetry.core.masonry.builder (not a core functionality, only used in poetry build) #682

Merged
merged 1 commit into from
Jan 27, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/poetry/core/masonry/builder.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

import warnings

from typing import TYPE_CHECKING


Expand All @@ -9,6 +11,14 @@
from poetry.core.poetry import Poetry


warnings.warn(
"poetry.core.masonry.builder is deprecated. Its functionality has been moved"
"from poetry-core to poetry (poetry.console.commands.build).",
DeprecationWarning,
stacklevel=2,
)


class Builder:
def __init__(self, poetry: Poetry) -> None:
from poetry.core.masonry.builders.sdist import SdistBuilder
Expand Down
7 changes: 6 additions & 1 deletion tests/masonry/test_builder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import shutil
import warnings

from contextlib import contextmanager
from pathlib import Path
Expand All @@ -10,7 +11,11 @@
import pytest

from poetry.core.factory import Factory
from poetry.core.masonry.builder import Builder


with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
from poetry.core.masonry.builder import Builder


if TYPE_CHECKING:
Expand Down