Skip to content

Prepare the 1.0.0b1 release - #9

Merged
dlech merged 5 commits into
mainfrom
release-1.0.0
Oct 18, 2026
Merged

dlech merged 5 commits into
mainfrom
release-1.0.0

Conversation

@dlech

@dlech dlech commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Gets the four packages ready to publish to PyPI as 1.0.0b1, the first release. They are not published by this PR: the release workflow added here runs only when a tag is pushed.

Five commits:

  • pb-core's sockets in a short directory too: the endpoint fixture in packages/pb-core/tests/conftest.py still made AF_UNIX sockets under pytest's tmp_path_factory. On a Mac those paths reach 104 bytes once pytest's run counter has three digits, one byte more than sun_path holds. Every unix case in test_ipc.py then failed locally, though not on CI. Sockets now go under /tmp, as the end-to-end tests' short_tmp_path already does.
  • The site is at pybricks.com/pybricks-tools: this is the address Pages actually serves; pybricks.github.io/pybricks-tools only redirects there. site_url and every package's documentation URL now use it. A release's metadata can't be changed on PyPI after upload, so this has to be right before the first one.
  • The changelogs catch up with Bluetooth Classic: they had nothing on EV3 and NXT over RFCOMM, the macOS permission dialog, the reported port that won't open, hub protocol v1.6.0 and v1.7.0, --transport rfcomm or watching_adapters(). The top-level changelog now says CI covers Python 3.11 to 3.14.
  • 1.0.0b1:
    • Version: 1.0.0b1 in every pyproject.toml and __version__, plus the Development Status :: 4 - Beta classifier.
    • Requirements: the packages require one another at >=1.0.0b1, with no upper bound. Until now there was no bound at all. The bound names the beta itself, because a beta sorts below its release: >=1.0.0 would refuse 1.0.0b1.
    • Status notes: the READMEs and the docs front page say beta, and that commands and APIs may still change before 1.0.0.
    • Protocol floor: MIN_PROTOCOL_VERSION keeps following PROTOCOL_VERSION through the betas, as its docstring already says.
  • Publish a package to PyPI when its tag is pushed: .github/workflows/release.yml. One package per tag; for example, pybricks-core-v1.0.0b1 publishes pybricks-core 1.0.0b1. Before building, it refuses a tag that doesn't match the package's version or whose CHANGELOG.md has no [1.0.0b1] section. It uploads with uv publish through PyPI trusted publishing, in the pypi environment.

Checked locally on macOS:

  • Tests: 988 pass, including every unix case in test_ipc.py with the default temp directory.
  • Lint and types: ruff and pyright are clean.
  • Packages: all four build, and the wheels and sdists pass twine check --strict.
  • Installing the beta: with only the betas available, both uv pip install pybricks-cli and pip install pybricks-cli install all four without --pre, and pb --version reports 1.0.0b1.
  • Docs: the strict build passes.

The release workflow has not run yet. Before the first tag:

  • Create the pypi environment in this repository's settings.
  • In each package's changelog, change [Unreleased] to a dated [1.0.0b1] heading.
  • Release the packages one at a time. PyPI allows only one pending publisher per repository, workflow and environment, and a pending publisher becomes an ordinary one on its first upload, which frees the slot. For each of pybricks-core, pybricks-client, pybricks-service and pybricks-cli, in that order:
    1. Add a pending trusted publisher on PyPI: owner pybricks, repository pybricks-tools, workflow release.yml, environment pypi.
    2. Push the tag, for example pybricks-core-v1.0.0b1.

dlech added 3 commits October 18, 2026 18:13
The endpoint fixture still put its AF_UNIX sockets under pytest's
tmp_path_factory, which the end-to-end tests stopped doing for the same
reason. On a Mac the per-user temporary directory is 57 bytes once
resolved, and with pytest's two levels and the fixture's own a socket
measures 104 bytes as soon as pytest's run counter reaches three digits:
one too many for a sun_path of 104, counting the terminator. Every unix
case in test_ipc.py then failed with "AF_UNIX path too long" -- on a
developer's machine, not on CI, whose runners had not counted that high.

The directory is now made under /tmp and removed afterwards, as
short_tmp_path does in tests/e2e/conftest.py.
GitHub Pages serves it there, because the organisation's Pages site has
pybricks.com as its custom domain, and pybricks.github.io/pybricks-tools
only redirects to it. site_url gives the canonical links and the sitemap,
so they pointed every search engine at the redirect.

The packages' documentation URLs moved with it. Those matter more: they
are uploaded with each release, and a release on PyPI can never have its
metadata changed afterwards.
Nothing said that EV3 and NXT hubs can be reached at all. pb-service's
changelog last changed with the simulated serial port, and the RFCOMM
transport, the macOS permission dialog, the reported port that will not
open and the hub protocol's v1.6.0 and v1.7.0 all landed after it, along
with --transport rfcomm in the CLI and watching_adapters() in the client.

The repository's own changelog also said CI runs Python 3.11 to 3.13, and
it has run 3.14 as well since 3.14 was added to the matrix.
@dlech
dlech requested a balanced review from Copilot October 18, 2026 23:17

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

dlech added 2 commits October 18, 2026 18:28
The first release is the 1.0.0b1 that protocol.py was written to expect,
rather than the 0.1.0 the packages said.

- All four packages are 1.0.0b1, in pyproject.toml and in __version__,
  with "Development Status :: 4 - Beta".
- They require one another at >=1.0.0b1. Unbounded until now, which once
  they are released independently would have let pybricks-cli be
  installed beside a pybricks-core from before anything it calls existed.
  The bound names the beta itself, because a beta sorts below the release
  it leads to: >=1.0.0 would refuse 1.0.0b1. A lower bound only: no
  library requirement here gets an upper one.
- The status notes say beta, and that commands and APIs may still change
  before 1.0.0, in place of "early development, nothing is stable".

MIN_PROTOCOL_VERSION goes on following PROTOCOL_VERSION, as its
docstring already says it does through the betas.
The packages are released independently, so a tag names one of them:
pybricks-core-v1.0.0 publishes pybricks-core 1.0.0 and nothing else.

Before anything is built the tag is checked against the package's own
version and against its changelog, which must have a section for that
version. A version on PyPI can never be uploaded again, so a tag pushed in
error and caught after the upload is a version number lost for good.

The upload uses PyPI's trusted publishing, so no token is stored anywhere,
and runs in a "pypi" environment that the publisher on PyPI names. It goes
through uv publish rather than pypa's action, so it needs no action beyond
the setup-uv this repository already pins and Dependabot already moves.
@dlech dlech changed the title Prepare the 1.0.0 release Prepare the 1.0.0b1 release Oct 18, 2026
@dlech
dlech merged commit fca5fb5 into main Oct 18, 2026
23 checks passed
@dlech
dlech deleted the release-1.0.0 branch October 18, 2026 23:38
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.

2 participants