Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/auto_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9", "3.8"]
python-version: ["3.14-dev", "3.13", "3.12", "3.11", "3.10"]

steps:
- uses: actions/checkout@v4
Expand All @@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e .[testing]
python -m pip install -e . --group dev
- name: Test with pytest
run: |
pytest tests/
2 changes: 1 addition & 1 deletion .github/workflows/build_zipapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8" # build with oldest supported python
python-version: "3.10" # build with oldest supported python
- name: Build the Zipapp
run: >-
python3 scripts/build_zipapp.py
Expand Down
21 changes: 12 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ authors = [
{ name = "David C Ellis" },
]
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.10"
dependencies = [
"ducktools-lazyimporter",
"ducktools-classbuilder>=0.7.1",
"packaging>=23.2",
"ducktools-lazyimporter>=0.7.3",
"ducktools-classbuilder>=0.9.1",
"packaging>=24.2",
]
classifiers = [
"Development Status :: 3 - Alpha",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Expand All @@ -36,12 +34,17 @@ dynamic = ['version']
[project.urls]
"Homepage" = "https://github.com/davidcellis/ducktools-pythonfinder"

[project.optional-dependencies]
testing = ["pytest", "pytest-cov", "pyfakefs"]

[project.scripts]
"ducktools-pythonfinder" = "ducktools.pythonfinder.__main__:main"

[dependency-groups]
dev = [
"pytest>=8.4",
"pytest-cov>=6.1",
"pyfakefs>=5.8",
"mypy>=1.16",
]

[tool.setuptools.packages.find]
where = ["src"]

Expand Down
4 changes: 2 additions & 2 deletions src/ducktools/pythonfinder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,11 +301,11 @@ def display_remote_binaries(


def main() -> int:
if sys.version_info < (3, 8):
if sys.version_info < (3, 10):
v = sys.version_info
raise UnsupportedPythonError(
f"Python {v.major}.{v.minor}.{v.micro} is not supported. "
f"ducktools.pythonfinder requires Python 3.8 or later."
f"ducktools.pythonfinder requires Python 3.10 or later."
)

if sys.argv[1:]:
Expand Down
4 changes: 1 addition & 3 deletions src/ducktools/pythonfinder/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ def from_str(
metadata = {} if metadata is None else metadata
paths = {} if paths is None else paths

# noinspection PyArgumentList
return cls(
version=version_tuple,
executable=executable,
Expand All @@ -392,7 +391,7 @@ def from_str(
@classmethod
def from_json(
cls,
version: str,
version: list[int | str], # This is actually the list version of [int, int, int, str, int]
executable: str,
architecture: str,
implementation: str,
Expand All @@ -405,7 +404,6 @@ def from_json(

paths = {} if paths is None else paths

# noinspection PyArgumentList
return cls(
version=tuple(version), # type: ignore
executable=executable,
Expand Down
5 changes: 4 additions & 1 deletion tests/test_orgsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from functools import lru_cache

from packaging.specifiers import SpecifierSet
import pytest

Expand All @@ -35,8 +37,9 @@ def website_caches(sources_folder):
return release_cache, release_file_cache


@pytest.fixture(scope="class")
@pytest.fixture(scope="module")
def searcher(website_caches):
@lru_cache
def make_org_search(system, machine):
release_cache, release_file_cache = website_caches
return PythonOrgSearch(
Expand Down
Loading