repo stringlengths 7 90 | file_url stringlengths 81 315 | file_path stringlengths 4 228 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:38:15 2026-01-05 02:33:18 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/vcs/git/__init__.py | src/poetry/vcs/git/__init__.py | from __future__ import annotations
from poetry.vcs.git.backend import Git
__all__ = ["Git"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/vcs/git/backend.py | src/poetry/vcs/git/backend.py | from __future__ import annotations
import dataclasses
import logging
import os
import re
from pathlib import Path
from subprocess import CalledProcessError
from typing import TYPE_CHECKING
from urllib.parse import urljoin
from urllib.parse import urlparse
from urllib.parse import urlunparse
from dulwich import porce... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/json/__init__.py | src/poetry/json/__init__.py | from __future__ import annotations
import json
from importlib.resources import files
from typing import Any
import fastjsonschema
from fastjsonschema.exceptions import JsonSchemaValueException
def validate_object(obj: dict[str, Any]) -> list[str]:
schema = json.loads(
(files(__package__) / "schemas" /... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/application.py | src/poetry/console/application.py | from __future__ import annotations
import argparse
import logging
from contextlib import suppress
from importlib import import_module
from pathlib import Path
from typing import TYPE_CHECKING
from typing import cast
from cleo._utils import find_similar_names
from cleo.application import Application as BaseApplicatio... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/command_loader.py | src/poetry/console/command_loader.py | from __future__ import annotations
from typing import TYPE_CHECKING
from cleo.exceptions import CleoLogicError
from cleo.loaders.factory_command_loader import FactoryCommandLoader
if TYPE_CHECKING:
from collections.abc import Callable
from cleo.commands.command import Command
class CommandLoader(FactoryC... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/exceptions.py | src/poetry/console/exceptions.py | from __future__ import annotations
import dataclasses
import shlex
from dataclasses import InitVar
from subprocess import CalledProcessError
from typing import TYPE_CHECKING
from cleo.exceptions import CleoError
from poetry.utils._compat import decode
if TYPE_CHECKING:
from cleo.io.io import IO
class Poetry... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/__init__.py | src/poetry/console/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/logging/io_handler.py | src/poetry/console/logging/io_handler.py | from __future__ import annotations
import logging
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from logging import LogRecord
from cleo.io.io import IO
class IOHandler(logging.Handler):
def __init__(self, io: IO) -> None:
self._io = io
super().__init__()
def emit(self, reco... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/logging/filters.py | src/poetry/console/logging/filters.py | from __future__ import annotations
import logging
POETRY_FILTER = logging.Filter(name="poetry")
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/logging/__init__.py | src/poetry/console/logging/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/logging/io_formatter.py | src/poetry/console/logging/io_formatter.py | from __future__ import annotations
import logging
import sys
import textwrap
from pathlib import Path
from typing import TYPE_CHECKING
from typing import ClassVar
from poetry.console.logging.filters import POETRY_FILTER
from poetry.console.logging.formatters import FORMATTERS
if TYPE_CHECKING:
from logging imp... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/logging/formatters/formatter.py | src/poetry/console/logging/formatters/formatter.py | from __future__ import annotations
from abc import ABC
from abc import abstractmethod
class Formatter(ABC):
@abstractmethod
def format(self, msg: str) -> str: ...
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/logging/formatters/__init__.py | src/poetry/console/logging/formatters/__init__.py | from __future__ import annotations
from poetry.console.logging.formatters.builder_formatter import BuilderLogFormatter
FORMATTERS = {
"poetry.core.masonry.builders.builder": BuilderLogFormatter(),
"poetry.core.masonry.builders.sdist": BuilderLogFormatter(),
"poetry.core.masonry.builders.wheel": BuilderLo... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/logging/formatters/builder_formatter.py | src/poetry/console/logging/formatters/builder_formatter.py | from __future__ import annotations
import re
from poetry.console.logging.formatters.formatter import Formatter
class BuilderLogFormatter(Formatter):
def format(self, msg: str) -> str:
if msg.startswith("Building "):
msg = re.sub("Building (.+)", " - Building <info>\\1</info>", msg)
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/run.py | src/poetry/console/commands/run.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from poetry.console.commands.env_command import EnvCommand
from poetry.utils._compat import WINDOWS
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
from poetry.co... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/show.py | src/poetry/console/commands/show.py | from __future__ import annotations
import json
import sys
from enum import Enum
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from packaging.utils import canonicalize_name
from poetry.console.commands.env_command import EnvCommand
from... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/search.py | src/poetry/console/commands/search.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
class SearchCommand(Command):
name = "search"
descriptio... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/add.py | src/poetry/console/commands/add.py | from __future__ import annotations
import contextlib
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import Literal
from cleo.helpers import argument
from cleo.helpers import option
from packaging.utils import canonicalize_name
from poetry.core.packages.dependency impo... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/check.py | src/poetry/console/commands/check.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from pathlib import Path
from cleo.io.inputs.option import Option
class CheckComman... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/group_command.py | src/poetry/console/commands/group_command.py | from __future__ import annotations
from collections import defaultdict
from typing import TYPE_CHECKING
from cleo.helpers import option
from packaging.utils import NormalizedName
from packaging.utils import canonicalize_name
from poetry.console.commands.command import Command
from poetry.console.exceptions import Gr... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/build.py | src/poetry/console/commands/build.py | from __future__ import annotations
import dataclasses
from importlib import metadata
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import Literal
from cleo.helpers import option
from poetry.core.constraints.version import Version
from poetry... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/installer_command.py | src/poetry/console/commands/installer_command.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.console.commands.env_command import EnvCommand
from poetry.console.commands.group_command import GroupCommand
from poetry.utils.password_manager import PoetryKeyring
if TYPE_CHECKING:
from cleo.io.io import IO
from poetry.insta... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/sync.py | src/poetry/console/commands/sync.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from poetry.console.commands.install import InstallCommand
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
class SyncCommand(InstallCommand):
name = "sync"
description = "Update the project's env... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/version.py | src/poetry/console/commands/version.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from poetry.core.version.exceptions import InvalidVersionError
from tomlkit.toml_document import TOMLDocument
from poetry.console.co... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/command.py | src/poetry/console/commands/command.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.commands.command import Command as BaseCommand
from cleo.exceptions import CleoValueError
if TYPE_CHECKING:
from poetry.console.application import Application
from poetry.poetry i... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/remove.py | src/poetry/console/commands/remove.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from packaging.utils import canonicalize_name
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.depend... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/lock.py | src/poetry/console/commands/lock.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.installer_command import InstallerCommand
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
class LockCommand(InstallerCommand):
name = "lo... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/update.py | src/poetry/console/commands/update.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from poetry.console.commands.installer_command import InstallerCommand
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
from cleo.i... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/publish.py | src/poetry/console/commands/publish.py | from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
class PublishCommand(Command):
name = "pu... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/env_command.py | src/poetry/console/commands/env_command.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from poetry.utils.env import Env
class EnvCommand(Command):
def __init__(self) -> None:
# Set in poetry.console.application.Application.configure_env
se... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/config.py | src/poetry/console/commands/config.py | from __future__ import annotations
import json
import re
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from typing import cast
from cleo.helpers import argument
from cleo.helpers import option
from installer.utils import canonicalize_name
from poetry.co... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/__init__.py | src/poetry/console/commands/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/about.py | src/poetry/console/commands/about.py | from __future__ import annotations
from poetry.console.commands.command import Command
class AboutCommand(Command):
name = "about"
description = "Shows information about Poetry."
def handle(self) -> int:
from importlib import metadata
self.line(
f"""\
<info>Poetry - Package... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/install.py | src/poetry/console/commands/install.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.installer_command import InstallerCommand
from poetry.plugins.plugin_manager import PluginManager
if TYPE_CHECKING:
from cleo.io.inputs.option import Opti... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/init.py | src/poetry/console/commands/init.py | from __future__ import annotations
import re
from collections.abc import Mapping
from contextlib import suppress
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.helpers import option
from packaging.utils import canonicalize_name
from tomlkit impo... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/new.py | src/poetry/console/commands/new.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from poetry.console.commands.init import InitCommand
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
from cleo.io.inputs.option im... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/add.py | src/poetry/console/commands/self/add.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from poetry.core.constraints.version import Version
from poetry.__version__ import __version__
from poetry.console.commands.add import AddCommand
from poetry.console.commands.self.self_command import SelfCommand
if TYPE... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/sync.py | src/poetry/console/commands/self/sync.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from poetry.console.commands.self.install import SelfInstallCommand
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
class SelfSyncCommand(SelfInstallCommand):
name = "self sync"
description = (
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/remove.py | src/poetry/console/commands/self/remove.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from poetry.console.commands.remove import RemoveCommand
from poetry.console.commands.self.self_command import SelfCommand
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
class SelfRemoveCommand(SelfComm... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/lock.py | src/poetry/console/commands/self/lock.py | from __future__ import annotations
from poetry.console.commands.lock import LockCommand
from poetry.console.commands.self.self_command import SelfCommand
class SelfLockCommand(SelfCommand, LockCommand):
name = "self lock"
description = "Lock the Poetry installation's system requirements."
help = f"""\
Th... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/update.py | src/poetry/console/commands/self/update.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from cleo.io.inputs.string_input import StringInput
from cleo.io.io import IO
from poetry.console.commands.add import AddCommand
from poetry.console.comman... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/__init__.py | src/poetry/console/commands/self/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/install.py | src/poetry/console/commands/self/install.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from packaging.utils import NormalizedName
from packaging.utils import canonicalize_name
from poetry.core.packages.dependency_group import MAIN_GROUP
from poetry.console.commands.install import InstallCommand
from poetry.... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/self_command.py | src/poetry/console/commands/self/self_command.py | from __future__ import annotations
import typing
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from packaging.utils import canonicalize_name
from poetry.core.packages.dependency import Dependency
from poetry.core.packages.project_package import ProjectPackage
from poetry.__version... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/show/plugins.py | src/poetry/console/commands/self/show/plugins.py | from __future__ import annotations
import dataclasses
from typing import TYPE_CHECKING
from poetry.console.commands.self.self_command import SelfCommand
if TYPE_CHECKING:
from importlib import metadata
from poetry.core.packages.package import Package
@dataclasses.dataclass
class PluginPackage:
packa... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/self/show/__init__.py | src/poetry/console/commands/self/show/__init__.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.self.self_command import SelfCommand
from poetry.console.commands.show import ShowCommand
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
f... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/python/remove.py | src/poetry/console/commands/python/remove.py | from __future__ import annotations
import shutil
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from poetry.core.constraints.version.version import Version
from poetry.core.version.exceptions import InvalidVersionError
from poetry.conso... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/python/list.py | src/poetry/console/commands/python/list.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from poetry.core.constraints.version import parse_constraint
from poetry.core.version.exceptions import InvalidVersionError
from poetry.config.config impor... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/python/__init__.py | src/poetry/console/commands/python/__init__.py | from __future__ import annotations
def get_request_title(request: str, implementation: str, free_threaded: bool) -> str:
add_info = implementation
if free_threaded:
add_info += ", free-threaded"
return f"<c1>{request}</> (<b>{add_info}</>)"
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/python/install.py | src/poetry/console/commands/python/install.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from poetry.core.constraints.version.version import Version
from poetry.core.version.exceptions import InvalidVersionError
from poetry.console.commands.com... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/env/activate.py | src/poetry/console/commands/env/activate.py | from __future__ import annotations
import shlex
from typing import TYPE_CHECKING
import shellingham
from poetry.console.commands.env_command import EnvCommand
from poetry.utils._compat import WINDOWS
if TYPE_CHECKING:
from poetry.utils.env import Env
class ShellNotSupportedError(Exception):
"""Raised wh... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/env/use.py | src/poetry/console/commands/env/use.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
class EnvUseCommand(Command):
name = "env use"
descripti... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/env/remove.py | src/poetry/console/commands/env/remove.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
from cleo.io.inputs.option imp... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/env/list.py | src/poetry/console/commands/env/list.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
class EnvListCommand(Command):
name = "env list"
description =... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/env/__init__.py | src/poetry/console/commands/env/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/env/info.py | src/poetry/console/commands/env/info.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import option
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.option import Option
from poetry.utils.env import Env
class EnvInfoCommand(Command):
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/cache/clear.py | src/poetry/console/commands/cache/clear.py | from __future__ import annotations
import os
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from packaging.utils import canonicalize_name
from poetry.config.config import Config
from poetry.console.commands.command import Command
from p... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/cache/list.py | src/poetry/console/commands/cache/list.py | from __future__ import annotations
from poetry.config.config import Config
from poetry.console.commands.command import Command
class CacheListCommand(Command):
name = "cache list"
description = "List Poetry's caches."
def handle(self) -> int:
config = Config.create()
if config.repository... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/cache/__init__.py | src/poetry/console/commands/cache/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/source/show.py | src/poetry/console/commands/source/show.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
from cleo.ui.table import Rows
class SourceShowCommand(Comma... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/source/add.py | src/poetry/console/commands/source/add.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from cleo.io.null_io import NullIO
from tomlkit import table
from tomlkit.items import AoT
from poetry.config.source import Source
f... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/source/remove.py | src/poetry/console/commands/source/remove.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from tomlkit.items import AoT
from poetry.console.commands.command import Command
if TYPE_CHECKING:
from cleo.io.inputs.argument import Argument
class SourceRemoveCommand(Command)... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/source/__init__.py | src/poetry/console/commands/source/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/debug/tags.py | src/poetry/console/commands/debug/tags.py | from __future__ import annotations
from poetry.console.commands.env_command import EnvCommand
class DebugTagsCommand(EnvCommand):
name = "debug tags"
description = "Shows compatible tags for your project's current active environment."
def handle(self) -> int:
for tag in self.env.get_supported_ta... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/debug/resolve.py | src/poetry/console/commands/debug/resolve.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import ClassVar
from cleo.helpers import argument
from cleo.helpers import option
from cleo.io.outputs.output import Verbosity
from poetry.console.commands.init import InitCommand
from poetry.console.commands.show import ShowCommand
if... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/debug/__init__.py | src/poetry/console/commands/debug/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/commands/debug/info.py | src/poetry/console/commands/debug/info.py | from __future__ import annotations
import sys
from pathlib import Path
from poetry.console.commands.command import Command
class DebugInfoCommand(Command):
name = "debug info"
description = "Shows debug information."
def handle(self) -> int:
poetry_python_version = ".".join(str(s) for s in sys... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/events/__init__.py | src/poetry/console/events/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/console/events/console_events.py | src/poetry/console/events/console_events.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/password_manager.py | src/poetry/utils/password_manager.py | from __future__ import annotations
import dataclasses
import functools
import logging
from contextlib import suppress
from typing import TYPE_CHECKING
from poetry.config.config import Config
from poetry.utils.threading import atomic_cached_property
if TYPE_CHECKING:
import keyring.backend
from cleo.io.io ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/extras.py | src/poetry/utils/extras.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from collections.abc import Collection
from collections.abc import Iterable
from collections.abc import Mapping
from packaging.utils import NormalizedName
from poetry.core.packages.package import Package
def ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/constants.py | src/poetry/utils/constants.py | from __future__ import annotations
import os
# Timeout for HTTP requests using the requests library.
REQUESTS_TIMEOUT = int(os.getenv("POETRY_REQUESTS_TIMEOUT", 15))
RETRY_AFTER_HEADER = "retry-after"
# Server response codes to retry requests on.
STATUS_FORCELIST = [429, 500, 501, 502, 503, 504]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/authenticator.py | src/poetry/utils/authenticator.py | from __future__ import annotations
import dataclasses
import functools
import logging
import time
import urllib.parse
from os.path import commonprefix
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
import requests
import requests.adapters
import requests.auth
import requests.excepti... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/wheel.py | src/poetry/utils/wheel.py | from __future__ import annotations
import logging
from typing import TYPE_CHECKING
from packaging.tags import Tag
from poetry.utils.patterns import wheel_file_re
if TYPE_CHECKING:
from poetry.utils.env import Env
logger = logging.getLogger(__name__)
class InvalidWheelNameError(Exception):
pass
class... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/_compat.py | src/poetry/utils/_compat.py | from __future__ import annotations
import locale
import sys
import warnings
from contextlib import suppress
if sys.version_info < (3, 11):
# compatibility for python <3.11
import tomli as tomllib
else:
import tomllib
from importlib import metadata as _metadata
WINDOWS = sys.platform == "win32"
def ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/dependency_specification.py | src/poetry/utils/dependency_specification.py | from __future__ import annotations
import contextlib
import os
import re
import urllib.parse
from pathlib import Path
from typing import TYPE_CHECKING
from typing import TypeVar
from typing import cast
from poetry.core.packages.dependency import Dependency
from tomlkit.items import InlineTable
from poetry.packages.... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/helpers.py | src/poetry/utils/helpers.py | from __future__ import annotations
import hashlib
import io
import logging
import os
import shutil
import stat
import sys
import tarfile
import tempfile
import zipfile
from collections.abc import Mapping
from contextlib import contextmanager
from contextlib import suppress
from functools import cached_property
from p... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/log_utils.py | src/poetry/utils/log_utils.py | from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from poetry.core.packages.package import Package
from poetry.utils.env import Env
def format_build_wheel_log(package: Package, env: Env) -> str:
"""Format a log message indicating
that a wheel is being built for ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/__init__.py | src/poetry/utils/__init__.py | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false | |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/isolated_build.py | src/poetry/utils/isolated_build.py | from __future__ import annotations
import os
import subprocess
from contextlib import contextmanager
from contextlib import redirect_stdout
from io import StringIO
from typing import TYPE_CHECKING
from build import BuildBackendException
from build.env import IsolatedEnv as BaseIsolatedEnv
from poetry.core.packages.d... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/cache.py | src/poetry/utils/cache.py | from __future__ import annotations
import dataclasses
import hashlib
import json
import logging
import shutil
import threading
import time
from collections import defaultdict
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import Generic
from typing import TypeVar
from typ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/pip.py | src/poetry/utils/pip.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.exceptions import PoetryError
from poetry.utils.env import EnvCommandError
if TYPE_CHECKING:
from pathlib import Path
from poetry.utils.env import Env
def pip_install(
path: Path,
environment: Env,
editable: bool ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/patterns.py | src/poetry/utils/patterns.py | from __future__ import annotations
import re
wheel_file_re = re.compile(
r"^(?P<namever>(?P<name>.+?)-(?P<ver>\d[^-]*))"
r"(-(?P<build>\d[^-]*))?"
r"-(?P<pyver>[^-]+)"
r"-(?P<abi>[^-]+)"
r"-(?P<plat>[^-]+)"
r"\.whl$",
re.VERBOSE,
)
sdist_file_re = re.compile(
r"^(?P<namever>(?P<name>... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/threading.py | src/poetry/utils/threading.py | from __future__ import annotations
import functools
import threading
from typing import TYPE_CHECKING
from typing import TypeVar
from typing import overload
from weakref import WeakKeyDictionary
if TYPE_CHECKING:
from collections.abc import Callable
from typing import Any
T = TypeVar("T")
C = TypeVar("C",... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/site_packages.py | src/poetry/utils/env/site_packages.py | from __future__ import annotations
import contextlib
import itertools
from importlib import metadata
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from typing import Literal
from typing import overload
from poetry.utils.helpers import is_dir_writable
from poetry.utils.helpers impor... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/env_manager.py | src/poetry/utils/env/env_manager.py | from __future__ import annotations
import base64
import hashlib
import os
import plistlib
import re
import subprocess
import sys
from functools import cached_property
from pathlib import Path
from subprocess import CalledProcessError
from typing import TYPE_CHECKING
import tomlkit
import virtualenv
from cleo.io.nul... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/script_strings.py | src/poetry/utils/env/script_strings.py | from __future__ import annotations
import packaging.tags
GET_PLATFORMS = f"""
import importlib.util
import json
import sys
from pathlib import Path
spec = importlib.util.spec_from_file_location(
"packaging", Path(r"{packaging.__file__}")
)
packaging = importlib.util.module_from_spec(spec)
sys.modules[spec.name... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/system_env.py | src/poetry/utils/env/system_env.py | from __future__ import annotations
import os
import platform
import site
import sys
import sysconfig
from pathlib import Path
from packaging.tags import Tag
from packaging.tags import interpreter_name
from packaging.tags import interpreter_version
from packaging.tags import sys_tags
from poetry.utils.env.base_env i... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/virtual_env.py | src/poetry/utils/env/virtual_env.py | from __future__ import annotations
import json
import os
import re
import sysconfig
from contextlib import contextmanager
from copy import deepcopy
from functools import cached_property
from pathlib import Path
from typing import TYPE_CHECKING
from typing import Any
from poetry.utils.env.base_env import Env
from poe... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/mock_env.py | src/poetry/utils/env/mock_env.py | from __future__ import annotations
from typing import TYPE_CHECKING
from typing import Any
from poetry.utils.env.null_env import NullEnv
if TYPE_CHECKING:
from packaging.tags import Tag
from poetry.utils.env.base_env import MarkerEnv
from poetry.utils.env.base_env import PythonVersion
class MockEnv(N... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/exceptions.py | src/poetry/utils/env/exceptions.py | from __future__ import annotations
from typing import TYPE_CHECKING
from poetry.utils._compat import decode
if TYPE_CHECKING:
from subprocess import CalledProcessError
class EnvError(Exception):
pass
class IncorrectEnvError(EnvError):
def __init__(self, env_name: str) -> None:
message = f"En... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/base_env.py | src/poetry/utils/env/base_env.py | from __future__ import annotations
import contextlib
import os
import re
import subprocess
import sys
import sysconfig
from abc import ABC
from abc import abstractmethod
from functools import cached_property
from pathlib import Path
from subprocess import CalledProcessError
from typing import TYPE_CHECKING
from typin... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/null_env.py | src/poetry/utils/env/null_env.py | from __future__ import annotations
import sys
from functools import cached_property
from pathlib import Path
from typing import Any
from poetry.utils.env.system_env import SystemEnv
class NullEnv(SystemEnv):
def __init__(
self, path: Path | None = None, base: Path | None = None, execute: bool = False
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/__init__.py | src/poetry/utils/env/__init__.py | from __future__ import annotations
from contextlib import contextmanager
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING
from poetry.utils.env.base_env import Env
from poetry.utils.env.env_manager import EnvManager
from poetry.utils.env.exceptions import EnvCommandErr... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/generic_env.py | src/poetry/utils/env/generic_env.py | from __future__ import annotations
import json
import os
import re
import subprocess
from typing import TYPE_CHECKING
from typing import Any
from poetry.utils._compat import WINDOWS
from poetry.utils.env.script_strings import GET_PATHS
from poetry.utils.env.virtual_env import VirtualEnv
if TYPE_CHECKING:
from ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/python/providers.py | src/poetry/utils/env/python/providers.py | from __future__ import annotations
import dataclasses
import shutil
import sysconfig
from pathlib import Path
from typing import TYPE_CHECKING
import findpython
from findpython.providers.path import PathProvider
from poetry.config.config import Config
from poetry.utils._compat import WINDOWS
if TYPE_CHECKING:
... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/python/exceptions.py | src/poetry/utils/env/python/exceptions.py | from __future__ import annotations
class PythonVersionError(Exception):
pass
class PythonVersionNotFoundError(PythonVersionError):
def __init__(self, expected: str) -> None:
super().__init__(f"Could not find the python executable {expected}")
class NoCompatiblePythonVersionFoundError(PythonVersion... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/python/__init__.py | src/poetry/utils/env/python/__init__.py | from __future__ import annotations
from poetry.utils.env.python.manager import Python
__all__ = ["Python"]
| python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/python/manager.py | src/poetry/utils/env/python/manager.py | from __future__ import annotations
import contextlib
import os
import sys
from functools import cached_property
from pathlib import Path
from typing import TYPE_CHECKING
from typing import NamedTuple
from typing import cast
from typing import overload
import findpython
import packaging.version
from cleo.io.null_io ... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
python-poetry/poetry | https://github.com/python-poetry/poetry/blob/5e1fd5e6cb391beb2b3292b28680461408760ae1/src/poetry/utils/env/python/installer.py | src/poetry/utils/env/python/installer.py | from __future__ import annotations
import dataclasses
from subprocess import CalledProcessError
from typing import TYPE_CHECKING
from typing import Literal
import pbs_installer as pbi
from poetry.core.constraints.version import Version
from poetry.config.config import Config
from poetry.console.exceptions import C... | python | MIT | 5e1fd5e6cb391beb2b3292b28680461408760ae1 | 2026-01-04T14:42:33.943988Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.