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

Require Python 3.9+ and update dependencies #594

Merged
merged 3 commits into from
Aug 15, 2023
Merged

Conversation

n-thumann
Copy link
Member

@n-thumann n-thumann commented Jul 27, 2023

What

This PR bumps the minimum required Python version to 3.9 or higher and updates this projects dependencies.

Why

updater | Dependabot encountered '21' error(s) during execution, please check the logs for more details.
updater | +------------------------------------+
updater | |   Dependencies failed to update    |
updater | +--------------------+---------------+
updater | | isort              | unknown_error |
updater | | rich               | unknown_error |
updater | | zipp               | unknown_error |
updater | | exceptiongroup     | unknown_error |
updater | | markdown-it-py     | unknown_error |
updater | | pylint             | unknown_error |
updater | | black              | unknown_error |
updater | | setuptools         | unknown_error |
updater | | platformdirs       | unknown_error |
updater | | httpcore           | unknown_error |
updater | | typed-ast          | unknown_error |
updater | | httpx              | unknown_error |
updater | | click              | unknown_error |
updater | | certifi            | unknown_error |
updater | | rfc3986            | unknown_error |
updater | | semver             | unknown_error |
updater | | astroid            | unknown_error |
updater | | typing-extensions  | unknown_error |
updater | | dill               | unknown_error |
updater | | anyio              | unknown_error |
updater | | importlib-metadata | unknown_error |
updater | +--------------------+---------------+
pylint: Command line or configuration file:1: UserWarning: Specifying exception names in the overgeneral-exceptions option without module name is deprecated and support for it will be removed in pylint 3.0. Use fully qualified name (maybe 'builtins.Exception' ?) instead.
************* Module /home/runner/work/troubadix/troubadix/.pylintrc
.pylintrc:1:0: E0015: Unrecognized option found: no-space-check (unrecognized-option)
************* Module troubadix.plugins.spelling
troubadix/plugins/spelling.py:75:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
************* Module tests.plugins.test_cve_format
tests/plugins/test_cve_format.py:177:0: W1404: Implicit string concatenation found in call (implicit-str-concat)

References

Checklist

  • Tests

@n-thumann n-thumann requested a review from a team as a code owner July 27, 2023 09:00
@github-actions
Copy link

github-actions bot commented Jul 27, 2023

Conventional Commits Report

Type Number
Bug Fixes 1
Changed 1

🚀 Conventional commits found.

@n-thumann n-thumann marked this pull request as draft July 27, 2023 09:01
@n-thumann n-thumann force-pushed the update_dependencies branch from 3be119a to cb67145 Compare July 27, 2023 09:07
@n-thumann
Copy link
Member Author

TODO: After approval and right before merging this, update the branch protection rules to make the new Python 3.11 mandatory and drop Python 3.7 and 3.8 from the required checks.

@y0urself
Copy link
Member

You may want to switch from pylint to ruff?
See for CI: greenbone/pontos@fa6bc83
And pyproject.toml: greenbone/pontos@a4d0d4d#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711

ruff is ALOT faster then pylint!

@n-thumann
Copy link
Member Author

You may want to switch from pylint to ruff?

Björn already pitched it to me :D We'll definitely consider it, but preferrebly in another PR to the the domain small

@n-thumann n-thumann force-pushed the update_dependencies branch from cb67145 to 8d927df Compare August 14, 2023 14:44
@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #594 (cb67145) into main (4ea19da) will increase coverage by 0.00%.
The diff coverage is n/a.

❗ Current head cb67145 differs from pull request most recent head 8d927df. Consider uploading reports for the commit 8d927df to get more accurate results

@@           Coverage Diff           @@
##             main     #594   +/-   ##
=======================================
  Coverage   78.20%   78.21%           
=======================================
  Files          80       80           
  Lines        2698     2699    +1     
  Branches      571      571           
=======================================
+ Hits         2110     2111    +1     
  Misses        441      441           
  Partials      147      147           
Files Changed Coverage Δ
troubadix/plugins/spelling.py 76.19% <ø> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@n-thumann
Copy link
Member Author

Dropped the checks for Python 3.7 & 3.8 and added the one for Python 3.11 in the branch protection rules.

@n-thumann n-thumann marked this pull request as ready for review August 15, 2023 06:37
@n-thumann n-thumann added the make release To trigger GitHub release action label Aug 15, 2023
@n-thumann n-thumann enabled auto-merge August 15, 2023 06:37
@n-thumann n-thumann merged commit f587496 into main Aug 15, 2023
@n-thumann n-thumann deleted the update_dependencies branch August 15, 2023 06:38
@cfi-gb
Copy link
Member

cfi-gb commented Sep 4, 2023

It seems the update of the validators package from version 0.20.0 to 0.21.2 is causing URL verification issues like the following for URLs which are absolutely valid:

Checking 2019/discourse/gb_discourse_cve-2019-5418_lfi.nasl (91891/91910)
ℹ     Results for plugin check_script_xref_url
×         script_xref(name:"URL", value:"https://groups.google.com/forum/#!topic
          /rubyonrails-security/pFRKI96Sm8Q");: Invalid URL value

And update from 0.21.2 to 0.22.0 seems currently pending via:

might solve this as it includes fixes from / for:

@cfi-gb
Copy link
Member

cfi-gb commented Sep 6, 2023

It seems with the version bump from 0.21.2 to 0.22.0 the amount of reported "invalid" URLs which seems to be valid have dropped only from 268 to 266 and there seems to be further issues in the package.

I will raise a follow-up issue at https://github.com/python-validators/validators to see if these can be fixed / solved in the package.

@cfi-gb
Copy link
Member

cfi-gb commented Sep 6, 2023

Seems some one was faster and raised python-validators/validators#296, i have added examples from our cases there now.

#609 downgraded the package to version 0.20.0 now as an intermediate solution until the affected package received an update / fix.

@cfi-gb
Copy link
Member

cfi-gb commented Sep 22, 2023

#624 added now a few additional valid URLs to our unit tests so that such issues due to dependency updates are found earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
make release To trigger GitHub release action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants