8000 Resolve daemon warnings for threading methods by emmanuel-ferdman · Pull Request #7532 · freedomofpress/securedrop · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Resolve daemon warnings for threading methods #7532

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 8000 account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025

Conversation

emmanuel-ferdman
Copy link
Contributor
@emmanuel-ferdman emmanuel-ferdman commented May 6, 2025

Status

Ready for review

Description of Changes

This small PR resolves the threading deprecation warnings:

/home/runner/work/securedrop/securedrop/securedrop/pretty_bad_protocol/_meta.py:737: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead

/home/runner/work/securedrop/securedrop/securedrop/pretty_bad_protocol/_util.py:396: DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead

It also fixes a few typos I came across along the way in the relevant files.

Testing

run tests and check for warnings.

Deployment

Checklist

If you made changes to the server application code:

  • Linting (make lint) and tests (make test) pass in the development container

If you made changes to securedrop-admin:

  • Linting and tests (make -C admin test) pass in the admin development container

If you made changes to the system configuration:

If you added or removed a file deployed with the application:

  • I have updated AppArmor rules to include the change

If you made non-trivial code changes:

  • I have written a test plan and validated it for this PR

Choose one of the following:

  • I have opened a PR in the docs repo for these changes, or will do so later
  • I would appreciate help with the documentation
  • These changes do not require documentation

If you added or updated a reference to a production code dependency:

Documentation

For Rust code, dependency review is enforced by the cargo-vet CI job.

For Python code, production code dependencies are defined in:

  • admin/requirements.in
  • admin/requirements-ansible.in
  • securedrop/requirements/python3/requirements.in
  • securedrop/requirements/python3/translation.in (used in the build
    container)

If you changed another requirements.in file that applies only to development
or testing environments, then no diff review is required, and you can skip
(remove) this section.

Choose one of the following:

  • I have performed a diff review and pasted the contents to the packaging wiki
  • I would like someone else to do the diff review
  • I am silencing an alert related to a production dependency, because (please explain below):

Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
@emmanuel-ferdman emmanuel-ferdman requested a review from a team as a code owner May 6, 2025 18:23
@legoktm
Copy link
Member
legoktm commented May 6, 2025

Thanks for the PR @emmanuel-ferdman; I'm curious, did you see these warnings in the context of SecureDrop or elsewhere?

@emmanuel-ferdman
Copy link
Contributor Author

@legoktm You can see those warnings in the CI logs here.

@legoktm
Copy link
Member
legoktm commented May 6, 2025

Got it, I was just curious how you found them :)

Copy link
Member
@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

Thanks! CI is happy (the test failure is somewhat expected), and I verified that this was supported back in 3.8 too: https://docs.python.org/3.8/library/threading.html#threading.Thread.daemon

@legoktm legoktm added this pull request to the merge queue May 6, 2025
Merged via the queue into freedomofpress:develop with commit 7a3b4e1 May 6, 2025
22 of 23 checks passed
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
0