Skip to content

Commit

Permalink
Merge branch 'main' into stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr authored Sep 1, 2024
2 parents f4c2316 + 392e36f commit 0c3a641
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
7 changes: 7 additions & 0 deletions conda_smithy/linter/hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ def hint_check_spdx(about_section, hints):


def hint_pip_no_build_backend(host_or_build_section, package_name, hints):
# we do NOT exclude all build backends since some of them
# need another backend to bootstrap
# the list below are the ones that self-bootstrap without
# another build backend
if package_name in ["pdm-backend", "setuptools"]:
return

if host_or_build_section and any(
req.split(" ")[0] == "pip" for req in host_or_build_section
):
Expand Down
10 changes: 9 additions & 1 deletion conda_smithy/linter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import re
import sys
import time
from collections.abc import Sequence
from functools import lru_cache
from glob import glob
Expand Down Expand Up @@ -208,8 +209,15 @@ def _lint_package_version(version: Optional[str]) -> Optional[str]:
return invalid_version.format(ver=ver, err=e)


@lru_cache(maxsize=1)
def load_linter_toml_metdata():
# ensure we refresh the cache every hour
ttl = 3600
time_salt = int(time.time() / ttl)
return load_linter_toml_metdata_internal(time_salt)


@lru_cache(maxsize=1)
def load_linter_toml_metdata_internal(time_salt):
hints_toml_url = "https://raw.githubusercontent.com/conda-forge/conda-forge-pinning-feedstock/main/recipe/linter_hints/hints.toml"
hints_toml_req = requests.get(hints_toml_url)
if hints_toml_req.status_code != 200:
Expand Down
23 changes: 23 additions & 0 deletions news/2046-pip-hint-exclude.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Fixed error where some python build backends were flagged as not having a backend. (#2046)

**Security:**

* <news item>

0 comments on commit 0c3a641

Please sign in to comment.