Skip to content

python3Packages.smpclient: 6.0.0 -> 7.0.1#520696

Merged
dotlambda merged 3 commits into
NixOS:masterfrom
otavio:smpclient-update
May 22, 2026
Merged

python3Packages.smpclient: 6.0.0 -> 7.0.1#520696
dotlambda merged 3 commits into
NixOS:masterfrom
otavio:smpclient-update

Conversation

@otavio

@otavio otavio commented May 16, 2026

Copy link
Copy Markdown
Contributor

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
    • `nix-build -A python3Packages.smpclient` (182 tests pass, 14 skipped)
  • Tested basic functionality of all binary files
  • 25.11 Release Notes are up to date
  • Fits CONTRIBUTING.md

Summary

Upstream migrated from `poetry-core` / `poetry-dynamic-versioning` to `hatchling` / `hatch-vcs`. The build system inputs are updated accordingly; `pythonRelaxDeps` still relaxes `smp` because the `smp` package reports version `0` in nixpkgs.

Changelog: https://github.com/intercreate/smpclient/releases/tag/7.0.0

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (update) This PR updates a package to a newer version 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 6.topic: python Python is a high-level, general-purpose programming language. labels May 16, 2026
@otavio

otavio commented May 16, 2026

Copy link
Copy Markdown
Contributor Author

Hi @Hexa @dotlambda — would either of you have a moment to look at this? Upstream migrated the build system from poetry-core / poetry-dynamic-versioning to hatchling / hatch-vcs, plus adds the mcuimg script and bumps bleak to >=2.0.0 (already satisfied in nixpkgs). Build + 182 tests pass on x86_64-linux. Thanks!

@JPHutchins

Copy link
Copy Markdown

There's a breaking change. Serial and BLE dependencies are now optional. We're seeing more usage on embedded Linux, so I recommend that the nix package not force users to bring in transport dependencies that they don't need.

https://github.com/intercreate/smpclient/releases/tag/7.0.0

@otavio otavio force-pushed the smpclient-update branch from 721753c to 18e6958 Compare May 20, 2026 12:07
@otavio

otavio commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

@JPHutchins, please review.

@JPHutchins JPHutchins 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.

Cool! What is the nix interface for enabling them?

@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 1 This PR was reviewed and approved by one person. and removed 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels May 20, 2026
@otavio otavio requested a review from znaniye May 20, 2026 23:14
@otavio

otavio commented May 20, 2026

Copy link
Copy Markdown
Contributor Author

@JPHutchins on the Nix side it surfaces as an optional-dependencies attribute on the package, with one list per extra (serial, ble, udp). Consumers concatenate the lists they want.

Ad-hoc Python environment (nix-shell / nix run):

# shell.nix
let pkgs = import <nixpkgs> { };
in pkgs.python3.withPackages (ps:
  [ ps.smpclient ]
  # pick only what you need; omit both for a pure embedded-Linux setup
  ++ ps.smpclient.optional-dependencies.serial
  ++ ps.smpclient.optional-dependencies.ble)

