Skip to content

Do not pull in Python 2 as dependency #2589

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

Merged
merged 1 commit into from
Dec 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- "3.8"
- "3.7"
os:
- ubuntu-20.04
- ubuntu-22.04
- windows-2022
- macos-12
steps:
Expand All @@ -36,10 +36,6 @@ jobs:
fetch-depth: 0
- name: Install self-tox
run: python -m pip install .
- name: Setup python2.7 as test dependency
uses: actions/setup-python@v4
with:
python-version: 2.7
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v4
with:
Expand Down
17 changes: 0 additions & 17 deletions tests/tox_env/python/virtual_env/test_virtualenv_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import os
import sys
from pathlib import Path

import pytest
from pytest_mock import MockerFixture
Expand Down Expand Up @@ -169,19 +168,3 @@ def test_list_dependencies_command(tox_project: ToxProjectCreator) -> None:
result.assert_success()
request: ExecuteRequest = execute_calls.call_args[0][3]
assert request.cmd == ["python", "-m", "pip", "freeze"]


def test_can_build_and_run_python_2(tox_project: ToxProjectCreator, demo_pkg_inline: Path) -> None:
try:
session_via_cli(["-p", "2.7", "venv"])
except RuntimeError: # pragma: no cover
pytest.skip("no python 2.7 interpreter") # pragma: no cover
proj = tox_project({"tox.ini": "[testenv]\npackage=wheel"})
execute_calls = proj.patch_execute(lambda r: 0 if "install" in r.run_id else None)
result = proj.run("r", "-e", "py27", "--root", str(demo_pkg_inline))
result.assert_success()

install_cmd = next(
i[0][3].cmd for i in execute_calls.call_args_list if "install" in i[0][3].run_id
) # pragma: no cover
assert install_cmd[:-1] == ["python", "-E", "-m", "pip", "install", "--force-reinstall", "--no-deps"]