Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

prefer stdlib TemporaryDirectory #7680

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

prefer stdlib TemporaryDirectory

8b66b68
Select commit
Loading
Failed to load commit list.
Draft

prefer stdlib TemporaryDirectory #7680

prefer stdlib TemporaryDirectory
8b66b68
Select commit
Loading
Failed to load commit list.
Cirrus CI / Tests / FreeBSD (Python 3.9) / pytest failed Apr 8, 2024 in 2m 14s

Task Summary

Instruction pytest failed in 01:13

Details

ℹ️ Scheduling was delayed due to a concurrency limit on community tasks

✅ 00:03 clone
✅ 00:40 bootstrap_poetry
✅ 00:14 setup_environment
❌ 01:13 pytest

FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[False-exception0-get_requires_for_build] - assert False
 +  where False = <built-in method startswith of str object at 0x3efba2a10400>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x3efba2a10400> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_build_system_requires_install_failure - assert False
 +  where False = <built-in method startswith of str object at 0x3efba4e35000>('Package operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildInstallError\n\n  Failed to install poetry-core>=1.1.0a7.\n  \n  Output:\n  output\n  \n  Error:\n  error\n\n')
 +    where <built-in method startswith of str object at 0x3efba4e35000> = 'Package operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.'.startswith
FAILED tests/installation/test_executor.py::test_build_system_requires_not_available - assert False
 +  where False = <built-in method startswith of str object at 0x27bcd3bdf800>("Package operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/build_system_requires_not_available)\n\n  SolveFailure\n\n  Because -root- depends on poetry-core (0.999) which doesn't match any versions, version solving failed.\n")
 +    where <built-in method startswith of str object at 0x27bcd3bdf800> = 'Package operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/build_system_requires_not_available)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.'.startswith
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess_encoding[Err\xf6r on stderr-utf-8] - assert (('Errör on stderr')) in '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'
 +  where '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n' = <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x3efba8f65c70>>()
 +    where <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x3efba8f65c70>> = <cleo.io.buffered_io.BufferedIO object at 0x3efba8f65c70>.fetch_output
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[False-exception1-get_requires_for_build] - assert False
 +  where False = <built-in method startswith of str object at 0x3efba2914900>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x3efba2914900> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_executor_should_write_pep610_url_references_for_non_wheel_urls[False-False-True-True] - assert 0 == 1
 +  where 0 = len([])
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess_encoding[None-utf-8] - assert ((None or 'Errör on stdout')) in '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'
 +  where '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n' = <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x3efba8623af0>>()
 +    where <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x3efba8623af0>> = <cleo.io.buffered_io.BufferedIO object at 0x3efba8623af0>.fetch_output
FAILED tests/installation/test_executor.py::test_executor_should_write_pep610_url_references_for_non_wheel_urls[True-False-True-False] - assert 0 == 1
 +  where 0 = len([])
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess_encoding[None-latin-1] - assert ((None or 'Errör on stdout')) in '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'
 +  where '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n' = <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x3efba9966fa0>>()
 +    where <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x3efba9966fa0>> = <cleo.io.buffered_io.BufferedIO object at 0x3efba9966fa0>.fetch_output
FAILED tests/installation/test_executor.py::test_executor_should_write_pep610_url_references_for_non_wheel_files - assert 0 == 1
 +  where 0 = len([])
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[True-exception1-get_requires_for_build] - assert False
 +  where False = <built-in method startswith of str object at 0x3efba481e300>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x3efba481e300> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_executor_known_hashes[package_files0-expected_url_reference0] - assert 0 == 1
 +  where 0 = len([])
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[True-exception1-build] - assert False
 +  where False = <built-in method startswith of str object at 0x27bcd7863c00>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x27bcd7863c00> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess_encoding[Err\xf6r on stderr-latin-1] - assert (('Errör on stderr')) in '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'
 +  where '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n' = <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x27bcdabe73d0>>()
 +    where <bound method BufferedIO.fetch_output of <cleo.io.buffered_io.BufferedIO object at 0x27bcdabe73d0>> = <cleo.io.buffered_io.BufferedIO object at 0x27bcdabe73d0>.fetch_output
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[False-exception1-build] - assert False
 +  where False = <built-in method startswith of str object at 0x3efba481d500>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x3efba481d500> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[True-exception0-build] - assert False
 +  where False = <built-in method startswith of str object at 0x3efba481e300>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x3efba481e300> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[True-exception0-get_requires_for_build] - assert False
 +  where False = <built-in method startswith of str object at 0x27bcd7864300>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x27bcd7864300> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_executor_known_hashes[package_files1-expected_url_reference1] - assert 0 == 1
 +  where 0 = len([])
