Skip to content

[3007.x] Remove linode-python dependency to silence install SyntaxWarnings (#69455)#69463

Open
dwoz wants to merge 1 commit into
saltstack:3007.xfrom
dwoz:fix/issue-69455
Open

[3007.x] Remove linode-python dependency to silence install SyntaxWarnings (#69455)#69463
dwoz wants to merge 1 commit into
saltstack:3007.xfrom
dwoz:fix/issue-69455

Conversation

@dwoz

@dwoz dwoz commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Backports #69339 (3006.x) to 3007.x. Removes the unmaintained
linode-python 1.1.1 dependency from requirements/static/pkg/linux.txt
(and dependent CI/pkg linux lockfiles) so the salt-common onedir install
stops emitting SyntaxWarning from linode/api.py on every RPM/DEB
install/upgrade.

What issues does this PR fix or reference?

Fixes #69455

#69455 is the same symptom as #68992 (which #69339 fixes on 3006.x). The
underlying linode-python package is also vendored on 3007.x, so the
fix needs to be backported here.

Previous Behavior

apt-get install salt-common=3007.x and the equivalent RPM scriptlet
on RHEL/Rocky/Oracle Linux 9.x print:

/opt/saltstack/salt/lib/python3.10/site-packages/linode/api.py:293: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if s['ERRORARRAY'][0]['ERRORCODE'] is not 0:
/opt/saltstack/salt/lib/python3.10/site-packages/linode/api.py:348: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(wrapper.__doc__.split('\n')) is 1:  # one-liners need whitespace
/opt/saltstack/salt/lib/python3.10/site-packages/linode/api.py:356: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if len(wrapper.__doc__.split('\n')) is 1:  # one-liners need whitespace

New Behavior

linode-python is no longer installed into the onedir, so the warnings
don't surface. salt.cloud.clouds.linode already uses Linode APIv4 over
HTTP/JSON (verified by grep linode salt/cloud/clouds/linode.py) — it
never imported linode-python, so dropping it is purely vestigial
cleanup. Mirrors PR #68871 on master and PR #69339 on 3006.x.

Merge requirements satisfied?

Commits signed with GPG?

No (matching adjacent 3007.x commits, none of which are signed)

@dwoz dwoz requested a review from a team as a code owner June 17, 2026 11:16
@dwoz dwoz added this to the Chlorine v3007.15 milestone Jun 17, 2026
@dwoz dwoz added the test:full Run the full test suite label Jun 17, 2026
…ltstack#69455)

The unmaintained `linode-python` 1.1.1 package targets the retired
Linode API v3 and uses `is not 0` / `is 1` against literals, which
Python 3.12+ emits as `SyntaxWarning` from `linode/api.py` lines
293, 348, and 356. On RHEL/Rocky/Oracle Linux 9.x, the salt-common
onedir's post-install scriptlet imports the onedir's Python which
in turn imports `linode-python` and the warnings surface during
every package install/upgrade.

Drop `linode-python` from `requirements/static/pkg/linux.txt` and
its dependent CI/pkg linux lockfiles so it is no longer installed
into the salt-common onedir. `salt.cloud.clouds.linode` already
uses the Linode APIv4 over HTTP/JSON (no `linode-python` import),
so the package is purely vestigial.

This backports saltstack#69339 (3006.x) and mirrors saltstack#68871 (master/3008.x)
to 3007.x.

Fixes saltstack#69455
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:full Run the full test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant