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

dist/tools/pyterm: avoid deprecated .setDaemon #18754

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

keestux
Copy link
Contributor

@keestux keestux commented Oct 16, 2022

pyterm uses a (now) deprecated method threading.setDaemon()

        receiver_thread = threading.Thread(target=self.reader)
        receiver_thread.setDaemon(1)
        receiver_thread.start()

With Python 3.10 the setDaemon method is deprecated. You get a warning each time pyterm is used.
To avoid the warning we should set the property daemon instead.

        receiver_thread.daemon = True

I've checked this syntax with 3.6 and it is supported at least since that version.

@github-actions github-actions bot added the Area: tools Area: Supplementary tools label Oct 16, 2022
dist/tools/pyterm/pyterm Outdated Show resolved Hide resolved
@benpicco benpicco added the CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs label Oct 17, 2022
@keestux keestux added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Oct 19, 2022
@riot-ci
Copy link

riot-ci commented Oct 19, 2022

Murdock results

✔️ PASSED

627e40a dist/tools/pyterm: avoid deprecated .setDaemon

Success Failures Total Runtime
1 0 1 01m:17s

Artifacts

This only reflects a subset of all builds from https://ci-prod.riot-os.org. Please refer to https://ci.riot-os.org for a complete build for now.

@miri64
Copy link
Member

miri64 commented Oct 19, 2022

Please squash, then we can merge it as soon as Murdock is happy.

@miri64 miri64 added CI: run tests If set, CI server will run tests on hardware for the labeled PR CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 19, 2022
@miri64
Copy link
Member

miri64 commented Oct 19, 2022

Just wanting to test on Murdock if the pyterm change poses any problems for the tests. I will change it back to skip compile tests, once ci-prod is done.

@miri64
Copy link
Member

miri64 commented Oct 19, 2022

@miri64 miri64 added CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Oct 19, 2022
@miri64 miri64 enabled auto-merge October 19, 2022 20:51
@miri64
Copy link
Member

miri64 commented Oct 20, 2022

Please squash

Ping @keestux?

Set .daemon property instead of calling .setDaemon()
@keestux keestux force-pushed the avoid-using-deprecated branch from 246ca4c to 627e40a Compare October 20, 2022 18:42
@miri64 miri64 merged commit 9734f6f into RIOT-OS:master Oct 21, 2022
@keestux keestux deleted the avoid-using-deprecated branch October 21, 2022 17:53
@kaspar030 kaspar030 added this to the Release 2023.01 milestone Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants