aboutcode-org / aboutcode-org/scancode-toolkit

Fix warnings in tests

Abierto
#2,711 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
2.6k
Forks
791
Merge medio
1 d 12 h
PR fusionados (30 d)
5

Descripción

A test run will yield this
> =============================== warnings summary ===============================
> lib/python3.6/site-packages/parameter_expansion/__init__.py:40
> lib/python3.6/site-packages/parameter_expansion/__init__.py:40
> lib/python3.6/site-packages/parameter_expansion/__init__.py:40
> /home/sctk/lib/python3.6/site-packages/parameter_expansion/__init__.py:40: UserWarning: Unable to determine version for parameter_expansion. Falling back to 0.0.0+unknown
> f"Unable to determine version for {name}. Falling back to {_default_version}"
>
> src/textcode/strings2.py:27
> /home/sctk/src/textcode/strings2.py:27: DeprecationWarning: invalid escape sequence \$
> " !\"#\$%&\'\(\)\*\+,-\./0123456789:;<=>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"
>
> src/textcode/strings2.py:28
> /home/sctk/src/textcode/strings2.py:28: DeprecationWarning: invalid escape sequence \[
> "\[\]\^_`abcdefghijklmnopqrstuvwxyz\{\|\}\\\~\t"
>
> lib/python3.6/site-packages/patch.py:340
> /home/sctk/lib/python3.6/site-packages/patch.py:340: DeprecationWarning: invalid escape sequence \d
> re_hunk_start = re.compile(b"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@")
>
> lib/python3.6/site-packages/patch.py:519
> /home/sctk/lib/python3.6/site-packages/patch.py:519: DeprecationWarning: invalid escape sequence \+
> re_filename = b"^\+\+\+ ([^\t]+)"
>
> lib/python3.6/site-packages/patch.py:545
> /home/sctk/lib/python3.6/site-packages/patch.py:545: DeprecationWarning: invalid escape sequence \d
> match = re.match(b"^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@(.*)", line)
>
> lib/python3.6/site-packages/dparse/regex.py:10
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:10: DeprecationWarning: invalid escape sequence \S
> "(?:\S+(?::\S*)?@)?"
>
> lib/python3.6/site-packages/dparse/regex.py:14
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:14: DeprecationWarning: invalid escape sequence \.
> "(?!(?:10|127)(?:\.\d{1,3}){3})"
>
> lib/python3.6/site-packages/dparse/regex.py:15
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:15: DeprecationWarning: invalid escape sequence \.
> "(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})"
>
> lib/python3.6/site-packages/dparse/regex.py:16
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:16: DeprecationWarning: invalid escape sequence \.
> "(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})"
>
> lib/python3.6/site-packages/dparse/regex.py:22
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:22: DeprecationWarning: invalid escape sequence \d
> "(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])"
>
> lib/python3.6/site-packages/dparse/regex.py:23
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:23: DeprecationWarning: invalid escape sequence \.
> "(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}"
>
> lib/python3.6/site-packages/dparse/regex.py:24
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:24: DeprecationWarning: invalid escape sequence \.
> "(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))"
>
> lib/python3.6/site-packages/dparse/regex.py:29
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:29: DeprecationWarning: invalid escape sequence \.
> "(?:\.(?:[a-z\u00a1-\uffff0-9]-?)*[a-z\u00a1-\uffff0-9]+)*"
>
> lib/python3.6/site-packages/dparse/regex.py:31
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:31: DeprecationWarning: invalid escape sequence \.
> "(?:\.(?:[a-z\u00a1-\uffff]{2,}))"
>
> lib/python3.6/site-packages/dparse/regex.py:34
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:34: DeprecationWarning: invalid escape sequence \d
> "(?::\d{2,5})?"
>
> lib/python3.6/site-packages/dparse/regex.py:36
> /home/sctk/lib/python3.6/site-packages/dparse/regex.py:36: DeprecationWarning: invalid escape sequence \S
> "(?:/\S*)?",
>
> tests/formattedcode/test_output_spdx.py: 14 warnings
> tests/formattedcode/test_reuse_output_plugins.py: 2 warnings
> /home/sctk/lib/python3.6/site-packages/spdx/document.py:365: DeprecationWarning: document.package and document.files are deprecated; use document.packages instead
> DeprecationWarning)
>
> tests/formattedcode/test_output_spdx.py: 28 warnings
> tests/formattedcode/test_reuse_output_plugins.py: 4 warnings
> /home/sctk/lib/python3.6/site-packages/spdx/document.py:355: DeprecationWarning: document.package and document.files are deprecated; use document.packages instead
> DeprecationWarning)
>
> tests/formattedcode/test_output_spdx.py::test_spdx_rdf_with_license_ref_with_text
> /home/sctk/lib/python3.6/site-packages/rdflib/compat.py:118: DeprecationWarning: invalid escape sequence \
> """
>
> tests/formattedcode/test_output_spdx.py::test_spdx_rdf_with_license_ref_with_text
> /home/sctk/lib/python3.6/site-packages/rdflib/paths.py:186: DeprecationWarning: invalid escape sequence \
> """
>
> tests/packagedcode/test_pubspec.py::TestPubspecDatadriven::test_pubspec_lockdart_pubspec_lock
> /home/sctk/src/packagedcode/pubspec.py:229: UserWarning: Dart pubspec.locks with unsupported external repo description or source: {'dependency': 'direct main', 'description': {'path': '../pub_dartdoc_data', 'relative': True}, 'source': 'path', 'version': '0.0.0'}
> stacklevel=1,
>
> tests/packagedcode/test_rpm_installed.py::TestRpmInstalled::test_collect_installed_rpmdb_xmlish_from_rootfs
> /home/sctk/src/packagedcode/rpm_installed.py:439: DeprecationWarning: commoncode.command.execute2 is deprecated. Use execute() instead.
> to_files=True,
>
> tests/summarycode/test_plugin_consolidate.py::TestConsolidate::test_consolidate_package
> tests/summarycode/test_plugin_consolidate.py::TestConsolidate::test_consolidate_e2fsprogs
> /home/sctk/lib/python3.6/site-packages/fingerprints/cleanup.py:54: ICUWarning: Install 'pyicu' for better text transliteration.
> text = ascii_text(text)
>
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> =========================== short test summary info ============================

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.