FAILED tests/installation/test_executor.py::test_build_backend_errors_are_reported_correctly_if_caused_by_subprocess[False-exception0-build] - assert False
 +  where False = <built-in method startswith of str object at 0x27bcd7864a00>('\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  IsolatedBuildError\n\n  hide the original error\n  \n  original error\n')
 +    where <built-in method startswith of str object at 0x27bcd7864a00> = '\nPackage operations: 1 install, 0 updates, 0 removals\n\n  - Installing simple-project (1.2.3 /tmp/cirrus-ci-build/tests/fixtures/simple_project)\n\n  TypeError\n\n  __init__() got an unexpected keyword argument \'ignore_cleanup_errors\'\n\n  at /tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46 in ephemeral_environment\n       42│ def ephemeral_environment(\n       43│     executable: Path | None = None,\n       44│     flags: dict[str, str | bool] | None = None,\n       45│ ) -> Iterator[VirtualEnv]:\n    →  46│     with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:\n       47│         # TODO: cache PEP 517 build environment corresponding to each project venv\n       48│         venv_dir = Path(tmp_dir) / ".venv"\n       49│         EnvManager.build_venv(\n       50│             path=venv_dir,\n\nCannot install simple-project.\n\n'.startswith
FAILED tests/installation/test_executor.py::test_executor_known_hashes[package_files2-expected_url_reference2] - assert 0 == 1
 +  where 0 = len([])
============ 86 failed, 1592 passed, 7 skipped in 70.85s (0:01:10) =============
����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

Annotations

Check failure on line 247 in tests/repositories/test_pypi_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_pypi_repository.py#L247

tests.repositories.test_pypi_repository.test_pypi_repository_supports_reading_bz2_files
Raw output
pypi_repository = <poetry.repositories.pypi_repository.PyPiRepository object at 0x27bcd710f5b0>

    def test_pypi_repository_supports_reading_bz2_files(
        pypi_repository: PyPiRepository,
    ) -> None:
        repo = pypi_repository
        repo._fallback = True
>       package = repo.package("twisted", Version.parse("18.9.0"))