Inside another nixpkgs package (e.g. how smpmgr pulls in the full set, mirroring upstream's smpclient[all]):

dependencies = with python3Packages; [
  smpclient
] ++ lib.concatAttrValues smpclient.optional-dependencies;

@JPHutchins

Copy link
Copy Markdown

That's really nice. I asked because I think I've been doing it wrong, thanks!

@znaniye

znaniye commented May 21, 2026

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 520696
Commit: 18e69589aec958de0207b367b2b4a4002b3d9732


x86_64-linux

✅ 8 packages built:
  • esphome
  • esphome.dist
  • python313Packages.smpclient
  • python313Packages.smpclient.dist
  • python314Packages.smpclient
  • python314Packages.smpclient.dist
  • smpmgr
  • smpmgr.dist

@znaniye

znaniye commented May 21, 2026

Copy link
Copy Markdown
Member

LGTM. Just fix the formatting so CI doesn't fail.

@znaniye

znaniye commented May 21, 2026

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 520696
Commit: 18e69589aec958de0207b367b2b4a4002b3d9732


aarch64-linux

✅ 8 packages built:
  • esphome
  • esphome.dist
  • python313Packages.smpclient
  • python313Packages.smpclient.dist
  • python314Packages.smpclient
  • python314Packages.smpclient.dist
  • smpmgr
  • smpmgr.dist

@otavio otavio force-pushed the smpclient-update branch from 18e6958 to 7720206 Compare May 21, 2026 13:18
@nixpkgs-ci nixpkgs-ci Bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels May 21, 2026
Comment thread pkgs/by-name/sm/smpmgr/package.nix Outdated
Comment thread pkgs/development/python-modules/smpclient/default.nix
Comment thread pkgs/development/python-modules/smpclient/default.nix Outdated
Comment thread pkgs/development/python-modules/smpclient/default.nix Outdated
@otavio otavio force-pushed the smpclient-update branch from 7720206 to 7473fa2 Compare May 22, 2026 19:40
@otavio

otavio commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review @dotlambda! All four points addressed:

  • smpclient.optional-dependencies now exposes an all attribute, used by both smpclient's nativeCheckInputs and smpmgr's dependencies.
  • The smp version is now pinned via substituteInPlace pyproject.toml (upstream's poetry-version-plugin reads from a git tag, which isn't available in tarball builds). This removes the need for the pythonRelaxDeps = [ "smp" ] workaround in smpclient, so I dropped it.

Force-pushed; tests still pass for smp, smpclient, and smpmgr.

@dotlambda

Copy link
Copy Markdown
Member

You obviously used AI but didn't follow the policy.

@JPHutchins

Copy link
Copy Markdown

@otavio otavio force-pushed the smpclient-update branch 2 times, most recently from 1b2d38b to c7ae0bd Compare May 22, 2026 20:55
otavio added 3 commits May 22, 2026 18:13
Upstream migrated from poetry-core / poetry-dynamic-versioning to
hatchling / hatch-vcs, and made the serial (pyserial) and BLE (bleak)
transports optional. Expose them via `optional-dependencies` so
consumers can opt in to only the transports they need.

Changelog: https://github.com/intercreate/smpclient/releases/tag/7.0.1

Assisted-by: Claude Code (claude-opus-4-7)
Upstream uses `poetry-version-plugin` with `source = "git-tag"` to derive
the version. Tarball builds have no git tree, so the version falls back
to `"0"`, which breaks downstream version-pin checks (smpclient required
a `pythonRelaxDeps = [ "smp" ]` workaround). Substitute the version in
`pyproject.toml` instead.

Assisted-by: Claude Code (claude-opus-4-7)
smpclient 7.0.0 made the serial, BLE, and UDP transports optional.
Upstream's `smpmgr` pins `smpclient[all]`, so pull in all transports
via `smpclient.optional-dependencies.all` to keep the previous
behaviour.

Assisted-by: Claude Code (claude-opus-4-7)
@otavio otavio force-pushed the smpclient-update branch from c7ae0bd to 5471a6a Compare May 22, 2026 21:14
@otavio

otavio commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

@JPHutchins bumped to 7.0.1 in 281cf61. Tests still pass (185 passed, 14 skipped). Thanks for the heads-up!

@otavio

otavio commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

Hi @dotlambda — apologies, you were right and I was mistaken; I initially thought the policy was still in proposed status, but it was merged in #514587. I've added Assisted-by: trailers to the commits per the policy. Thanks for the nudge!

@dotlambda dotlambda changed the title python3Packages.smpclient: 6.0.0 -> 7.0.0 python3Packages.smpclient: 6.0.0 -> 7.0.1 May 22, 2026
@dotlambda

Copy link
Copy Markdown
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 520696
Commit: 5471a6a1fef474aec83073f39af38f1641968cb2


x86_64-linux

✅ 6 packages built:
  • esphome
  • python313Packages.smp
  • python313Packages.smpclient
  • python314Packages.smp
  • python314Packages.smpclient
  • smpmgr

@dotlambda dotlambda added this pull request to the merge queue May 22, 2026
Merged via the queue into NixOS:master with commit 913eb9e May 22, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: python Python is a high-level, general-purpose programming language. 8.has: package (update) This PR updates a package to a newer version 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 2 This PR was reviewed and approved by two persons.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants