Skip to content

Use trusted publishing - #456

Merged
ewjoachim merged 14 commits into
mainfrom
trusted-publishing
Jul 1, 2026
Merged

Use trusted publishing#456
ewjoachim merged 14 commits into
mainfrom
trusted-publishing

Conversation

@ewjoachim

@ewjoachim ewjoachim commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Small PR (but the uv.lock is taking a lot of diff lines) that changes CI and publishing to make it easier and more secure.

This includes:

  • Dropping antiquated Python versions 3.7, 3.8, 3.9, pypy3.9
  • Adding new versions 3.14, pypy3.11
  • Releasing from GitHub Releases, without a Release commit (Changelog is now in Releases, version is inferred from git tags)

@ewjoachim ewjoachim changed the title Add pytest-env Use trusted publishing Jun 15, 2026
@ewjoachim
ewjoachim requested a review from ybastide June 15, 2026 09:57
@ewjoachim
ewjoachim force-pushed the trusted-publishing branch 7 times, most recently from ca9d037 to 223c2de Compare June 15, 2026 10:23
@ewjoachim
ewjoachim force-pushed the trusted-publishing branch from 7ec064a to 69aae2e Compare June 29, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the project’s CI/release pipeline around uv + trusted publishing, drops older Python runtimes, and updates the codebase/tests accordingly (including moving versioning away from a hardcoded __version__).

Changes:

  • Switch CI to uv-based test/lint, add tag-triggered trusted publishing to PyPI, and remove the separate pre-commit workflow.
  • Drop Python 3.7–3.9 + PyPy 3.9; add Python 3.14 + PyPy 3.11 in CI and metadata.
  • Replace sure expectations with plain assert / pytest.raises, and update typing imports toward collections.abc.

Reviewed changes

Copilot reviewed 43 out of 44 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/utils/import_from_source.py Migrate Iterator import to collections.abc.
tests/test_simpleflow/test_storage.py Use parenthesized with for multi-patch context managers.
tests/test_simpleflow/test_settings.py Replace sure assertions with assert.
tests/test_simpleflow/test_logging_context.py Replace sure exception assertions with pytest.raises.
tests/test_simpleflow/test_log.py Replace sure regex match with re.search + assert.
tests/test_simpleflow/test_helpers.py Replace sure assertions with assert + re.search.
tests/test_simpleflow/test_exceptions.py Replace sure assertions with assert + re.search.
tests/test_simpleflow/test_download.py Replace sure assertions with assert.
tests/test_simpleflow/swf/test_task.py Replace sure assertions with assert.
tests/test_simpleflow/swf/test_helpers.py Replace sure assertions with assert.
tests/test_simpleflow/swf/test_executor.py Replace sure assertions with assert + re.search.
tests/test_simpleflow/swf/process/test_poller.py Replace sure assertion with assert.
tests/test_simpleflow/process/test_supervisor.py Replace sure assertions with assert.
tests/test_simpleflow/process/test_named_mixin.py Replace sure assertions with assert.
tests/integration/test_timer.py Replace sure assertions with assert.
tests/integration/test_task_list.py Replace sure assertions with assert.
tests/integration/test_signals.py Replace sure assertions with assert.
tests/integration/test_misc.py Replace sure assertions with assert + re.search.
tests/integration/test_markers.py Replace sure assertions with assert.
tests/integration/test_commands.py Replace sure assertions with assert.
tests/integration/test_canvas.py Replace sure assertions with assert.
tests/integration/init.py Replace sure exit-code assertion with assert.
simpleflow/swf/stats/pretty.py Migrate Sequence typing import to collections.abc.
simpleflow/swf/mapper/models/history/base.py Migrate Iterator typing import to collections.abc.
simpleflow/swf/mapper/models/event/workflow.py Drop legacy TypedDict import branching (now unconditional typing import).
simpleflow/swf/mapper/models/event/task.py Drop legacy TypedDict import branching; consolidate typing imports.
simpleflow/swf/mapper/models/event/base.py Drop legacy TypedDict import branching; simplify imports.
simpleflow/swf/mapper/exceptions.py Move typing imports toward collections.abc / re.Pattern.
simpleflow/swf/executor.py Move Callable import to collections.abc.
simpleflow/step/workflow.py Move Sequence typing import to collections.abc under TYPE_CHECKING.
simpleflow/step/utils.py Move Sequence typing import to collections.abc under TYPE_CHECKING.
simpleflow/step/submittable.py Move Sequence typing import to collections.abc under TYPE_CHECKING.
simpleflow/process/_named_mixin.py Add env-guard to disable setproctitle to avoid macOS fork crashes.
simpleflow/history.py Move Callable typing import to collections.abc.
simpleflow/execute.py Use parenthesized with for tempfiles (and keep existing TODO comment).
simpleflow/activity.py Move Callable typing import to collections.abc under TYPE_CHECKING.
simpleflow/init.py Switch versioning to importlib.metadata.version() and adjust exports.
script/test Simplify test runner script to exec pytest.
script/release Move Iterator typing import to collections.abc under TYPE_CHECKING.
pyproject.toml Raise min Python to 3.10; add dynamic versioning + pytest env; update deps/config.
CHANGELOG.md Add note that changelog is now published via GitHub Releases.
.github/workflows/pre-commit.yml Remove standalone pre-commit workflow.
.github/workflows/ci.yml Rework CI to uv-based tests/lint; add trusted publishing on tags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread simpleflow/__init__.py Outdated
Comment thread simpleflow/execute.py Outdated
Comment thread pyproject.toml
Comment on lines +105 to +109
"SIMPLEFLOW_JUMBO_FIELDS_BUCKET=",
# setproctitle segfaults in forked children on macOS (py-setproctitle#165)
"SIMPLEFLOW_DISABLE_SETPROCTITLE=1",
# Prevent CI from overriding boto configuration
"BOTO_CONFIG=/dev/null",

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping this global on purpose: setproctitle segfaults in forked children on macOS (py-setproctitle#165) and gating a static pytest env list by platform is awkward. The only lost coverage is the process-title string in set_process_name, which is minor.

@ybastide ybastide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks!

Comment thread simpleflow/execute.py Outdated
- Import importlib.metadata.version unconditionally and guard
  PackageNotFoundError so import works from a source checkout.
- Remove stale Python 3.7 TODO in execute.py (files are binary).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@ybastide ybastide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:stamp:

@ewjoachim
ewjoachim merged commit 9c5cc04 into main Jul 1, 2026
8 checks passed
@ewjoachim
ewjoachim deleted the trusted-publishing branch July 1, 2026 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants