Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a4f728c
Bump CI matrix from PyPy 3.10 to PyPy 3.11
jaraco Jul 12, 2026
317be02
TOML proper indentation (jaraco/skeleton#202)
DimitriPapadopoulos Jul 12, 2026
b5c8ef5
Remove free-threaded 3.13 (3.13t) from CI matrix
jaraco Jul 12, 2026
d9a367c
Expect modern ruff and simplify configs (jaraco/skeleton#185)
Avasam Jul 12, 2026
384acd9
Use reusable workflow to eliminate setup duplication between test and…
Copilot Jul 12, 2026
f7aefdf
Instruct agents to fetch and read the skeleton document as a required…
jaraco Jul 12, 2026
1f8c1f0
Move continue-on-error into the reusable workflow's run job. (jaraco/…
jaraco Jul 14, 2026
f2c3206
Disable C408 (unnecessary-collection-call)
jaraco Aug 1, 2026
f02e90a
Configure C408 to allow dict(a=1) rather than disabling it
jaraco Aug 6, 2026
8aa3460
Ignore N999 (invalid-module-name) (jaraco/skeleton#212)
jaraco Aug 16, 2026
2c43cdf
Ignore B008 (function-call-in-default-argument). (jaraco/skeleton#215)
jaraco Aug 28, 2026
9e08129
Ignore PLC0414 (useless-import-alias). (jaraco/skeleton#216)
jaraco Oct 1, 2026
9695460
Pass secrets through to the reusable test-suite workflow. (jaraco/ske…
jaraco Oct 2, 2026
bf72f9b
Merge remote-tracking branch 'skeleton/main' into skeleton-update
jaraco Oct 3, 2026
239bf8b
Remove compatibility shims for Python 3.9 and earlier.
jaraco Oct 3, 2026
5e71ae1
Use a literal for the empty dict (C408).
jaraco Oct 3, 2026
7fd353d
Avoid reassigning cls and mark unused unpacked variable (PLW0642, RUF…
jaraco Oct 3, 2026
641c46a
Satisfy new ruff 0.16 default rules in tests.
jaraco Oct 3, 2026
403bd7d
Ignore B018 (useless-expression).
jaraco Oct 3, 2026
70b2471
Merge jaraco/skeleton#220 (ignore B018)
jaraco Oct 3, 2026
0509d57
Restore bare attribute access in tests now that B018 is ignored.
jaraco Oct 3, 2026
759663e
Restore alpharep names in unpacking and suppress RUF059.
jaraco Oct 3, 2026
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
60 changes: 11 additions & 49 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,6 @@ on:
permissions:
contents: read

env:
# Environment variable to support color support (jaraco/skeleton#66)
FORCE_COLOR: 1

# Suppress noisy pip warnings
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
PIP_NO_WARN_SCRIPT_LOCATION: 'true'

# Ensure tests can sense settings about the environment
TOX_OVERRIDE: >-
testenv.pass_env+=GITHUB_*,FORCE_COLOR


jobs:
test:
strategy:
Expand All @@ -48,32 +35,15 @@ jobs:
platform: ubuntu-latest
- python: "3.13"
platform: ubuntu-latest
- python: "3.13t"
platform: ubuntu-latest
- python: "3.15"
platform: ubuntu-latest
- python: pypy3.10
- python: pypy3.11
platform: ubuntu-latest
runs-on: ${{ matrix.platform }}
continue-on-error: ${{ matrix.python == '3.15' }}
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
# Install dependencies for building packages on pre-release Pythons
# jaraco/skeleton#161
if: matrix.python == '3.15' && matrix.platform == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libxml2-dev libxslt-dev
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
- name: Install tox
run: python -m pip install tox
- name: Run
run: tox
uses: ./.github/workflows/test-suite.yml
with:
python: ${{ matrix.python }}
platform: ${{ matrix.platform }}
secrets: inherit

collateral:
strategy:
Expand All @@ -82,19 +52,11 @@ jobs:
job:
- diffcov
- docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Install tox
run: python -m pip install tox
- name: Eval ${{ matrix.job }}
run: tox -e ${{ matrix.job }}
uses: ./.github/workflows/test-suite.yml
with:
platform: ubuntu-latest
tox-env: ${{ matrix.job }}
secrets: inherit

check: # This job does nothing and is only used for the branch protection
if: always()
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test Suite

on:
workflow_call:
inputs:
python:
description: Python version
type: string
default: "3.x"
platform:
description: Runner platform
type: string
default: ubuntu-latest
tox-env:
description: >-
Tox environment to run; if empty, runs default tox
type: string
default: ""

env:
# Environment variable to support color support (jaraco/skeleton#66)
FORCE_COLOR: 1

# Suppress noisy pip warnings
PIP_DISABLE_PIP_VERSION_CHECK: 'true'
PIP_NO_WARN_SCRIPT_LOCATION: 'true'

# Ensure tests can sense settings about the environment
TOX_OVERRIDE: >-
testenv.pass_env+=GITHUB_*,FORCE_COLOR

jobs:
run:
runs-on: ${{ inputs.platform }}
# Tolerate failures on pre-release Pythons (jaraco/skeleton#199)
continue-on-error: ${{ inputs.python == '3.15' }}
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install build dependencies
# Install dependencies for building packages on pre-release Pythons
# jaraco/skeleton#161
if: inputs.python == '3.15' && inputs.platform == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y libxml2-dev libxslt-dev
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python }}
allow-prereleases: true
- name: Install tox
run: python -m pip install tox
- name: Run
if: ${{ !inputs.tox-env }}
run: tox
- name: Run ${{ inputs.tox-env }}
if: ${{ inputs.tox-env }}
run: tox -e ${{ inputs.tox-env }}
4 changes: 1 addition & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
This project follows the [skeleton](https://blog.jaraco.com/skeleton); please read for context on development.

Before committing, ensure .git/info/exclude is populated from jaraco/dotfiles .gitignore_global so that generated artifacts are never staged.
**Required first step:** Before reading further or making any changes, fetch and read the [skeleton](https://blog.jaraco.com/skeleton/) document in its entirety. It is the authoritative source of truth for this project's structure, conventions, testing, and release process, and is not duplicated here. Do not act until you have ingested it.
13 changes: 0 additions & 13 deletions conftest.py

This file was deleted.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ enabler = [
type = [
# upstream

# Exclude PyPy from type checks (python/mypy#20454 jaraco/skeleton#187)
# Exclude PyPy from type checks (python/mypy#20454 jaraco/skeleton#187)
"pytest-mypy >= 1.0.1; platform_python_implementation != 'PyPy'",

# local
Expand Down
40 changes: 27 additions & 13 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,58 @@ extend-select = [
"C901", # complex-structure
"I", # isort
"PERF401", # manual-list-comprehension
"UP", # pyupgrade (Code modernization for strings, annotations, conditions, ...)

# Ensure modern type annotation syntax and best practices
# Not including those covered by type-checkers or exclusive to Python 3.11+
"FA", # flake8-future-annotations
"F404", # late-future-import
"PYI", # flake8-pyi
"UP006", # non-pep585-annotation
"UP007", # non-pep604-annotation
"UP010", # unnecessary-future-import
"UP035", # deprecated-import
"UP037", # quoted-annotation
"UP043", # unnecessary-default-type-args

# local
]
ignore = [
# upstream
"UP015", # redundant-open-modes, explicit is preferred

# Typeshed rejects complex or non-literal defaults for maintenance and testing reasons,
# irrelevant to this project.
"PYI011", # typed-argument-default-in-stub
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191",
"E111",
"E114",
"E117",
"D206",
"D300",
"Q000",
"Q001",
"Q002",
"Q003",
"COM812",
"COM819",

# N999 (invalid-module-name) yields false positives when a project's
# source directory is the distribution name and is redirected to a
# different import package (e.g. namespace layouts); the dotted directory
# name is itself a valid module. See
# https://github.com/astral-sh/ruff/issues/27801.
"N999",

# B008 is over-reaching; see jaraco/skeleton#214
"B008", # function-call-in-default-argument

# PLC0414 flags `import X as X`, the idiom type checkers recognize as an
# explicit re-export, and its fix (with F401) silently drops public names.
# See jaraco/skeleton#210.
"PLC0414", # useless-import-alias

# B018 flags bare attribute access, which is useful for its side effect
# (forcing a lazy import, probing a property) and more elegant in tests
# than assigning to an ignored name. See jaraco/skeleton#112.
"B018", # useless-expression

# local
]

[lint.flake8-comprehensions]
# Retain the elegant dict(a=1) keyword-call style; C408 still flags dict()
# and dict([...]). See jaraco/skeleton#210.
allow-dict-calls-with-keyword-arguments = true

[format]
# Enable preview to get hugged parenthesis unwrapping and other nice surprises
# See https://github.com/jaraco/skeleton/pull/133#issuecomment-2239538373
Expand Down
2 changes: 1 addition & 1 deletion tests/compat/py310.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if sys.version_info >= (3, 11):
from importlib.resources.abc import Traversable
else: # pragma: no cover
from .py38 import Traversable
from importlib.abc import Traversable # type: ignore[attr-defined, unused-ignore]


__all__ = ['Traversable']
2 changes: 1 addition & 1 deletion tests/compat/py313.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ def _for_archive(self, archive):
ForArchive = type(
'ForArchive',
(),
dict(_for_archive=_for_archive) if sys.version_info < (3, 14) else dict(),
dict(_for_archive=_for_archive) if sys.version_info < (3, 14) else {},
)
9 changes: 0 additions & 9 deletions tests/compat/py38.py

This file was deleted.

10 changes: 5 additions & 5 deletions tests/test_complexity.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class TestComplexity(unittest.TestCase):
@pytest.mark.flaky
def test_implied_dirs_performance(self):
best, others = big_o.big_o(
best, _others = big_o.big_o(
compose(consume, zipfile._path.CompleteDirs._implied_dirs),
lambda size: [
'/'.join(string.ascii_lowercase + str(n)) for n in range(size)
Expand Down Expand Up @@ -68,7 +68,7 @@ def make_deep_path(cls, depth):
return ''.join(('d/',) * depth)

def test_baseline_regex_complexity(self):
best, others = big_o.big_o(
best, _others = big_o.big_o(
lambda path: re.fullmatch(r'[^/]*\\.txt', path),
self.make_deep_path,
max_n=100,
Expand All @@ -78,7 +78,7 @@ def test_baseline_regex_complexity(self):

@pytest.mark.flaky
def test_glob_depth(self):
best, others = big_o.big_o(
best, _others = big_o.big_o(
lambda path: consume(path.glob('*.txt')),
self.make_zip_path,
max_n=100,
Expand All @@ -88,7 +88,7 @@ def test_glob_depth(self):

@pytest.mark.flaky
def test_glob_width(self):
best, others = big_o.big_o(
best, _others = big_o.big_o(
lambda path: consume(path.glob('*.txt')),
lambda size: self.make_zip_path(width=size),
max_n=100,
Expand All @@ -98,7 +98,7 @@ def test_glob_width(self):

@pytest.mark.flaky
def test_glob_width_and_depth(self):
best, others = big_o.big_o(
best, _others = big_o.big_o(
lambda path: consume(path.glob('*.txt')),
lambda size: self.make_zip_path(depth=size, width=size),
max_n=10,
Expand Down
Loading
Loading