Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer emit a FutureWarning when run with flake8<5; add a CI job to run with flake8<5 #293

Merged
merged 1 commit into from
Oct 6, 2022
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
15 changes: 15 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,21 @@ jobs:
- run: pip install -e .
- run: pip install -r requirements-dev.txt
- run: python3 -m pytest -vv
tests-flake8-v4:
name: pytest suite with flake8 v4
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
# Run on Python 3.7, as the importlib_metadata compatibility problems with flake8 v5
# are much less on Python 3.8+, where importlib.metadata is available in the stdlib
python-version: 3.7
- run: pip install "flake8<5"
- run: pip install -e .
- run: pip install -r requirements-dev.txt
- run: python3 -m pytest -vv
check-typeshed:
name: typeshed_primer
timeout-minutes: 5
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ Bugfixes:
`__all__` definitions.
* Expand Y015 so that errors are emitted for assignments to negative numbers.

Other changes:
* Since v22.8.1, flake8-pyi has emitted a `FutureWarning` if run with flake8<5,
warning that the plugin would soon become incompatible with flake8<5. Due to
some issues that mean that some users are unable to upgrade to flake8>=5,
however, flake8-pyi no longer intends to remove support for running the
plugin with flake8<5 before Python 3.7 has reached end-of-life. As such, the
`FutureWarning` is no longer emitted.

## 22.8.2

New error codes:
Expand Down
13 changes: 0 additions & 13 deletions pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,6 @@ def unparse(node: ast.AST) -> str:
LOG = logging.getLogger("flake8.pyi")
FLAKE8_MAJOR_VERSION = flake8.__version_info__[0]

if FLAKE8_MAJOR_VERSION < 5:
import warnings

warnings.warn(
(
"flake8-pyi will drop support for running with flake8 < 5.0.0 "
"in a future version. This will not happen until November 2022 "
"at the earliest."
),
category=FutureWarning,
)


if sys.version_info >= (3, 9):
_LiteralMember: TypeAlias = ast.expr
else:
Expand Down