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

Drop Python 3.6 for --strict-conda-forge #498

Merged
merged 2 commits into from
Sep 21, 2023
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
1 change: 0 additions & 1 deletion grayskull/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Configuration:
)
py_cf_supported: List[PyVer] = field(
default_factory=lambda: [
PyVer(3, 6),
PyVer(3, 7),
PyVer(3, 8),
PyVer(3, 9),
Expand Down
59 changes: 52 additions & 7 deletions tests/test_pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,41 @@ def pypi_metadata():
return json.load(f)


@pytest.fixture
def freeze_py_cf_supported():
return [
PyVer(3, 6),
PyVer(3, 7),
PyVer(3, 8),
PyVer(3, 9),
PyVer(3, 10),
PyVer(3, 11),
]


@pytest.fixture
def recipe_config():
config = Configuration(name="pytest")
config = Configuration(
name="pytest",
py_cf_supported=[
PyVer(3, 6),
PyVer(3, 7),
PyVer(3, 8),
PyVer(3, 9),
PyVer(3, 10),
PyVer(3, 11),
PyVer(3, 12),
],
supported_py=[
PyVer(2, 7),
PyVer(3, 6),
PyVer(3, 7),
PyVer(3, 8),
PyVer(3, 9),
PyVer(3, 10),
PyVer(3, 11),
],
)
recipe = Recipe(name="pytest")
return recipe, config

Expand Down Expand Up @@ -1048,8 +1080,12 @@ def test_multiples_exit_setup():
assert create_python_recipe("pyproj=2.6.1")[0]


def test_sequence_inside_another_in_dependencies():
recipe = create_python_recipe("unittest2=1.1.0", is_strict_cf=True)[0]
def test_sequence_inside_another_in_dependencies(freeze_py_cf_supported):
recipe = create_python_recipe(
"unittest2=1.1.0",
is_strict_cf=True,
py_cf_supported=freeze_py_cf_supported,
)[0]
assert sorted(recipe["requirements"]["host"]) == sorted(
[
"python >=3.6",
Expand Down Expand Up @@ -1174,8 +1210,12 @@ def test_replace_slash_in_imports():
assert ["asgi_lifespan"] == recipe["test"]["imports"]


def test_add_python_min_to_strict_conda_forge():
recipe = create_python_recipe("dgllife=0.2.8", is_strict_cf=True)[0]
def test_add_python_min_to_strict_conda_forge(freeze_py_cf_supported):
recipe = create_python_recipe(
"dgllife=0.2.8",
is_strict_cf=True,
py_cf_supported=freeze_py_cf_supported,
)[0]
assert recipe["build"]["noarch"] == "python"
assert recipe["requirements"]["host"][0] == "python >=3.6"
assert "python >=3.6" in recipe["requirements"]["run"]
Expand Down Expand Up @@ -1304,8 +1344,13 @@ def test_remove_selectors_pkgs_if_needed_with_recipe():
)


def test_noarch_python_min_constrain():
recipe, _ = create_python_recipe("humre", is_strict_cf=True, version="0.1.1")
def test_noarch_python_min_constrain(freeze_py_cf_supported):
recipe, _ = create_python_recipe(
"humre",
is_strict_cf=True,
version="0.1.1",
py_cf_supported=freeze_py_cf_supported,
)
assert recipe["requirements"]["run"] == ["python >=3.6"]


Expand Down
Loading