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
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,21 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]
language:
[
{python-version: "3.9", toxenv: "py39"},
{python-version: "3.10", toxenv: "py310"},
{python-version: "3.11", toxenv: "py311"},
{python-version: "3.12", toxenv: "py312"},
{python-version: "3.13", toxenv: "py313"},
{python-version: "3.14", toxenv: "py314"},
{python-version: "pypy3.9", toxenv: "pypy39"},
{python-version: "pypy3.10", toxenv: "pypy310"},
{python-version: "pypy3.11", toxenv: "pypy311"},
]
include:
- os: ubuntu-latest
language: {python-version: "3.9", toxenv: "codestyle"}
language: {python-version: "3.10", toxenv: "codestyle"}
- os: ubuntu-latest
language: {python-version: "3.9", toxenv: "lint"}
language: {python-version: "3.10", toxenv: "lint"}
- os: ubuntu-latest
language: {python-version: "3.9", toxenv: "typecheck"}
language: {python-version: "3.10", toxenv: "typecheck"}
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@ classifiers = [
"Topic :: Utilities",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dynamic = ["version"]
readme = "README.md"

Expand Down
2 changes: 0 additions & 2 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@

"""

from __future__ import annotations

import contextlib
import os
import re
Expand Down
2 changes: 0 additions & 2 deletions tests/main_test.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Main tldextract unit tests."""

from __future__ import annotations

import logging
import os
import tempfile
Expand Down
8 changes: 3 additions & 5 deletions tests/test_cache.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Test the caching functionality."""

from __future__ import annotations

import sys
import types
from collections.abc import Hashable
Expand Down Expand Up @@ -32,7 +30,7 @@ def test_disk_cache(tmp_path: Path) -> None:

def test_get_pkg_unique_identifier(monkeypatch: pytest.MonkeyPatch) -> None:
"""Test generating a unique identifier for the version of this package."""
monkeypatch.setattr(sys, "version_info", (3, 9, 1, "final", 0))
monkeypatch.setattr(sys, "version_info", (3, 10, 1, "final", 0))
monkeypatch.setattr(sys, "prefix", "/home/john/.pyenv/versions/myvirtualenv")

mock_version_module = types.ModuleType("tldextract._version", "mocked module")
Expand All @@ -41,13 +39,13 @@ def test_get_pkg_unique_identifier(monkeypatch: pytest.MonkeyPatch) -> None:

assert (
get_pkg_unique_identifier()
== "3.9.1.final__myvirtualenv__f01a7b__tldextract-1.2.3"
== "3.10.1.final__myvirtualenv__f01a7b__tldextract-1.2.3"
)


def test_get_cache_dir(monkeypatch: pytest.MonkeyPatch) -> None:
"""Test finding the cache directory."""
pkg_identifier = "3.9.1.final__myvirtualenv__f01a7b__tldextract-1.2.3"
pkg_identifier = "3.10.1.final__myvirtualenv__f01a7b__tldextract-1.2.3"
monkeypatch.setattr(
tldextract.cache, "get_pkg_unique_identifier", lambda: pkg_identifier
)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_parallel.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Test ability to run in parallel with shared cache."""

from __future__ import annotations

import os
from multiprocessing import Pool
from pathlib import Path
Expand Down
2 changes: 0 additions & 2 deletions tests/test_release.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Test the library maintainer release script."""

from __future__ import annotations

import dataclasses
import sys
from collections.abc import Iterator
Expand Down
2 changes: 0 additions & 2 deletions tldextract/cache.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""Helpers."""

from __future__ import annotations

import errno
import hashlib
import json
Expand Down
2 changes: 0 additions & 2 deletions tldextract/remote.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""tldextract helpers for testing and fetching remote resources."""

from __future__ import annotations

import re
from ipaddress import AddressValueError, IPv6Address
from urllib.parse import scheme_chars
Expand Down
2 changes: 0 additions & 2 deletions tldextract/suffix_list.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""tldextract helpers for testing and fetching remote resources."""

from __future__ import annotations

import logging
import pkgutil
import re
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[tox]
envlist = py{39,310,311,312,313,314},pypy{39,310,311},codestyle,lint,typecheck
envlist = py{310,311,312,313,314},pypy{310,311},codestyle,lint,typecheck

[testenv]
commands = pytest {posargs}
extras = testing

[testenv:codestyle]
basepython = python3.9
basepython = python3.10
commands =
ruff format --check {posargs:.}
extras = testing

[testenv:lint]
basepython = python3.9
basepython = python3.10
commands = ruff check {posargs:.}
extras = testing

[testenv:typecheck]
basepython = python3.9
basepython = python3.10
commands = mypy --show-error-codes scripts tldextract tests
extras = testing