PoC: automatically create a pinned
extra with dependencies pinned from the lock file
#9428
Task Summary
Instruction pytest failed in 01:34
Details
ℹ️ Scheduling was delayed due to a concurrency limit on community tasks
✅ 00:03 clone
✅ 01:17 bootstrap_poetry
✅ 00:17 setup_environment
❌ 01:34 pytest
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
------------------------------ Captured log setup ------------------------------
INFO root:builtin.py:72 find interpreter for spec PythonSpec(path=/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python)
INFO root:builtin.py:79 proposed PythonInfo(spec=CPython3.8.19.final.0-64, system=/usr/local/bin/python3.8, exe=/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python, platform=freebsd14, version='3.8.19 (default, Sep 5 2024, 01:11:09) \n[Clang 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1', encoding_fs_io=utf-8-utf-8)
INFO root:session.py:50 create virtual environment via CPython3Posix(dest=/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil2/venv, clear=False, no_vcs_ignore=False, global=False)
INFO root:session.py:63 add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
-------------- generated xml file: /tmp/cirrus-ci-build/junit.xml --------------
=========================== short test summary info ============================
SKIPPED [1] tests/puzzle/test_solver.py:3809: Poetry no longer has critical package requirements
SKIPPED [1] tests/utils/env/test_env.py:525: Windows only
SKIPPED [1] tests/integration/test_utils_vcs_git.py:315: HTTP authentication credentials not available
SKIPPED [1] tests/console/commands/test_run.py:88: Poetry only installs CMD script files for console scripts of editable dependencies on Windows
SKIPPED [1] tests/utils/env/test_env_manager.py:1291: requires darwin
SKIPPED [1] tests/installation/test_executor.py:305: https://github.com/python-poetry/poetry/issues/7983
SKIPPED [2] tests/installation/test_installer.py:1869: This is not working at the moment due to limitations in the resolver
FAILED tests/console/commands/test_build.py::test_build_with_local_version_label - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_relative_directory_src_layout - FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist'
FAILED tests/console/commands/test_build.py::test_build_with_multiple_readme_files - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_clean[False] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_clean[True] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[None] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_creates_packages_in_dist_directory_if_no_output_is_specified[wheel] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[../dist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_with_clean_non_existing_output - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[dist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_creates_packages_in_dist_directory_if_no_output_is_specified[all] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_creates_packages_in_dist_directory_if_no_output_is_specified[sdist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[absolute] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_build.py::test_build_output_option[test/dir] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_publish.py::test_publish_dist_dir_and_build_options[absolute] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_publish.py::test_publish_dist_dir_and_build_options[tmp/dist] - RuntimeError: lock file version too old
FAILED tests/console/commands/test_publish.py::test_publish_dist_dir_and_build_options[../dist] - RuntimeError: lock file version too old
============ 17 failed, 1950 passed, 8 skipped in 92.06s (0:01:32) =============
Annotations
Check failure on line 81 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L81
tests.console.commands.test_build.test_build_with_local_version_label
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0db568d30>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_local_version_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0db560ac0>
def test_build_with_local_version_label(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry
) -> None:
shutil.rmtree(tmp_project_path / "dist")
local_version_label = "local-version"
> tmp_tester.execute(f"--local-version {local_version_label}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0db568970>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 213 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L213
tests.console.commands.test_build.test_build_relative_directory_src_layout
Raw output
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0')
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x2ef0d83ee8b0>
def test_build_relative_directory_src_layout(
tmp_path: Path, fixture_dir: FixtureDirGetter
) -> None:
tmp_project_path = tmp_path / "project"
with with_working_directory(fixture_dir("simple_project"), tmp_project_path):
shutil.rmtree(tmp_project_path / "dist")
(tmp_project_path / "src").mkdir()
(tmp_project_path / "simple_project").rename(
tmp_project_path / "src" / "simple_project"
)
# We have to use ApplicationTester because CommandTester
# initializes Poetry before passing the directory.
app = Application()
tester = ApplicationTester(app)
tester.execute("build --directory .")
build_dir = tmp_project_path / "dist"
> assert len(list(build_dir.iterdir())) == 2
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:213:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist')
def iterdir(self):
"""Iterate over the files in this directory. Does not yield any
result for the special paths '.' and '..'.
"""
if self._closed:
self._raise_closed()
> for name in self._accessor.listdir(self):
E FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_relative_directory_0/project/dist'
/usr/local/lib/python3.8/pathlib.py:1122: FileNotFoundError
Check failure on line 149 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L149
tests.console.commands.test_build.test_build_with_multiple_readme_files
Raw output
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x2ef0d83ee8b0>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_multiple_readm0')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_multiple_readm0/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x2ef0da3cd9d0>
def test_build_with_multiple_readme_files(
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
) -> None:
source_dir = fixture_dir("with_multiple_readme_files")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("build", poetry, environment=tmp_venv)
> tester.execute()
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:149:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0d7c30a60>
fmt = 'all'
executable = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_multiple_readm0/venv/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 99 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L99
tests.console.commands.test_build.test_build_with_clean[False]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0d6a3eb20>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_clean_False_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0d6a137f0>, clean = False
@pytest.mark.parametrize("clean", [True, False])
def test_build_with_clean(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, clean: bool
) -> None:
dist_dir = tmp_project_path.joinpath("dist")
dist_dir.joinpath("hello").touch(exist_ok=True)
> tmp_tester.execute("--clean" if clean else "")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0d6a3eb50>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 99 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L99
tests.console.commands.test_build.test_build_with_clean[True]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0d792e7c0>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_clean_True_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0e0b73730>, clean = True
@pytest.mark.parametrize("clean", [True, False])
def test_build_with_clean(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, clean: bool
) -> None:
dist_dir = tmp_project_path.joinpath("dist")
dist_dir.joinpath("hello").touch(exist_ok=True)
> tmp_tester.execute("--clean" if clean else "")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:99:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0d792eca0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 180 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L180
tests.console.commands.test_build.test_build_output_option[None]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0d86dda90>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_None_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0d86dd910>, output_dir = None
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
> tmp_tester.execute()
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:180:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0d86dd520>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 68 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L68
tests.console.commands.test_build.test_build_creates_packages_in_dist_directory_if_no_output_is_specified[wheel]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0db572190>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_creates_packages_in0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0de31c9a0>, format = 'wheel'
@pytest.mark.parametrize("format", ["sdist", "wheel", "all"])
def test_build_creates_packages_in_dist_directory_if_no_output_is_specified(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, format: str
) -> None:
shutil.rmtree(tmp_project_path / "dist")
> tmp_tester.execute(f"--format {format}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0db572d90>
fmt = 'wheel'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 186 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L186
tests.console.commands.test_build.test_build_output_option[../dist]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0e337e640>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option____di0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0e3376a30>
output_dir = '../dist'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
build_dir = tmp_project_path / "tmp/dist"
else:
> tmp_tester.execute(f"--output {output_dir}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0e337eb50>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 114 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L114
tests.console.commands.test_build.test_build_with_clean_non_existing_output
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0d790f610>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_with_clean_non_exis0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0db59e400>
def test_build_with_clean_non_existing_output(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry
) -> None:
dist_dir = tmp_project_path.joinpath("dist")
remove_directory(dist_dir, force=True)
assert not dist_dir.exists()
> tmp_tester.execute("--clean")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:114:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0d790f940>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 186 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L186
tests.console.commands.test_build.test_build_output_option[dist]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0d857beb0>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_dist_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0d7439610>
output_dir = 'dist'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
build_dir = tmp_project_path / "tmp/dist"
else:
> tmp_tester.execute(f"--output {output_dir}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0d64f55b0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 68 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L68
tests.console.commands.test_build.test_build_creates_packages_in_dist_directory_if_no_output_is_specified[all]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0dbd56a90>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_creates_packages_in1/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0dd55ceb0>, format = 'all'
@pytest.mark.parametrize("format", ["sdist", "wheel", "all"])
def test_build_creates_packages_in_dist_directory_if_no_output_is_specified(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, format: str
) -> None:
shutil.rmtree(tmp_project_path / "dist")
> tmp_tester.execute(f"--format {format}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0dbd56c10>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 68 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L68
tests.console.commands.test_build.test_build_creates_packages_in_dist_directory_if_no_output_is_specified[sdist]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0e335be20>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_creates_packages_in2/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0e335b280>, format = 'sdist'
@pytest.mark.parametrize("format", ["sdist", "wheel", "all"])
def test_build_creates_packages_in_dist_directory_if_no_output_is_specified(
tmp_tester: CommandTester, tmp_project_path: Path, tmp_poetry: Poetry, format: str
) -> None:
shutil.rmtree(tmp_project_path / "dist")
> tmp_tester.execute(f"--format {format}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:68:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0e335ba30>
fmt = 'sdist'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 183 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L183
tests.console.commands.test_build.test_build_output_option[absolute]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0db579c10>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_absol0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0db579490>
output_dir = 'absolute'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
> tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:183:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0db579ca0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 186 in tests/console/commands/test_build.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_build.py#L186
tests.console.commands.test_build.test_build_output_option[test/dir]
Raw output
tmp_tester = <cleo.testers.command_tester.CommandTester object at 0x2ef0e05c5d60>
tmp_project_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_build_output_option_test_0/project')
tmp_poetry = <poetry.poetry.Poetry object at 0x2ef0e05c5580>
output_dir = 'test/dir'
@pytest.mark.parametrize(
"output_dir", [None, "dist", "test/dir", "../dist", "absolute"]
)
def test_build_output_option(
tmp_tester: CommandTester,
tmp_project_path: Path,
tmp_poetry: Poetry,
output_dir: str,
) -> None:
shutil.rmtree(tmp_project_path / "dist")
if output_dir is None:
tmp_tester.execute()
build_dir = tmp_project_path / "dist"
elif output_dir == "absolute":
tmp_tester.execute(f"--output {tmp_project_path / 'tmp/dist'}")
build_dir = tmp_project_path / "tmp/dist"
else:
> tmp_tester.execute(f"--output {output_dir}")
/tmp/cirrus-ci-build/tests/console/commands/test_build.py:186:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0e05c5460>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 218 in tests/console/commands/test_publish.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_publish.py#L218
tests.console.commands.test_publish.test_publish_dist_dir_and_build_options[absolute]
Raw output
http = <module 'httpretty' from '/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/httpretty/__init__.py'>
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x2ef0d83ee8b0>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil0')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil0/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x2ef0e53c1790>
dist_dir = 'absolute'
@pytest.mark.parametrize("dist_dir", ["../dist", "tmp/dist", "absolute"])
def test_publish_dist_dir_and_build_options(
http: type[httpretty.httpretty],
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
dist_dir: str | None,
) -> None:
source_dir = fixture_dir("simple_project")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
# Remove dist dir because as it will be built again
shutil.rmtree(target_dir / "dist")
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=409, body="Conflict"
)
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("publish", poetry, environment=tmp_venv)
if dist_dir == "absolute":
> exit_code = tester.execute(
f"--dist-dir {target_dir / 'test/dist'} --dry-run --build"
)
/tmp/cirrus-ci-build/tests/console/commands/test_publish.py:218:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/publish.py:83: in handle
self.call("build", args=f"--output {dist_dir}")
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:78: in call
return self.application._run_command(
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/application.py:473: in _run_command
raise error
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/application.py:457: in _run_command
exit_code = command.run(io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0dbd5a700>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 222 in tests/console/commands/test_publish.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_publish.py#L222
tests.console.commands.test_publish.test_publish_dist_dir_and_build_options[tmp/dist]
Raw output
http = <module 'httpretty' from '/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/httpretty/__init__.py'>
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x2ef0d83ee8b0>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil1')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil1/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x2ef0dbd7ad30>
dist_dir = 'tmp/dist'
@pytest.mark.parametrize("dist_dir", ["../dist", "tmp/dist", "absolute"])
def test_publish_dist_dir_and_build_options(
http: type[httpretty.httpretty],
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
dist_dir: str | None,
) -> None:
source_dir = fixture_dir("simple_project")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
# Remove dist dir because as it will be built again
shutil.rmtree(target_dir / "dist")
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=409, body="Conflict"
)
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("publish", poetry, environment=tmp_venv)
if dist_dir == "absolute":
exit_code = tester.execute(
f"--dist-dir {target_dir / 'test/dist'} --dry-run --build"
)
else:
> exit_code = tester.execute(f"--dist-dir {dist_dir} --dry-run --build")
/tmp/cirrus-ci-build/tests/console/commands/test_publish.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/publish.py:83: in handle
self.call("build", args=f"--output {dist_dir}")
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:78: in call
return self.application._run_command(
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/application.py:473: in _run_command
raise error
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/application.py:457: in _run_command
exit_code = command.run(io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0e539fdf0>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError
Check failure on line 222 in tests/console/commands/test_publish.py
cirrus-ci / Tests / FreeBSD (Python 3.8) / pytest
tests/console/commands/test_publish.py#L222
tests.console.commands.test_publish.test_publish_dist_dir_and_build_options[../dist]
Raw output
http = <module 'httpretty' from '/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/httpretty/__init__.py'>
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x2ef0d83ee8b0>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil2')
tmp_venv = VirtualEnv("/tmp/pytest-of-root/pytest-0/popen-gw1/test_publish_dist_dir_and_buil2/venv")
command_tester_factory = <function command_tester_factory.<locals>._tester at 0x2ef0e55ed8b0>
dist_dir = '../dist'
@pytest.mark.parametrize("dist_dir", ["../dist", "tmp/dist", "absolute"])
def test_publish_dist_dir_and_build_options(
http: type[httpretty.httpretty],
fixture_dir: FixtureDirGetter,
tmp_path: Path,
tmp_venv: VirtualEnv,
command_tester_factory: CommandTesterFactory,
dist_dir: str | None,
) -> None:
source_dir = fixture_dir("simple_project")
target_dir = tmp_path / "project"
shutil.copytree(str(source_dir), str(target_dir))
# Remove dist dir because as it will be built again
shutil.rmtree(target_dir / "dist")
http.register_uri(
http.POST, "https://upload.pypi.org/legacy/", status=409, body="Conflict"
)
poetry = Factory().create_poetry(target_dir)
tester = command_tester_factory("publish", poetry, environment=tmp_venv)
if dist_dir == "absolute":
exit_code = tester.execute(
f"--dist-dir {target_dir / 'test/dist'} --dry-run --build"
)
else:
> exit_code = tester.execute(f"--dist-dir {dist_dir} --dry-run --build")
/tmp/cirrus-ci-build/tests/console/commands/test_publish.py:222:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/testers/command_tester.py:88: in execute
self._status_code = self._command.run(self._io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/publish.py:83: in handle
self.call("build", args=f"--output {dist_dir}")
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:78: in call
return self.application._run_command(
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/application.py:473: in _run_command
raise error
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/application.py:457: in _run_command
exit_code = command.run(io)
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/base_command.py:117: in run
return self.execute(io) or 0
/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/lib/python3.8/site-packages/cleo/commands/command.py:61: in execute
return self.handle()
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:118: in handle
self._build(fmt, executable=env.python, target_dir=dist_dir)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <poetry.console.commands.build.BuildCommand object at 0x2ef0e55bcd60>
fmt = 'all'
executable = PosixPath('/.cache/pypoetry/virtualenvs/poetry-XZqP7kBn-py3.8/bin/python')
def _build(
self,
fmt: str,
executable: str | Path | None = None,
*,
target_dir: Path | None = None,
) -> None:
from poetry.masonry.builders import BUILD_FORMATS
if fmt in BUILD_FORMATS:
builders = [BUILD_FORMATS[fmt]]
elif fmt == "all":
builders = list(BUILD_FORMATS.values())
else:
raise ValueError(f"Invalid format: {fmt}")
if local_version_label := self.option("local-version"):
self.poetry.package.version = self.poetry.package.version.replace(
local=local_version_label
)
if not self.poetry.locker.is_locked_groups_and_markers():
> raise RuntimeError("lock file version too old")
E RuntimeError: lock file version too old
/tmp/cirrus-ci-build/src/poetry/console/commands/build.py:75: RuntimeError