From 9bc8cb7ae422f1e427f3815ea05aadde4488b43d Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 20:41:20 -0400 Subject: [PATCH 01/10] Update copyright dates and contact email --- LICENSE.txt | 2 +- src/flake8_absolute_import/__init__.py | 4 ++-- src/flake8_absolute_import/core.py | 4 ++-- src/flake8_absolute_import/version.py | 4 ++-- tests/test_plugin.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 7f9d634..3742dc3 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019-2021 Brian Skinn +Copyright (c) 2019-2023 Brian Skinn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/src/flake8_absolute_import/__init__.py b/src/flake8_absolute_import/__init__.py index 808ebb0..5fe1ff3 100644 --- a/src/flake8_absolute_import/__init__.py +++ b/src/flake8_absolute_import/__init__.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import diff --git a/src/flake8_absolute_import/core.py b/src/flake8_absolute_import/core.py index 1073dbf..63ba5a2 100644 --- a/src/flake8_absolute_import/core.py +++ b/src/flake8_absolute_import/core.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import diff --git a/src/flake8_absolute_import/version.py b/src/flake8_absolute_import/version.py index e7492de..0ef6626 100644 --- a/src/flake8_absolute_import/version.py +++ b/src/flake8_absolute_import/version.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 4db5ca4..ed24f3c 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -3,13 +3,13 @@ flake8 plugin to require absolute imports **Author** - Brian Skinn (bskinn@alum.mit.edu) + Brian Skinn (brian.skinn@gmail.com) **File Created** 6 Sep 2019 **Copyright** - \(c) Brian Skinn 2019-2021 + \(c) Brian Skinn 2019-2023 **Source Repository** http://github.com/bskinn/flake8-absolute-import From 81d7fa65dc909a6a2de5e5e0f8adeaf23b10d79c Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 20:41:38 -0400 Subject: [PATCH 02/10] Add CC-BY to license blurb --- README.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 393e0a4..8b31553 100644 --- a/README.rst +++ b/README.rst @@ -57,8 +57,13 @@ and feature requests are welcomed at the Copyright (c) Brian Skinn 2019-2023 -License: The MIT License. See `LICENSE.txt `__ -for full license terms. +The ``flake8-absolute-import`` documentation (including docstrings and README) +is licensed under a +`Creative Commons Attribution 4.0 International License `__ +(CC-BY). The ``flake8-absolute-import`` codebase is released under the +`MIT License `__. See +`LICENSE.txt `__ for +full license terms. .. _ImportFrom: https://greentreesnakes.readthedocs.io/en/latest/nodes.html#ImportFrom .. |ImportFrom| replace:: ``ImportFrom`` From 75ae3a4e7843f84b202dcbfdb4bc8a15f3b710a4 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 21:41:16 -0400 Subject: [PATCH 03/10] Switch version def from setup.py to pyproject.toml --- pyproject.toml | 3 +++ setup.py | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d19ef3b..cbc890c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,6 +65,9 @@ license-files = [ ] include-package-data = false +[tool.setuptools.dynamic] +version = {attr = "flake8_absolute_import.version.__version__"} + [tool.setuptools.package-dir] "" = "src" diff --git a/setup.py b/setup.py index ed30809..19adc57 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,6 @@ def content_update(content, pattern, sub): setup( - version=__version__, long_description=readme(), long_description_content_type="text/x-rst", ) From 67d25ccc478a4899a91b984e906e4478c97b4c4b Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 21:43:44 -0400 Subject: [PATCH 04/10] Bump version to 1.0.0.2 --- src/flake8_absolute_import/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flake8_absolute_import/version.py b/src/flake8_absolute_import/version.py index 0ef6626..50b0805 100644 --- a/src/flake8_absolute_import/version.py +++ b/src/flake8_absolute_import/version.py @@ -21,4 +21,4 @@ """ -__version__ = "1.0.1.dev0" +__version__ = "1.0.0.2" From f4c38aabebf9fc9a906a272ba5f2713a4139240c Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 21:48:35 -0400 Subject: [PATCH 05/10] Adjust README wording --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 8b31553..ada254b 100644 --- a/README.rst +++ b/README.rst @@ -33,7 +33,7 @@ flake8-absolute-import Lint 'em out! -``flake8-absolute-import`` uses a simple check of the AST for each +``flake8-absolute-import`` uses a direct check of the AST for each ``from x import y`` statement to flag relative imports. Specifically, it checks for a nonzero *level* attribute on each |ImportFrom|_ node. From 0a8592c9733a1d48783b0b9d1cbc04edeace87cb Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 21:55:23 -0400 Subject: [PATCH 06/10] Fix for shields.io breaking change Per https://github.com/badges/shields/issues/8671 --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index ada254b..769ceec 100644 --- a/README.rst +++ b/README.rst @@ -5,7 +5,7 @@ flake8-absolute-import **Current Development Version:** -.. image:: https://img.shields.io/github/workflow/status/bskinn/flake8-absolute-import/ci-tests?logo=github +.. image:: https://img.shields.io/github/actions/workflow/status/bskinn/flake8-absolute-import/ci_tests.yml?branch=main&logo=github :alt: GitHub Workflow Status :target: https://github.com/bskinn/flake8-absolute-import/actions From 2cabad04eda5f5958a0d577a318d20200f1f0fef Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 22:02:42 -0400 Subject: [PATCH 07/10] Add pepy.tech downloads badge --- README.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.rst b/README.rst index 769ceec..7044895 100644 --- a/README.rst +++ b/README.rst @@ -27,6 +27,9 @@ flake8-absolute-import .. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black +.. image:: https://pepy.tech/badge/flake8-absolute-import/month + :target: https://pepy.tech/project/flake8-absolute-import + ---- *Don't like relative imports?* From aeff008d4e4174a18b5a465cbfe0895ea4439013 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 22:38:33 -0400 Subject: [PATCH 08/10] Update CHANGELOG --- CHANGELOG.md | 64 +++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 179229d..ed90d11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,44 @@ and this project strives to adhere (mostly) to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +### [1.0.0.2] - 2023-10-08 + +This is an administrative release, primarily to update officially supported +Python and flake8 versions. There should be no plugin behavior changes between +this version and v1.0.0.1. + +#### Dependencies + +- Support for Python 3.12 was officially added + +- Support for Python 3.6 and 3.7 was officially removed, though the plugin + should continue to work for Python 3.6+ + +- The minimum supported flake8 version is now 5.0 + +#### Administrative + +- `MANIFEST.in` was augmented with the files needed to allow the test suite to + run from an unpacked sdist. + +- The build metadata was completely migrated from `setup.cfg` to + `pyproject.toml`, and the maximum possible metadata is now drawn from + `pyproject.toml` (all but `long_description`). + +- The read of the project version and the load of the README contents in + `setup.py` was modernized/improved. + +#### Testing + +- Python versions in the GitHub Actions and Azure Pipelines matrices were updated. + +- An Azure Pipelines job was added to confirm that a built sdist carries all the + files needed to allow the test suite to run. + +- Obscure parameters/variables in some tests were given better names, and string + formatting was upgraded to use f-strings. + + ### [1.0.0.1] - 2021-12-04 This is an administrative/metadata release, primarily to update officially @@ -15,36 +53,36 @@ this version and v1.0.0. #### Dependencies -- Support for Python 3.10 and 3.11-dev was officially added +- Support for Python 3.10 and 3.11-dev was officially added. -- Support for Python 3.5 was officially removed, though the plugin should - remain compatible +- Support for Python 3.5 was officially removed, though the plugin should remain + compatible. #### Testing -- Support for running the `tox` matrix on Windows was removed (it doesn't - seem to work right with the batch-files-in-bin-folder approach I use for - multiple Pythons in development) +- Support for running the `tox` matrix on Windows was removed (it doesn't seem + to work right with the batch-files-in-bin-folder approach I use for multiple + Pythons in development). -- Routine CI switched from Travis CI to GitHub Actions +- Routine CI was switched from Travis CI to GitHub Actions. -- CI and `tox` versions updated to focus on Python 3.10 +- CI and `tox` versions were updated to focus on Python 3.10. -- `pytest` and `coverage` configs revised to avoid `source`/`include` collision - in `coverage` +- `pytest` and `coverage` configs were revised to avoid `source`/`include` + collision in `coverage`. #### Administrative - `setuptools` configuration has been mostly ported to `setup.cfg`, except for the - pieces that still need to be defined dynamically + pieces that still need to be defined dynamically. - Built artifacts for distribution should now be created using `build`, which - has been added to `requirements-dev.txt` + has been added to `requirements-dev.txt`. ### [1.0.0] - 2019-09-09 #### Features -- Detect any relative imports and report with error code ABS101 +- Detect any relative imports and report with error code ABS101. From 0e7abd1ff9e10d614f45216003e58606149a7db3 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 22:39:12 -0400 Subject: [PATCH 09/10] Reflow AUTHORS.md --- AUTHORS.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 11ef574..24aebe9 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -1,8 +1,16 @@ Credits ======= -`flake8-absolute-import` is authored and maintained by Brian Skinn ([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)). The skeleton of the AST-based implementation used for this plugin was shamelessly swiped from [`flake8-2020`](https://github.com/asottile/flake8-2020) by [Anthony Sottile](https://github.com/asottile). +`flake8-absolute-import` is authored and maintained by Brian Skinn +([Blog](https://bskinn.github.io)) ([Twitter](https://twitter.com/btskinn)). The +skeleton of the AST-based implementation used for this plugin was shamelessly +swiped from [`flake8-2020`](https://github.com/asottile/flake8-2020) by +[Anthony Sottile](https://github.com/asottile). -While there is disagreement about the upsides and downsides of relative imports in Python, as best this author can tell there are numerous projects and developers out there who desire to hold strictly to absolute imports in their code. The goal of this flake8 plugin is to simplify enforcement of this policy. +While there is disagreement about the upsides and downsides of relative imports +in Python, as best this author can tell there are numerous projects and +developers out there who desire to hold strictly to absolute imports in their +code. The goal of this flake8 plugin is to simplify enforcement of this policy. -v1.0 provides a single catch-all error, `ABS101`, raised on any relative imports found. +v1.0 provides a single catch-all error, `ABS101`, raised on any relative imports +found. From 6da7f75439422c403ee8f9760f62c70dda773f74 Mon Sep 17 00:00:00 2001 From: Brian Skinn Date: Sun, 8 Oct 2023 22:54:03 -0400 Subject: [PATCH 10/10] Bump to next dev version --- src/flake8_absolute_import/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flake8_absolute_import/version.py b/src/flake8_absolute_import/version.py index 50b0805..e7b00e5 100644 --- a/src/flake8_absolute_import/version.py +++ b/src/flake8_absolute_import/version.py @@ -21,4 +21,4 @@ """ -__version__ = "1.0.0.2" +__version__ = "1.0.0.3.dev0"