Skip to content

Modernize for Python 3.10-3.14 - #6

Merged
bboe merged 1 commit into
mainfrom
modernize
Jun 15, 2026
Merged

bboe merged 1 commit into
mainfrom
modernize

Conversation

@bboe

@bboe bboe commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Brings this Slack message-deletion CLI up to the current toolchain (matching the recent extended_http_server / flask-image-uploader overhauls), unblocking CodeSorter (which requires Python ≥3.10).

Highlights

  • Drop Python 2 — removed the handle_encoding shim and .travis.yml (with its 2.7 job); switched to f-strings, lazy %-logging, timezone-aware datetimes, and operator.itemgetter.
  • Full type annotations, pyright strict clean. The dynamic slacker client surface is described with local Protocols and a single cast (slacker stays as the dependency — it still imports and works on 3.10–3.14; swapping to slack_sdk would be a separate, untestable rewrite).
  • Package structure — implementation moved to deslackify.cli so __init__ only re-exports; RetryException → RetryError.
  • Packaging — setup.py/setup.cfg/MANIFEST.in → hatchling + hatch-vcs pyproject.toml (tag-driven versioning), keeping the deslackify entry point.
  • Tests — expanded (rate-limit retries, pagination, dry-run, error counting) and moved under tests/.
  • CI/CD — GitHub Actions lint + 3.10–3.14 matrix, plus a tag-driven trusted-publishing workflow; pre-commit battery (codesorter, ruff ALL, docstrfmt, pyright, …).
  • README install instructions now use uv.

Tests pass on 3.10 and 3.14 locally; pre-commit is clean.

Note: publish.yml uses PyPI trusted publishing — it needs a one-time setup on PyPI (add bboe/deslackify publish.yml as a trusted publisher) and a pypi GitHub environment before the next tagged release will publish.

Bring this Slack message-deletion CLI up to the current toolchain:

- Drop Python 2 support and cruft: remove the handle_encoding shim and
  .travis.yml (with its 2.7 job), switch to f-strings, lazy %-logging,
  timezone-aware datetimes, and operator.itemgetter.
- Add full type annotations and pass pyright strict; the dynamic slacker
  client surface is described with local Protocols and a single cast.
- Split the implementation into deslackify.cli so the package __init__
  only re-exports, and rename RetryException to RetryError.
- Replace setup.py/setup.cfg/MANIFEST.in with a hatchling + hatch-vcs
  pyproject.toml (tag-driven versioning), keeping the deslackify console
  entry point.
- Expand the test suite (rate-limit retries, pagination, dry-run, error
  counting) and move it under tests/.
- Add GitHub Actions CI (lint + 3.10-3.14 matrix) and a tag-driven
  trusted-publishing workflow; add a pre-commit config (codesorter,
  ruff ALL, docstrfmt, pyright, ...).
- Update the README install instructions to use uv.
@bboe
bboe merged commit 0484edb into main Jun 15, 2026
6 checks passed
@bboe
bboe deleted the modernize branch June 15, 2026 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant