Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run basic lint CI against Ubuntu noble / Python 3.12 #7242

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Oct 8, 2024

Status

Ready for review

Description of Changes

See commit messages for details.

Refs #7210.

Testing

How should the reviewer test this PR?

  • Visual review
  • CI passes
  • Setting up a staging environment using vagrant/libvirt works
  • infra has moved "required" label from lint to lint (focal) (intentionally not noble, yet)

Deployment

Any special considerations for deployment? n/a

Checklist

@legoktm legoktm requested a review from a team as a code owner October 8, 2024 21:28
@legoktm
Copy link
Member Author

legoktm commented Oct 8, 2024

I'm not setup to test "Setting up a staging environment using vagrant/libvirt works" so help would be appreciated with that.

@legoktm
Copy link
Member Author

legoktm commented Oct 8, 2024

Oh also I haven't signed the commits yet, waiting to rebase after the uv PR is merged.

Just as a baseline to see how far away we are.

Some changes:
* switch to enchant-2, which is already in focal

Refs #7210.
The vendored version of six in pip 21.3 is incompatible with Python
3.12.
cffi 1.14.5 doesn't have prebuilt wheels for Python 3.12.

This upgrade was already diff-reviewed:
<https://github.com/freedomofpress/securedrop-builder/wiki/cffi-1.14.5-to-1.16.0>.
* molecule-vagrant is outdated and has a constraint blocking pyyaml 6.
  Note that molecule-vagrant is actually archived in favor of
molecule-plugins[vagrant], but leaving that for another time, since it
  needs molecule 6.
* pylint's dependency tree has issues (astroid, wrapt), so upgrade it
  entirely, which will require some fixes in a follow-up.
* pyyaml 6 is used elsewhere and provide prebuild 3.12 wheels.
All of the lints being un-disabled in pylintrc were removed from pylint,
most of them only applied to Python 2 code, which is why they were
suppressed.

Other fixes:

* Fix argument name in pretty_bad_protocol (most-likely unused code)
* Exempt specialstrings.py from linting, just like ruff.
* Raise unreachable exception in pageslayout tests to make pylint happy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready For Review
Development

Successfully merging this pull request may close these issues.

1 participant