dlt-hub / verified-sources

Contribute to dlt verified sources 🔥
https://dlthub.com/docs/walkthroughs/add-a-verified-source
Apache License 2.0
52 stars 40 forks source link

[REST source] fixes deprecation warning #380

Closed willi-mueller closed 4 months ago

willi-mueller commented 4 months ago

Tell us what you do here

Relevant issue

issue #313

More PR info

Before:

See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources

tests/rest_api/conftest.py:75
  dlt-verified-sources/tests/rest_api/conftest.py:75: DeprecationWarning: invalid escape sequence '\?'
    @router.get("/posts(\?page=\d+)?$")

tests/rest_api/conftest.py:79
  dlt-verified-sources/tests/rest_api/conftest.py:79: DeprecationWarning: invalid escape sequence '\d'
    @router.get("/posts/(\d+)/comments")

tests/rest_api/conftest.py:84
  dlt-verified-sources/tests/rest_api/conftest.py:84: DeprecationWarning: invalid escape sequence '\d'
    @router.get("/posts/\d+$")

tests/rest_api/conftest.py:89
  dlt-verified-sources/tests/rest_api/conftest.py:89: DeprecationWarning: invalid escape sequence '\d'
    @router.get("/posts/\d+/some_details_404")

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

After

Screenshot 2024-02-29 at 15 15 28
burnash commented 4 months ago

Thanks, @willi-mueller!