Skip to content

TST: Don't use deprecated version of read_html #33482

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 1 commit into from
Apr 12, 2020

Conversation

LTe
Copy link
Contributor

@LTe LTe commented Apr 11, 2020

Usage of function read_html is marked as deprecated when used with
positional arguments. In case when we do not explicitly check the
warning message with assert_produces_warning we should use non-deprecated
version.

This will resolve #33397

To identify candidates to change I modified decorator to raise an Exception

--- a/pandas/util/_decorators.py
+++ b/pandas/util/_decorators.py
@@ -294,6 +294,7 @@ def deprecate_nonkeyword_arguments(
                     "Starting with Pandas version {version} all arguments of {funcname}"
                     "{except_args} will be keyword-only"
                 ).format(version=version, funcname=func.__name__, except_args=arguments)
+                raise Exception("keyword argument test")
                 warnings.warn(msg, FutureWarning, stacklevel=stacklevel)
             return func(*args, **kwargs)

Related test build https://dev.azure.com/piotrnielacny/piotrnielacny/_build/results?buildId=2&view=ms.vss-test-web.build-test-results-tab

Usage of function read_html is marked as deprecated when used with
positional arguments. In case when we do not explicitly check the
warning message with assert_produces_warning we should use non-deprecated
version.

This will resolve pandas-dev#33397
@LTe LTe force-pushed the remove-warning-keyword-arguments branch from c5b9942 to 9d745c8 Compare April 11, 2020 14:36
@LTe LTe changed the title TST: Don't use eprecated version of read_html TST: Don't use deprecated version of read_html Apr 11, 2020
@topper-123 topper-123 added the Testing pandas testing functions or related to the test suite label Apr 11, 2020
@topper-123 topper-123 added this to the 1.1 milestone Apr 11, 2020
@alimcmaster1
Copy link
Member

LGTM - @LTe can you put an x in the closes checkbox so the issue is closed when merged

@LTe
Copy link
Contributor Author

LTe commented Apr 12, 2020

@alimcmaster1 checked

@alimcmaster1
Copy link
Member

cc @TomAugspurger

@jreback jreback merged commit 9e8ccd7 into pandas-dev:master Apr 12, 2020
@jreback
Copy link
Contributor

jreback commented Apr 12, 2020

thanks @LTe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: pandas warnings in tests about keyword only arguments
4 participants