/tmp/cirrus-ci-build/tests/repositories/test_pypi_repository.py:247: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/pypi_repository.py:177: in _get_release_info
    info = self._get_info_from_links(links)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:329: in _get_info_from_links
    return self._get_info_from_metadata(sdists[0]) or self._get_info_from_sdist(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:160: in _get_info_from_sdist
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.pypi_repository.PyPiRepository object at 0x27bcd710f5b0>
link = <Link https://files.pythonhosted.org/packages/5d/0e/a72d85a55761c2c3ff1cb968143a2fd5f360220779ed90e0fadf4106d4f2/Twisted-18.9.0.tar.bz2>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 263 in tests/masonry/builders/test_editable_builder.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/masonry/builders/test_editable_builder.py#L263

tests.masonry.builders.test_editable_builder.test_builder_setup_generation_runs_with_pip_editable
Raw output
fixture_dir = <function fixture_dir.<locals>._fixture_dir at 0x27bcd6078ca0>
tmp_path = PosixPath('/tmp/pytest-of-root/pytest-0/popen-gw0/test_builder_setup_generation_0')

    @pytest.mark.network
    def test_builder_setup_generation_runs_with_pip_editable(
        fixture_dir: FixtureDirGetter, tmp_path: Path
    ) -> None:
        # create an isolated copy of the project
        fixture = fixture_dir("extended_project")
        extended_project = tmp_path / "extended_project"
    
        shutil.copytree(fixture, extended_project)
        assert extended_project.exists()
    
        poetry = Factory().create_poetry(extended_project)
    
        # we need a venv with pip and setuptools since we are verifying setup.py builds
>       with ephemeral_environment(flags={"no-setuptools": False, "no-pip": False}) as venv:

/tmp/cirrus-ci-build/tests/masonry/builders/test_editable_builder.py:263: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

executable = None, flags = {'no-pip': False, 'no-setuptools': False}

    @contextmanager
    def ephemeral_environment(
        executable: Path | None = None,
        flags: dict[str, str | bool] | None = None,
    ) -> Iterator[VirtualEnv]:
>       with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46: TypeError

Check failure on line 197 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L197

tests.repositories.test_http_repository.test_calculate_sha256[mock_hashes1]
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd7c25c70>
mock_hashes = {'sha256': 'e216b70f013c47b82a72540d34347632c5bfe59fd54f5fe5d51f6a68b19aaf84'}

    @pytest.mark.parametrize(
        "mock_hashes",
        [
            None,
            {"sha256": "e216b70f013c47b82a72540d34347632c5bfe59fd54f5fe5d51f6a68b19aaf84"},
            {"md5": "be7589b4902793e66d7d979bd8581591"},
        ],
    )
    def test_calculate_sha256(
        mocker: MockerFixture, mock_hashes: dict[str, Any] | None
    ) -> None:
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
        domain = "foo.com"
        link = Link(f"https://{domain}/{filename}", hashes=mock_hashes)
        repo = MockRepository()
    
>       calculated_hash = repo.calculate_sha256(link)

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:197: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd7c74760>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 233 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L233

tests.repositories.test_http_repository.test_calculate_sha256_defaults_to_sha256_on_md5_errors
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd5618880>

    def test_calculate_sha256_defaults_to_sha256_on_md5_errors(
        mocker: MockerFixture,
    ) -> None:
        raised_value_error = False
    
        def mock_hashlib_md5_error() -> None:
            nonlocal raised_value_error
            raised_value_error = True
            raise ValueError(
                "[digital envelope routines: EVP_DigestInit_ex] disabled for FIPS"
            )
    
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
        mock_hashlib_md5 = mocker.patch("hashlib.md5", side_effect=mock_hashlib_md5_error)
    
        domain = "foo.com"
        link = Link(
            f"https://{domain}/{filename}",
            hashes={"md5": "be7589b4902793e66d7d979bd8581591"},
        )
        repo = MockRepository()
    
>       calculated_hash = repo.calculate_sha256(link)

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:233: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd72be4f0>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 67 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L67

tests.repositories.test_http_repository.test_get_info_from_wheel[False-True]
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd34568e0>
lazy_wheel = True, supports_range_requests = False

    @pytest.mark.parametrize("lazy_wheel", [False, True])
    @pytest.mark.parametrize("supports_range_requests", [None, False, True])
    def test_get_info_from_wheel(
        mocker: MockerFixture, lazy_wheel: bool, supports_range_requests: bool | None
    ) -> None:
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        with ZipFile(filepath) as zf:
            metadata, _ = parse_email(zf.read("poetry_core-1.5.0.dist-info/METADATA"))
    
        mock_metadata_from_wheel_url = mocker.patch(
            "poetry.repositories.http_repository.metadata_from_wheel_url",
            return_value=metadata,
        )
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
    
        domain = "foo.com"
        url = f"https://{domain}/{filename}"
        repo = MockRepository(lazy_wheel)
        assert not repo._supports_range_requests
        if lazy_wheel and supports_range_requests is not None:
            repo._supports_range_requests[domain] = supports_range_requests
    
>       info = repo._get_info_from_wheel(Link(url))

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd71ec190>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 67 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L67

tests.repositories.test_http_repository.test_get_info_from_wheel[True-False]
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd7009220>
lazy_wheel = False, supports_range_requests = True

    @pytest.mark.parametrize("lazy_wheel", [False, True])
    @pytest.mark.parametrize("supports_range_requests", [None, False, True])
    def test_get_info_from_wheel(
        mocker: MockerFixture, lazy_wheel: bool, supports_range_requests: bool | None
    ) -> None:
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        with ZipFile(filepath) as zf:
            metadata, _ = parse_email(zf.read("poetry_core-1.5.0.dist-info/METADATA"))
    
        mock_metadata_from_wheel_url = mocker.patch(
            "poetry.repositories.http_repository.metadata_from_wheel_url",
            return_value=metadata,
        )
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
    
        domain = "foo.com"
        url = f"https://{domain}/{filename}"
        repo = MockRepository(lazy_wheel)
        assert not repo._supports_range_requests
        if lazy_wheel and supports_range_requests is not None:
            repo._supports_range_requests[domain] = supports_range_requests
    
>       info = repo._get_info_from_wheel(Link(url))

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd73a69a0>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 67 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L67

tests.repositories.test_http_repository.test_get_info_from_wheel[None-False]
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd5e92c10>
lazy_wheel = False, supports_range_requests = None

    @pytest.mark.parametrize("lazy_wheel", [False, True])
    @pytest.mark.parametrize("supports_range_requests", [None, False, True])
    def test_get_info_from_wheel(
        mocker: MockerFixture, lazy_wheel: bool, supports_range_requests: bool | None
    ) -> None:
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        with ZipFile(filepath) as zf:
            metadata, _ = parse_email(zf.read("poetry_core-1.5.0.dist-info/METADATA"))
    
        mock_metadata_from_wheel_url = mocker.patch(
            "poetry.repositories.http_repository.metadata_from_wheel_url",
            return_value=metadata,
        )
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
    
        domain = "foo.com"
        url = f"https://{domain}/{filename}"
        repo = MockRepository(lazy_wheel)
        assert not repo._supports_range_requests
        if lazy_wheel and supports_range_requests is not None:
            repo._supports_range_requests[domain] = supports_range_requests
    
>       info = repo._get_info_from_wheel(Link(url))

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd4b8ae80>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 67 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L67

tests.repositories.test_http_repository.test_get_info_from_wheel[False-False]
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd7beb970>
lazy_wheel = False, supports_range_requests = False

    @pytest.mark.parametrize("lazy_wheel", [False, True])
    @pytest.mark.parametrize("supports_range_requests", [None, False, True])
    def test_get_info_from_wheel(
        mocker: MockerFixture, lazy_wheel: bool, supports_range_requests: bool | None
    ) -> None:
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        with ZipFile(filepath) as zf:
            metadata, _ = parse_email(zf.read("poetry_core-1.5.0.dist-info/METADATA"))
    
        mock_metadata_from_wheel_url = mocker.patch(
            "poetry.repositories.http_repository.metadata_from_wheel_url",
            return_value=metadata,
        )
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
    
        domain = "foo.com"
        url = f"https://{domain}/{filename}"
        repo = MockRepository(lazy_wheel)
        assert not repo._supports_range_requests
        if lazy_wheel and supports_range_requests is not None:
            repo._supports_range_requests[domain] = supports_range_requests
    
>       info = repo._get_info_from_wheel(Link(url))

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd7cda550>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 197 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L197

tests.repositories.test_http_repository.test_calculate_sha256[mock_hashes2]
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd6064b80>
mock_hashes = {'md5': 'be7589b4902793e66d7d979bd8581591'}

    @pytest.mark.parametrize(
        "mock_hashes",
        [
            None,
            {"sha256": "e216b70f013c47b82a72540d34347632c5bfe59fd54f5fe5d51f6a68b19aaf84"},
            {"md5": "be7589b4902793e66d7d979bd8581591"},
        ],
    )
    def test_calculate_sha256(
        mocker: MockerFixture, mock_hashes: dict[str, Any] | None
    ) -> None:
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
        domain = "foo.com"
        link = Link(f"https://{domain}/{filename}", hashes=mock_hashes)
        repo = MockRepository()
    
>       calculated_hash = repo.calculate_sha256(link)

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:197: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd4a0ab50>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 197 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L197

tests.repositories.test_http_repository.test_calculate_sha256[None]
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd6ce80a0>
mock_hashes = None

    @pytest.mark.parametrize(
        "mock_hashes",
        [
            None,
            {"sha256": "e216b70f013c47b82a72540d34347632c5bfe59fd54f5fe5d51f6a68b19aaf84"},
            {"md5": "be7589b4902793e66d7d979bd8581591"},
        ],
    )
    def test_calculate_sha256(
        mocker: MockerFixture, mock_hashes: dict[str, Any] | None
    ) -> None:
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        filepath = MockRepository.DIST_FIXTURES / filename
        mock_download = mocker.patch(
            "poetry.repositories.http_repository.download_file",
            side_effect=lambda _, dest, *args, **kwargs: shutil.copy(filepath, dest),
        )
        domain = "foo.com"
        link = Link(f"https://{domain}/{filename}", hashes=mock_hashes)
        repo = MockRepository()
    
>       calculated_hash = repo.calculate_sha256(link)

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:197: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd5ea4c10>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 123 in tests/repositories/test_http_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/repositories/test_http_repository.py#L123

tests.repositories.test_http_repository.test_get_info_from_wheel_state_sequence
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd7be85b0>

    def test_get_info_from_wheel_state_sequence(mocker: MockerFixture) -> None:
        """
        1. We know nothing:
           Try range requests, which are not supported and fall back to complete download.
        2. Range requests were not supported so far:
           We do not try range requests again.
        3. Range requests were still not supported so far:
           We do not try range requests again, but we notice that the response header
           contains "Accept-Ranges: bytes", so range requests are at least supported
           for some files, which means we want to try again.
        4. Range requests are supported for some files:
           We try range requests (success).
        5. Range requests are supported for some files:
           We try range requests (failure), but do not forget that range requests are
           supported for some files.
        6. Range requests are supported for some files:
           We try range requests (success).
        """
        mock_metadata_from_wheel_url = mocker.patch(
            "poetry.repositories.http_repository.metadata_from_wheel_url"
        )
        mock_download = mocker.patch("poetry.repositories.http_repository.download_file")
    
        filename = "poetry_core-1.5.0-py3-none-any.whl"
        domain = "foo.com"
        link = Link(f"https://{domain}/{filename}")
        repo = MockRepository()
    
        # 1. range request and download
        mock_metadata_from_wheel_url.side_effect = HTTPRangeRequestUnsupported
    
        with contextlib.suppress(PackageInfoError):
>           repo._get_info_from_wheel(link)

/tmp/cirrus-ci-build/tests/repositories/test_http_repository.py:123: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.repositories.test_http_repository.MockRepository object at 0x27bcd5f16400>
link = <Link https://foo.com/poetry_core-1.5.0-py3-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_package_yanked[black-21.11b0-True-Broken regex dependency. Use 21.11b1 instead.]
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba3743fd0>
name = 'black'
version = Version(epoch=0, release=Release(major=21, minor=11, patch=None, extra=(), precision=2, text='21.11', _compare_key=(21...1, 11)), ReleaseTag(phase='b', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('black', '21.11b0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

package_name = 'black', version = '21.11b0', yanked = True
yanked_reason = 'Broken regex dependency. Use 21.11b1 instead.'
legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba3743fd0>

    @pytest.mark.parametrize(
        "package_name, version, yanked, yanked_reason",
        [
            ("black", "19.10b0", False, ""),
            ("black", "21.11b0", True, "Broken regex dependency. Use 21.11b1 instead."),
        ],
    )
    def test_package_yanked(
        package_name: str,
        version: str,
        yanked: bool,
        yanked_reason: str,
        legacy_repository: LegacyRepository,
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package(package_name, Version.parse(version))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:484: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:316: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_python3_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba3743fd0>
link = <Link https://files.pythonhosted.org/packages/3d/ad/1cf514e7f9ee4c3d8df7c839d7977f7605ad76557f3fca741ec67f76dba6/black...1b0-py3-none-any.whl#sha256=e16b6879ed61f9268994b879174fad1cb2319a651afd20f8cf036428ac65f846 (requires-python:>=3.6.2)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_package_yanked[black-19.10b0-False-]
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba503a370>
name = 'black'
version = Version(epoch=0, release=Release(major=19, minor=10, patch=None, extra=(), precision=2, text='19.10', _compare_key=(19...9, 10)), ReleaseTag(phase='b', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('black', '19.10b0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

package_name = 'black', version = '19.10b0', yanked = False, yanked_reason = ''
legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba503a370>

    @pytest.mark.parametrize(
        "package_name, version, yanked, yanked_reason",
        [
            ("black", "19.10b0", False, ""),
            ("black", "21.11b0", True, "Broken regex dependency. Use 21.11b1 instead."),
        ],
    )
    def test_package_yanked(
        package_name: str,
        version: str,
        yanked: bool,
        yanked_reason: str,
        legacy_repository: LegacyRepository,
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package(package_name, Version.parse(version))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:484: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:316: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_python3_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba503a370>
link = <Link https://files.pythonhosted.org/packages/fd/bb/ad34bbc93d1bea3de086d7c59e528d4a503ac8fe318bd1fa48605584c3d2/black...10b0-py36-none-any.whl#sha256=3471ff321348d851b6f3047f4ed42c88622ac038caf7c2d160bd653334c88e88 (requires-python:>=3.6)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_get_package_information_sets_appropriate_python_versions_if_wheels_only
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba52e3a90>
name = 'futures'
version = Version(epoch=0, release=Release(major=3, minor=2, patch=0, extra=(), precision=3, text='3.2.0', _compare_key=(3, 2)),...(3, 2)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('futures', '3.2.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba52e3a90>

    def test_get_package_information_sets_appropriate_python_versions_if_wheels_only(
        legacy_repository: LegacyRepository,
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package("futures", Version.parse("3.2.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:313: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:321: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_python2_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba52e3a90>
link = <Link https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futur...0-py2-none-any.whl#sha256=d89e1540e8b553fbda912230db359954365a1f5d0d0fa7fab96ad3969d9d5a93 (requires-python:>=2.6, <3)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_get_package_information_fallback_read_setup
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba50422b0>
name = 'jupyter'
version = Version(epoch=0, release=Release(major=1, minor=0, patch=0, extra=(), precision=3, text='1.0.0', _compare_key=(1,)), p...y=(1,)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('jupyter', '1.0.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba50422b0>

    def test_get_package_information_fallback_read_setup(
        legacy_repository: LegacyRepository,
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package("jupyter", Version.parse("1.0.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:138: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:352: in _links_to_data
    file_hash = self.calculate_sha256(link)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba50422b0>
link = <Link https://files.pythonhosted.org/packages/c9/a9/371d0b8fe37dd231cf4b2cff0a9f0f25e98f3a73c3771742444be27f2944/jupyter-1.0.0.tar.gz>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_get_package_retrieves_non_sha256_hashes
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6212340>
name = 'ipython'
version = Version(epoch=0, release=Release(major=7, minor=5, patch=0, extra=(), precision=3, text='7.5.0', _compare_key=(7, 5)),...(7, 5)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('ipython', '7.5.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6212340>
dist_hash_getter = <function dist_hash_getter.<locals>.get_hash at 0x3efba2b39670>

    def test_get_package_retrieves_non_sha256_hashes(
        legacy_repository: LegacyRepository, dist_hash_getter: DistributionHashGetter
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package("ipython", Version.parse("7.5.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:407: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:352: in _links_to_data
    file_hash = self.calculate_sha256(link)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6212340>
link = <Link https://files.pythonhosted.org/packages/a9/2e/41dce4ed129057e05a555a7f9629aa2d5f81fdcd4d16568bc24b75a1d2c9/ipython-7.5.0-py3-none-any.whl#md5=99a386eca39b536033c71aacf9f98e2b (requires-python:>=3.5)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_page_filters_out_invalid_package_names
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba421dc10>
name = 'pytest'
version = Version(epoch=0, release=Release(major=3, minor=5, patch=0, extra=(), precision=3, text='3.5.0', _compare_key=(3, 5)),...(3, 5)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('pytest', '3.5.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository_with_extra_packages = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba421dc10>
dist_hash_getter = <function dist_hash_getter.<locals>.get_hash at 0x3efba502b3a0>

    def test_page_filters_out_invalid_package_names(
        legacy_repository_with_extra_packages: LegacyRepository,
        dist_hash_getter: DistributionHashGetter,
    ) -> None:
        repo = legacy_repository_with_extra_packages
        packages = repo.find_packages(Factory.create_dependency("pytest", "*"))
        assert len(packages) == 1
        assert packages[0].name == "pytest"
        assert packages[0].version == Version.parse("3.5.0")
    
>       package = repo.package("pytest", Version.parse("3.5.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:102: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:254: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba421dc10>
link = <Link https://files.pythonhosted.org/packages/ed/96/271c93f75212c06e2a7ec3e2fa8a9c90acee0a4838dc05bf379ea09aae31/pytes...c2ae3196d74805c2eba24f350ae4c791a5b9b397c79b41506a48dc64ca (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_package_not_canonicalized
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba2212f10>
name = 'discord.py'
version = Version(epoch=0, release=Release(major=2, minor=0, patch=0, extra=(), precision=3, text='2.0.0', _compare_key=(2,)), p...y=(2,)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('discord-py', '2.0.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba2212f10>

    def test_package_not_canonicalized(legacy_repository: LegacyRepository) -> None:
        repo = legacy_repository
    
>       package = repo.package("discord.py", Version.parse("2.0.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:225: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:316: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_python3_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba2212f10>
link = <Link https://files.pythonhosted.org/packages/0e/d9/7b057cab41c16144925ba4f96dab576a8ebb7b80a98d40e06bd94298eb3b/disco...0.0-py3-none-any.whl#sha256=054c3d8cf89a8e37a691e0268232dad23e07f4e9a06f33454c3bafeaba34a9b7 (requires-python:>=3.8.0)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_package_partial_yank
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba42c5c70>
name = 'futures'
version = Version(epoch=0, release=Release(major=3, minor=2, patch=0, extra=(), precision=3, text='3.2.0', _compare_key=(3, 2)),...(3, 2)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('futures', '3.2.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba42c5c70>
legacy_repository_partial_yank = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba42c5580>

    def test_package_partial_yank(
        legacy_repository: LegacyRepository,
        legacy_repository_partial_yank: LegacyRepository,
    ) -> None:
        repo = legacy_repository
>       package = repo.package("futures", Version.parse("3.2.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:497: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:321: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_python2_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba42c5c70>
link = <Link https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futur...0-py2-none-any.whl#sha256=d89e1540e8b553fbda912230db359954365a1f5d0d0fa7fab96ad3969d9d5a93 (requires-python:>=2.6, <3)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 483 in tests/utils/env/test_env.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

tests/utils/env/test_env.py#L483

tests.utils.env.test_env.test_build_environment_called_build_script_specified
Raw output
mocker = <pytest_mock.plugin.MockerFixture object at 0x27bcd6abbf40>
extended_without_setup_poetry = <poetry.poetry.Poetry object at 0x27bcd6bc13a0>

    def test_build_environment_called_build_script_specified(
        mocker: MockerFixture,
        extended_without_setup_poetry: Poetry,
    ) -> None:
        patched_install = mocker.patch("poetry.utils.isolated_build.IsolatedEnv.install")
    
>       with ephemeral_environment() as project_env:

/tmp/cirrus-ci-build/tests/utils/env/test_env.py:483: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

executable = None, flags = None

    @contextmanager
    def ephemeral_environment(
        executable: Path | None = None,
        flags: dict[str, str | bool] | None = None,
    ) -> Iterator[VirtualEnv]:
>       with TemporaryDirectory(ignore_cleanup_errors=True) as tmp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/utils/env/__init__.py:46: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_find_links_for_package_yanked[black-19.10b0-False-]
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6d95ee0>
name = 'black'
version = Version(epoch=0, release=Release(major=19, minor=10, patch=None, extra=(), precision=2, text='19.10', _compare_key=(19...9, 10)), ReleaseTag(phase='b', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('black', '19.10b0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

package_name = 'black', version = '19.10b0', yanked = False, yanked_reason = ''
legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6d95ee0>

    @pytest.mark.parametrize(
        "package_name, version, yanked, yanked_reason",
        [
            ("black", "19.10b0", False, ""),
            ("black", "21.11b0", True, "Broken regex dependency. Use 21.11b1 instead."),
        ],
    )
    def test_find_links_for_package_yanked(
        package_name: str,
        version: str,
        yanked: bool,
        yanked_reason: str,
        legacy_repository: LegacyRepository,
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package(package_name, Version.parse(version))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:522: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:316: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_python3_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6d95ee0>
link = <Link https://files.pythonhosted.org/packages/fd/bb/ad34bbc93d1bea3de086d7c59e528d4a503ac8fe318bd1fa48605584c3d2/black...10b0-py36-none-any.whl#sha256=3471ff321348d851b6f3047f4ed42c88622ac038caf7c2d160bd653334c88e88 (requires-python:>=3.6)>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_get_package_retrieves_packages_with_no_hashes
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba5eb99d0>
name = 'jupyter'
version = Version(epoch=0, release=Release(major=1, minor=0, patch=0, extra=(), precision=3, text='1.0.0', _compare_key=(1,)), p...y=(1,)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('jupyter', '1.0.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba5eb99d0>
dist_hash_getter = <function dist_hash_getter.<locals>.get_hash at 0x3efba3572ee0>

    def test_get_package_retrieves_packages_with_no_hashes(
        legacy_repository: LegacyRepository, dist_hash_getter: DistributionHashGetter
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package("jupyter", Version.parse("1.0.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:455: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:352: in _links_to_data
    file_hash = self.calculate_sha256(link)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba5eb99d0>
link = <Link https://files.pythonhosted.org/packages/c9/a9/371d0b8fe37dd231cf4b2cff0a9f0f25e98f3a73c3771742444be27f2944/jupyter-1.0.0.tar.gz>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_get_package_from_both_py2_and_py3_specific_wheels_python_constraint
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6db3940>
name = 'poetry-test-py2-py3-metadata-merge'
version = Version(epoch=0, release=Release(major=0, minor=1, patch=0, extra=(), precision=3, text='0.1.0', _compare_key=(0, 1)),...(0, 1)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('poetry-test-py2-py3-metadata-merge', '0.1.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6db3940>

    def test_get_package_from_both_py2_and_py3_specific_wheels_python_constraint(
        legacy_repository: LegacyRepository,
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package("poetry-test-py2-py3-metadata-merge", Version.parse("0.1.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:365: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:352: in _links_to_data
    file_hash = self.calculate_sha256(link)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba6db3940>
link = <Link https://files.pythonhosted.org/packages/52/19/poetry_test_py2_py3_metadata_merge-0.1.0-py2-none-any.whl>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_get_package_retrieves_non_sha256_hashes_mismatching_known_hash
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba22089a0>
name = 'ipython'
version = Version(epoch=0, release=Release(major=5, minor=7, patch=0, extra=(), precision=3, text='5.7.0', _compare_key=(5, 7)),...(5, 7)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('ipython', '5.7.0') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba22089a0>
dist_hash_getter = <function dist_hash_getter.<locals>.get_hash at 0x3efba533b0d0>

    def test_get_package_retrieves_non_sha256_hashes_mismatching_known_hash(
        legacy_repository: LegacyRepository, dist_hash_getter: DistributionHashGetter
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package("ipython", Version.parse("5.7.0"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:428: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:352: in _links_to_data
    file_hash = self.calculate_sha256(link)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:373: in calculate_sha256
    with self._cached_or_downloaded_file(link) as filepath:
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba22089a0>
link = <Link https://files.pythonhosted.org/packages/52/19/aadde98d6bde1667d0bf431fb2d22451f880aaa373e0a241c7e7cb5815a0/ipython-5.7.0-py2-none-any.whl#md5=cf35939995e0fd8c44fca7509308abde>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError

Check failure on line 57 in src/poetry/repositories/legacy_repository.py

See this annotation in the file changed.

@cirrus-ci cirrus-ci / Tests / FreeBSD (Python 3.9) / pytest

src/poetry/repositories/legacy_repository.py#L57

tests.repositories.test_legacy_repository.test_get_package_information_chooses_correct_distribution
Raw output
self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba2c3b4c0>
name = 'isort'
version = Version(epoch=0, release=Release(major=4, minor=3, patch=4, extra=(), precision=3, text='4.3.4', _compare_key=(4, 3, 4... 3, 4)), ReleaseTag(phase='z', number=0), ReleaseTag(phase='', number=0), ReleaseTag(phase='z', number=0), ((0, ''),)))
extras = None

    def package(
        self, name: str, version: Version, extras: list[str] | None = None
    ) -> Package:
        """
        Retrieve the release information.
    
        This is a heavy task which takes time.
        We have to download a package to get the dependencies.
        We also need to download every file matching this release
        to get the various hashes.
    
        Note that this will be cached so the subsequent operations
        should be much faster.
        """
        try:
>           index = self._packages.index(Package(name, version))
E           ValueError: Package('isort', '4.3.4') is not in list

/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:57: ValueError

During handling of the above exception, another exception occurred:

legacy_repository = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba2c3b4c0>

    def test_get_package_information_chooses_correct_distribution(
        legacy_repository: LegacyRepository,
    ) -> None:
        repo = legacy_repository
    
>       package = repo.package("isort", Version.parse("4.3.4"))

/tmp/cirrus-ci-build/tests/repositories/test_legacy_repository.py:286: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:61: in package
    package = super().package(name, version, extras)
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:75: in package
    return self.get_release_info(canonicalize_name(name), version).to_package(
/tmp/cirrus-ci-build/src/poetry/repositories/cached_repository.py:50: in get_release_info
    return PackageInfo.load(self._get_release_info(name, version))
/tmp/cirrus-ci-build/src/poetry/repositories/legacy_repository.py:114: in _get_release_info
    return self._links_to_data(
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:364: in _links_to_data
    info = self._get_info_from_links(links, ignore_yanked=not data.yanked)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:260: in _get_info_from_links
    ) or self._get_info_from_wheel(universal_python2_wheel)
/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:141: in _get_info_from_wheel
    with self._cached_or_downloaded_file(
/usr/local/lib/python3.9/contextlib.py:119: in __enter__
    return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <poetry.repositories.legacy_repository.LegacyRepository object at 0x3efba2c3b4c0>
link = <Link https://files.pythonhosted.org/packages/41/d8/a945da414f2adc1d9e2f7d6e7445b27f2be42766879062a2e63616ad4199/isort-4.3.4-py2-none-any.whl#sha256=3bbfc8f6119a46a48064487afb0b3ca9daa4b09fbfd94336a24c7616b71db2ca>

    @contextmanager
    def _cached_or_downloaded_file(
        self, link: Link, *, raise_accepts_ranges: bool = False
    ) -> Iterator[Path]:
        self._log(f"Downloading: {link.url}", level="debug")
>       with TemporaryDirectory(ignore_cleanup_errors=True) as temp_dir:
E       TypeError: __init__() got an unexpected keyword argument 'ignore_cleanup_errors'

/tmp/cirrus-ci-build/src/poetry/repositories/http_repository.py:107: TypeError