Skip to content

Commit

Permalink
Remove support for Python before 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanlukasczyk committed Mar 14, 2022
1 parent bd08630 commit 61f20e8
Show file tree
Hide file tree
Showing 43 changed files with 159 additions and 224 deletions.
20 changes: 0 additions & 20 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,6 @@ before_script:
needs: ["build"]
<<: *python-cache

unit-tests:python-3.8:
<<: *unit-tests
variables:
PYTHON_VERSION: '3.8-bullseye'

unit-tests:python-3.9:
<<: *unit-tests
variables:
PYTHON_VERSION: '3.9-bullseye'

unit-tests:python-3.10:
<<: *unit-tests
variables:
Expand All @@ -85,16 +75,6 @@ unit-tests:python-3.10:
needs: ["build"]
<<: *python-cache

nightly-tests:python-3.8:
extends: .nightly-tests
variables:
PYTHON_VERSION: '3.8-bullseye'

nightly-tests:python-3.9:
extends: .nightly-tests
variables:
PYTHON_VERSION: '3.9-bullseye'

nightly-tests:python-3.10:
extends: .nightly-tests
variables:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ repos:
args: [--fix=lf]

- repo: https://github.com/asottile/pyupgrade
rev: v2.31.0
rev: v2.31.1
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py310-plus]

- repo: https://github.com/PyCQA/isort
rev: 5.10.1
Expand Down
7 changes: 6 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
# SPDX-License-Identifier: LGPL-3.0-or-later

version: 2

build:
os: ubuntu-20.04
tools:
python: "3.10"

sphinx:
configuration: docs/conf.py

python:
version: 3.8
install:
- requirements: docs/requirements.txt
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ your system.
## Prerequisites

Before you begin, ensure you have met the following requirements:
- You have installed Python 3.8, 3.9, or 3.10 (we have not yet tested with Python
- You have installed Python 3.10 (we have not yet tested with Python
3.11, there might be some problems due to changed internals regarding the byte-code
instrumentation).

**Attention:** Pynguin now requires Python 3.10! Older versions are no longer
supported!
- You have a recent Linux/macOS/Windows machine.

Please consider reading the [online documentation](https://pynguin.readthedocs.io)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Build stage for Pynguin
FROM python:3.10.2-slim-bullseye AS build
MAINTAINER Stephan Lukasczyk <[email protected]>
ENV POETRY_VERSION "1.1.12"
ENV POETRY_VERSION "1.1.13"

WORKDIR /pynguin-build

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ In particular, we want to point to Sec. 2.14 of Google's style guide, regarding

Import from ``__future__`` are not permitted except for the ``from __future__ import
annotations`` feature that allows more concise type hints. Pynguin requires at least
Python 3.8—there is not need to support older versions here!
Python 3.10—there is not need to support older versions here!

Checks
^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion docs/source/_static/queue_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def enqueue(self, x: int) -> bool:
self.tail = 0
return True

def dequeue(self) -> Optional[int]:
def dequeue(self) -> int | None:
if self.size == 0:
return None
x = self.data[self.head]
Expand Down
115 changes: 40 additions & 75 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pynguin/assertion/assertiontraceobserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""Provides an abstract observer that can be used to generate assertions."""
import copy
from types import ModuleType
from typing import List, Optional, cast
from typing import cast

import pynguin.assertion.assertion as ass
import pynguin.assertion.assertion_trace as at
Expand All @@ -30,7 +30,7 @@ class AssertionTraceObserver(ex.ExecutionObserver):

def __init__(self) -> None:
self._trace: at.AssertionTrace = at.AssertionTrace()
self._watch_list: List[vr.VariableReference] = []
self._watch_list: list[vr.VariableReference] = []

def clear(self) -> None:
"""Clear the existing gathered trace."""
Expand Down Expand Up @@ -59,7 +59,7 @@ def after_statement_execution(
self,
statement: st.Statement,
exec_ctx: ex.ExecutionContext,
exception: Optional[Exception] = None,
exception: Exception | None = None,
) -> None:
if exception is not None:
return
Expand Down
Loading

0 comments on commit 61f20e8

Please sign in to comment.