Skip to content

Commit

Permalink
Update known warnings for Python 3.7 (#19333)
Browse files Browse the repository at this point in the history
After seting 3.7 the default (#19317) the warning printed by
Python during importing all providers (specifically apache beam)
has slightly changed. Apparently collections.abc warning was
a bit more "scary" - warning that it's 3.9 not 3.10 where the
old collection imports will stop working (Note that actually
this did not happen even in 3.10, apparently)

This PR fixes the "known" warning message to match it but also
a separate PR (apache/beam#15850) was
opened to Beam to get rid of the warnings altogether.

Also seems 'dns` stopped generating this warning so I removed it
and in case warnings are generated, they are printed outside of
the folded group, so that it's immediately visible.

(cherry picked from commit 4bb1317)
  • Loading branch information
potiuk committed Jan 22, 2022
1 parent 68ba68c commit 07ce313
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions dev/provider_packages/prepare_provider_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2026,6 +2026,9 @@ def summarise_total_vs_bad_and_warnings(total: int, bad: int, warns: List[warnin
console.print()
raise_error = True
if warns:
if os.environ.get('GITHUB_ACTIONS'):
# Ends group in GitHub Actions so that the errors are immediately visible in CI log
console.print("::endgroup::")
console.print()
console.print("[red]Unknown warnings generated:[/]")
console.print()
Expand Down Expand Up @@ -2072,14 +2075,9 @@ def summarise_total_vs_bad_and_warnings(total: int, bad: int, warns: List[warnin
),
(
"Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since"
" Python 3.3, and in 3.10 it will stop working",
" Python 3.3,and in 3.9 it will stop working",
"apache_beam",
),
(
"Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since"
" Python 3.3, and in 3.10 it will stop working",
"dns",
),
(
'pyarrow.HadoopFileSystem is deprecated as of 2.0.0, please use pyarrow.fs.HadoopFileSystem instead.',
"papermill",
Expand Down

0 comments on commit 07ce313

Please sign in to comment.