Stop importing print_function#1048
Merged
tridge merged 1 commit intoArduPilot:masterfrom May 30, 2025
Merged
Conversation
the future is here
cclauss
added a commit
to cclauss/pymavlink
that referenced
this pull request
Jul 8, 2025
Completes * ArduPilot#1048 > ### the future is here https://python-future.org/whatsnew.html > The new version number of 1.0.0 indicates that the `python-future` project, like Python 2, is now done. Start with `ruff rule UP010` [unnecessary-future-import](https://docs.astral.sh/ruff/rules/unnecessary-future-import) and `ruff rule UP029` [unnecessary-builtin-import](https://docs.astral.sh/ruff/rules/unnecessary-builtin-import). % `ruff check --select=UP --statistics` ``` 641 UP031 [ ] printf-string-formatting 57 UP004 [*] useless-object-inheritance 48 UP029 [ ] unnecessary-builtin-import # <-- This pull request 48 UP032 [*] f-string 27 UP008 [ ] super-call-with-parameters 21 UP024 [*] os-error-alias 18 UP030 [ ] format-literals 13 UP006 [ ] non-pep585-annotation 13 UP015 [*] redundant-open-modes 8 UP010 [*] unnecessary-future-import # <-- This pull request 5 UP035 [ ] deprecated-import 3 UP018 [*] native-literals 2 UP009 [*] utf8-encoding-declaration 2 UP039 [*] unnecessary-class-parentheses 1 UP020 [*] open-alias 1 UP021 [*] replace-universal-newlines 1 UP022 [ ] replace-stdout-stderr Found 909 errors. [*] 156 fixable with the `--fix` option (530 hidden fixes can be enabled with the `--unsafe-fixes` option). ``` 1. `ruff check --select=UP010 --fix # from __future__ import ...` 2. `ruff check --select=UP029 --fix --unsafe-fixes # from builtins import ...` 3. `git grep future ` # Remove instances related to the python-future dependency. localhost: ```bash source .venv/bin/activate pytest # 1 failed, 50 passed, 8 skipped, 1 warning in 16.02s -- tests/test_mavftp.py OSError: Address already in use pip uninstall future pytest # 1 failed, 50 passed, 8 skipped, 1 warning in 16.02s -- tests/test_mavftp.py OSError: Address already in use ``` ___What other testing approaches should be considered?___
tridge
pushed a commit
that referenced
this pull request
Jul 11, 2025
Completes * #1048 > ### the future is here https://python-future.org/whatsnew.html > The new version number of 1.0.0 indicates that the `python-future` project, like Python 2, is now done. Start with `ruff rule UP010` [unnecessary-future-import](https://docs.astral.sh/ruff/rules/unnecessary-future-import) and `ruff rule UP029` [unnecessary-builtin-import](https://docs.astral.sh/ruff/rules/unnecessary-builtin-import). % `ruff check --select=UP --statistics` ``` 641 UP031 [ ] printf-string-formatting 57 UP004 [*] useless-object-inheritance 48 UP029 [ ] unnecessary-builtin-import # <-- This pull request 48 UP032 [*] f-string 27 UP008 [ ] super-call-with-parameters 21 UP024 [*] os-error-alias 18 UP030 [ ] format-literals 13 UP006 [ ] non-pep585-annotation 13 UP015 [*] redundant-open-modes 8 UP010 [*] unnecessary-future-import # <-- This pull request 5 UP035 [ ] deprecated-import 3 UP018 [*] native-literals 2 UP009 [*] utf8-encoding-declaration 2 UP039 [*] unnecessary-class-parentheses 1 UP020 [*] open-alias 1 UP021 [*] replace-universal-newlines 1 UP022 [ ] replace-stdout-stderr Found 909 errors. [*] 156 fixable with the `--fix` option (530 hidden fixes can be enabled with the `--unsafe-fixes` option). ``` 1. `ruff check --select=UP010 --fix # from __future__ import ...` 2. `ruff check --select=UP029 --fix --unsafe-fixes # from builtins import ...` 3. `git grep future ` # Remove instances related to the python-future dependency. localhost: ```bash source .venv/bin/activate pytest # 1 failed, 50 passed, 8 skipped, 1 warning in 16.02s -- tests/test_mavftp.py OSError: Address already in use pip uninstall future pytest # 1 failed, 50 passed, 8 skipped, 1 warning in 16.02s -- tests/test_mavftp.py OSError: Address already in use ``` ___What other testing approaches should be considered?___
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
the future is here
We can probably do without more of these - but these we can definitely do without