8000 Fix python3 deprecation warnings by yzdann · Pull Request #585 · prometheus/client_python · GitHub
[go: up one dir, main page]

Skip to content

Fix python3 deprecation warnings #585

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

Merged
merged 2 commits into from
Oct 2, 2020
Merged

Fix python3 deprecation warnings #585

merged 2 commits into from
Oct 2, 2020

Conversation

yzdann
Copy link
Contributor
@yzdann yzdann commented Oct 2, 2020

Fix DeprecationWarning for inspect.getargspec() and assertEquals.

travis build warnings.

=============================== warnings summary ===============================

tests/test_core.py::TestCounter::test_function_decorator

  /home/travis/build/prometheus/client_python/tests/test_core.py:49: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

    self.assertEqual((["r"], None, None, None), inspect.getargspec(f))

tests/test_core.py::TestGauge::test_inprogress_function_decorator

  /home/travis/build/prometheus/client_python/tests/test_core.py:110: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

    self.assertEqual(([], None, None, None), inspect.getargspec(f))

tests/test_core.py::TestGauge::test_time_function_decorator

  /home/travis/build/prometheus/client_python/tests/test_core.py:137: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

    self.assertEqual(([], None, None, None), inspect.getargspec(f))

tests/test_core.py::TestSummary::test_function_decorator

  /home/travis/build/prometheus/client_python/tests/test_core.py:207: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

    self.assertEqual(([], None, None, None), inspect.getargspec(f))

tests/test_core.py::TestHistogram::test_function_decorator

  /home/travis/build/prometheus/client_python/tests/test_core.py:348: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()

    self.assertEqual(([], None, None, None), inspect.getargspec(f))

tests/test_core.py::TestCollectorRegistry::test_restricted_registry

  /home/travis/build/prometheus/client_python/tests/test_core.py:755: DeprecationWarning: Please use assertEqual instead.

    self.assertEquals([m], registry.restricted_registry(['s_sum']).collect())

tests/test_core.py::TestCollectorRegistry::test_target_info_restricted_registry

  /home/travis/build/prometheus/client_python/tests/test_core.py:779: DeprecationWarning: Please use assertEqual instead.

    self.assertEquals([m], registry.restricted_registry(['s_sum']).collect())

tests/test_core.py::TestCollectorRegistry::test_target_info_restricted_registry

  /home/travis/build/prometheus/client_python/tests/test_core.py:783: DeprecationWarning: Please use assertEqual instead.

    self.assertEquals([m], registry.restricted_registry(['target_info']).collect())

-- Docs: https://docs.pytest.org/en/stable/warnings.html

================== 251 passed, 5 skipped, 8 warnings in 4.38s ==================

yzdann added 2 commits October 2, 2020 11:41
Signed-off-by: yzdann <22779039+yzdann@users.noreply.github.com>
…ecation

Signed-off-by: yzdann <22779039+yzdann@users.noreply.github.com>
@yzdann yzdann changed the title Change assertEquals to assertEqual due to deprecation Fix python3 deprecation warnings Oct 2, 2020
@brian-brazil brian-brazil merged commit af6bfd3 into prometheus:master Oct 2, 2020
@brian-brazil
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants
0