Skip to content

Commit

Permalink
Drops Python 3.8 support (#557)
Browse files Browse the repository at this point in the history
  • Loading branch information
jairhenrique authored Oct 14, 2024
1 parent a954373 commit 03d466d
Show file tree
Hide file tree
Showing 8 changed files with 833 additions and 964 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install the latest version of uv
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Contributing
The easiest way to contribute is to use Cosmic Ray and submit reports for defects or any other issues you come across.
Please see CONTRIBUTING.rst for more details.

.. |Python version| image:: https://img.shields.io/badge/Python_version-3.8+-blue.svg
.. |Python version| image:: https://img.shields.io/badge/Python_version-3.9+-blue.svg
:target: https://www.python.org/
.. |Python version windows| image:: https://img.shields.io/badge/Python_version_(windows)-3.8+-blue.svg
.. |Python version windows| image:: https://img.shields.io/badge/Python_version_(windows)-3.9+-blue.svg
:target: https://www.python.org/
.. |Build Status| image:: https://github.com/sixty-north/cosmic-ray/actions/workflows/python-package.yml/badge.svg
:target: https://github.com/sixty-north/cosmic-ray/actions/workflows/python-package.yml
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'

[project]
name = "cosmic_ray"
requires-python = ">= 3.8"
requires-python = ">= 3.9"
dynamic = ["version"]
authors = [{ name = "Sixty North AS", email = "austin@sixty-north.com" }]
description = "Mutation testing"
Expand All @@ -17,7 +17,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -103,9 +102,9 @@ line-length = 120
[tool.ruff.lint]
select = [
"UP", # PYUPGRADE
"I", # ISORT
"I", # ISORT
]

[tool.ruff.lint.isort]
case-sensitive = true
known-first-party = ["cosmic_ray"]
known-first-party = ["cosmic_ray"]
2 changes: 1 addition & 1 deletion src/cosmic_ray/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging
import uuid
from typing import Iterable
from collections.abc import Iterable

import cosmic_ray.modules
import cosmic_ray.plugins
Expand Down
2 changes: 1 addition & 1 deletion src/cosmic_ray/mutating.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import difflib
import logging
import traceback
from collections.abc import Iterable
from contextlib import contextmanager
from itertools import chain
from pathlib import Path
from typing import Iterable

import cosmic_ray.plugins
from cosmic_ray.ast import Visitor, get_ast
Expand Down
3 changes: 2 additions & 1 deletion src/cosmic_ray/operators/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

import dataclasses
from abc import ABC, abstractmethod
from typing import Optional, Sequence
from collections.abc import Sequence
from typing import Optional


class Operator(ABC):
Expand Down
10 changes: 5 additions & 5 deletions src/cosmic_ray/work_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import enum
import pathlib
from pathlib import Path
from typing import Any, Dict, Optional, Tuple
from typing import Any, Optional


class StrEnum(str, enum.Enum):
Expand Down Expand Up @@ -60,9 +60,9 @@ class MutationSpec:
module_path: Path
operator_name: str
occurrence: int
start_pos: Tuple[int, int]
end_pos: Tuple[int, int]
operator_args: Dict[str, Any] = dataclasses.field(default_factory=dict)
start_pos: tuple[int, int]
end_pos: tuple[int, int]
operator_args: dict[str, Any] = dataclasses.field(default_factory=dict)

# pylint: disable=R0913
def __post_init__(self):
Expand All @@ -86,7 +86,7 @@ class WorkItem:
"""

job_id: str
mutations: Tuple[MutationSpec]
mutations: tuple[MutationSpec]

@classmethod
def single(cls, job_id, mutation: MutationSpec):
Expand Down
1,767 changes: 818 additions & 949 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit 03d466d

Please sign in to comment.