-
Notifications
You must be signed in to change notification settings - Fork 124
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
Adjust the implprefix DeprecationWarning's stack level #166
Labels
Comments
Thanks @edmorley. Perhaps you would like to open a PR with that change? |
Yeah please do change it if it will help with the deprecation process 👍 |
@nicoddemus should we get this one in for |
Oh sorry, missed this one in time for 0.8.0, but no matter, we can issue a new release later. |
bors bot
referenced
this issue
in mozilla/normandy
Jan 15, 2019
1692: Scheduled weekly dependency update for week 02 r=peterbe a=pyup-bot ### Update [botocore](https://pypi.org/project/botocore) from **1.12.74** to **1.12.78**. <details> <summary>Changelog</summary> ### 1.12.78 ``` ======= * api-change:``rds-data``: Update rds-data client to latest version * api-change:``emr``: Update emr client to latest version ``` ### 1.12.77 ``` ======= * api-change:``iot``: Update iot client to latest version * api-change:``ec2``: Update ec2 client to latest version * api-change:``codedeploy``: Update codedeploy client to latest version * api-change:``sagemaker``: Update sagemaker client to latest version ``` ### 1.12.76 ``` ======= * api-change:``docdb``: Update docdb client to latest version * api-change:``redshift``: Update redshift client to latest version ``` ### 1.12.75 ``` ======= * api-change:``appmesh``: Update appmesh client to latest version ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/botocore - Changelog: https://pyup.io/changelogs/botocore/ - Repo: https://github.com/boto/botocore </details> ### Update [mohawk](https://pypi.org/project/mohawk) from **0.3.4** to **1.0.0**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/mohawk - Repo: https://github.com/kumar303/mohawk </details> ### Update [pluggy](https://pypi.org/project/pluggy) from **0.8.0** to **0.8.1**. <details> <summary>Changelog</summary> ### 0.8.1 ``` ========================= Trivial/Internal Changes ------------------------ - `166 <https://github.com/pytest-dev/pluggy/issues/166>`_: Add ``stacklevel=2`` to implprefix warning so that the reported location of warning is the caller of PluginManager. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pluggy - Changelog: https://pyup.io/changelogs/pluggy/ - Repo: https://github.com/pytest-dev/pluggy </details> ### Update [pyparsing](https://pypi.org/project/pyparsing) from **2.3.0** to **2.3.1**. <details> <summary>Changelog</summary> ### 2.3.1 ``` ----------------------------- - POSSIBLE API CHANGE: this release fixes a bug when results names were attached to a MatchFirst or Or object containing an And object. Previously, a results name on an And object within an enclosing MatchFirst or Or could return just the first token in the And. Now, all the tokens matched by the And are correctly returned. This may result in subtle changes in the tokens returned if you have this condition in your pyparsing scripts. - New staticmethod ParseException.explain() to help diagnose parse exceptions by showing the failing input line and the trace of ParserElements in the parser leading up to the exception. explain() returns a multiline string listing each element by name. (This is still an experimental method, and the method signature and format of the returned string may evolve over the next few releases.) Example: define a parser to parse an integer followed by an alphabetic word expr = pp.Word(pp.nums).setName("int") + pp.Word(pp.alphas).setName("word") try: parse a string with a numeric second value instead of alpha expr.parseString("123 355") except pp.ParseException as pe: print_(pp.ParseException.explain(pe)) Prints: 123 355 ^ ParseException: Expected word (at char 4), (line:1, col:5) __main__.ExplainExceptionTest pyparsing.And - {int word} pyparsing.Word - word explain() will accept any exception type and will list the function names and parse expressions in the stack trace. This is especially useful when an exception is raised in a parse action. Note: explain() is only supported under Python 3. - Fix bug in dictOf which could match an empty sequence, making it infinitely loop if wrapped in a OneOrMore. - Added unicode sets to pyparsing_unicode for Latin-A and Latin-B ranges. - Added ability to define custom unicode sets as combinations of other sets using multiple inheritance. class Turkish_set(pp.pyparsing_unicode.Latin1, pp.pyparsing_unicode.LatinA): pass turkish_word = pp.Word(Turkish_set.alphas) - Updated state machine import examples, with state machine demos for: . traffic light . library book checkin/checkout . document review/approval In the traffic light example, you can use the custom 'statemachine' keyword to define the states for a traffic light, and have the state classes auto-generated for you: statemachine TrafficLightState: Red -> Green Green -> Yellow Yellow -> Red Similar for state machines with named transitions, like the library book state example: statemachine LibraryBookState: New -(shelve)-> Available Available -(reserve)-> OnHold OnHold -(release)-> Available Available -(checkout)-> CheckedOut CheckedOut -(checkin)-> Available Once the classes are defined, then additional Python code can reference those classes to add class attributes, instance methods, etc. See the examples in examples/statemachine - Added an example parser for the decaf language. This language is used in CS compiler classes in many colleges and universities. - Fixup of docstrings to Sphinx format, inclusion of test files in the source package, and convert markdown to rst throughout the distribution, great job by Matěj Cepl! - Expanded the whitespace characters recognized by the White class to include all unicode defined spaces. Suggested in Issue 51 by rtkjbillo. - Added optional postParse argument to ParserElement.runTests() to add a custom callback to be called for test strings that parse successfully. Useful for running tests that do additional validation or processing on the parsed results. See updated chemicalFormulas.py example. - Removed distutils fallback in setup.py. If installing the package fails, please update to the latest version of setuptools. Plus overall project code cleanup (CRLFs, whitespace, imports, etc.), thanks Jon Dufresne! - Fix bug in CaselessKeyword, to make its behavior consistent with Keyword(caseless=True). Fixes Issue 65 reported by telesphore. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pyparsing - Changelog: https://pyup.io/changelogs/pyparsing/ - Repo: https://github.com/pyparsing/pyparsing/ - Docs: https://pythonhosted.org/pyparsing/ </details> ### Update [googleapis-common-protos](https://pypi.org/project/googleapis-common-protos) from **1.5.5** to **1.5.6**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/googleapis-common-protos - Repo: https://github.com/googleapis/googleapis </details> ### Update [boto3](https://pypi.org/project/boto3) from **1.9.74** to **1.9.78**. <details> <summary>Changelog</summary> ### 1.9.78 ``` ====== * api-change:``rds-data``: [``botocore``] Update rds-data client to latest version * api-change:``emr``: [``botocore``] Update emr client to latest version ``` ### 1.9.77 ``` ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version ``` ### 1.9.76 ``` ====== * api-change:``docdb``: [``botocore``] Update docdb client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version ``` ### 1.9.75 ``` ====== * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/boto3 - Changelog: https://pyup.io/changelogs/boto3/ - Repo: https://github.com/boto/boto3 </details> ### Update [newrelic](https://pypi.org/project/newrelic) from **4.8.0.110** to **4.10.0.112**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/newrelic - Changelog: https://pyup.io/changelogs/newrelic/ - Homepage: http://newrelic.com/docs/python/new-relic-for-python </details> ### Update [pytest](https://pypi.org/project/pytest) from **4.1.0** to **4.1.1**. <details> <summary>Changelog</summary> ### 4.1.1 ``` ========================= Bug Fixes --------- - `2256 <https://github.com/pytest-dev/pytest/issues/2256>`_: Show full repr with ``assert a==b`` and ``-vv``. - `3456 <https://github.com/pytest-dev/pytest/issues/3456>`_: Extend Doctest-modules to ignore mock objects. - `4617 <https://github.com/pytest-dev/pytest/issues/4617>`_: Fixed ``pytest.warns`` bug when context manager is reused (e.g. multiple parametrization). - `4631 <https://github.com/pytest-dev/pytest/issues/4631>`_: Don't rewrite assertion when ``__getattr__`` is broken Improved Documentation ---------------------- - `3375 <https://github.com/pytest-dev/pytest/issues/3375>`_: Document that using ``setup.cfg`` may crash other tools or cause hard to track down problems because it uses a different parser than ``pytest.ini`` or ``tox.ini`` files. Trivial/Internal Changes ------------------------ - `4602 <https://github.com/pytest-dev/pytest/issues/4602>`_: Uninstall ``hypothesis`` in regen tox env. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pytest - Changelog: https://pyup.io/changelogs/pytest/ - Homepage: https://docs.pytest.org/en/latest/ </details> Co-authored-by: pyup-bot <github-bot@pyup.io> Co-authored-by: Mike Cooper <mythmon@gmail.com>
bors bot
referenced
this issue
in mozilla/normandy
Jan 15, 2019
1692: Scheduled weekly dependency update for week 02 r=peterbe a=pyup-bot ### Update [botocore](https://pypi.org/project/botocore) from **1.12.74** to **1.12.78**. <details> <summary>Changelog</summary> ### 1.12.78 ``` ======= * api-change:``rds-data``: Update rds-data client to latest version * api-change:``emr``: Update emr client to latest version ``` ### 1.12.77 ``` ======= * api-change:``iot``: Update iot client to latest version * api-change:``ec2``: Update ec2 client to latest version * api-change:``codedeploy``: Update codedeploy client to latest version * api-change:``sagemaker``: Update sagemaker client to latest version ``` ### 1.12.76 ``` ======= * api-change:``docdb``: Update docdb client to latest version * api-change:``redshift``: Update redshift client to latest version ``` ### 1.12.75 ``` ======= * api-change:``appmesh``: Update appmesh client to latest version ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/botocore - Changelog: https://pyup.io/changelogs/botocore/ - Repo: https://github.com/boto/botocore </details> ### Update [mohawk](https://pypi.org/project/mohawk) from **0.3.4** to **1.0.0**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/mohawk - Repo: https://github.com/kumar303/mohawk </details> ### Update [pluggy](https://pypi.org/project/pluggy) from **0.8.0** to **0.8.1**. <details> <summary>Changelog</summary> ### 0.8.1 ``` ========================= Trivial/Internal Changes ------------------------ - `166 <https://github.com/pytest-dev/pluggy/issues/166>`_: Add ``stacklevel=2`` to implprefix warning so that the reported location of warning is the caller of PluginManager. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pluggy - Changelog: https://pyup.io/changelogs/pluggy/ - Repo: https://github.com/pytest-dev/pluggy </details> ### Update [pyparsing](https://pypi.org/project/pyparsing) from **2.3.0** to **2.3.1**. <details> <summary>Changelog</summary> ### 2.3.1 ``` ----------------------------- - POSSIBLE API CHANGE: this release fixes a bug when results names were attached to a MatchFirst or Or object containing an And object. Previously, a results name on an And object within an enclosing MatchFirst or Or could return just the first token in the And. Now, all the tokens matched by the And are correctly returned. This may result in subtle changes in the tokens returned if you have this condition in your pyparsing scripts. - New staticmethod ParseException.explain() to help diagnose parse exceptions by showing the failing input line and the trace of ParserElements in the parser leading up to the exception. explain() returns a multiline string listing each element by name. (This is still an experimental method, and the method signature and format of the returned string may evolve over the next few releases.) Example: define a parser to parse an integer followed by an alphabetic word expr = pp.Word(pp.nums).setName("int") + pp.Word(pp.alphas).setName("word") try: parse a string with a numeric second value instead of alpha expr.parseString("123 355") except pp.ParseException as pe: print_(pp.ParseException.explain(pe)) Prints: 123 355 ^ ParseException: Expected word (at char 4), (line:1, col:5) __main__.ExplainExceptionTest pyparsing.And - {int word} pyparsing.Word - word explain() will accept any exception type and will list the function names and parse expressions in the stack trace. This is especially useful when an exception is raised in a parse action. Note: explain() is only supported under Python 3. - Fix bug in dictOf which could match an empty sequence, making it infinitely loop if wrapped in a OneOrMore. - Added unicode sets to pyparsing_unicode for Latin-A and Latin-B ranges. - Added ability to define custom unicode sets as combinations of other sets using multiple inheritance. class Turkish_set(pp.pyparsing_unicode.Latin1, pp.pyparsing_unicode.LatinA): pass turkish_word = pp.Word(Turkish_set.alphas) - Updated state machine import examples, with state machine demos for: . traffic light . library book checkin/checkout . document review/approval In the traffic light example, you can use the custom 'statemachine' keyword to define the states for a traffic light, and have the state classes auto-generated for you: statemachine TrafficLightState: Red -> Green Green -> Yellow Yellow -> Red Similar for state machines with named transitions, like the library book state example: statemachine LibraryBookState: New -(shelve)-> Available Available -(reserve)-> OnHold OnHold -(release)-> Available Available -(checkout)-> CheckedOut CheckedOut -(checkin)-> Available Once the classes are defined, then additional Python code can reference those classes to add class attributes, instance methods, etc. See the examples in examples/statemachine - Added an example parser for the decaf language. This language is used in CS compiler classes in many colleges and universities. - Fixup of docstrings to Sphinx format, inclusion of test files in the source package, and convert markdown to rst throughout the distribution, great job by Matěj Cepl! - Expanded the whitespace characters recognized by the White class to include all unicode defined spaces. Suggested in Issue 51 by rtkjbillo. - Added optional postParse argument to ParserElement.runTests() to add a custom callback to be called for test strings that parse successfully. Useful for running tests that do additional validation or processing on the parsed results. See updated chemicalFormulas.py example. - Removed distutils fallback in setup.py. If installing the package fails, please update to the latest version of setuptools. Plus overall project code cleanup (CRLFs, whitespace, imports, etc.), thanks Jon Dufresne! - Fix bug in CaselessKeyword, to make its behavior consistent with Keyword(caseless=True). Fixes Issue 65 reported by telesphore. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pyparsing - Changelog: https://pyup.io/changelogs/pyparsing/ - Repo: https://github.com/pyparsing/pyparsing/ - Docs: https://pythonhosted.org/pyparsing/ </details> ### Update [googleapis-common-protos](https://pypi.org/project/googleapis-common-protos) from **1.5.5** to **1.5.6**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/googleapis-common-protos - Repo: https://github.com/googleapis/googleapis </details> ### Update [boto3](https://pypi.org/project/boto3) from **1.9.74** to **1.9.78**. <details> <summary>Changelog</summary> ### 1.9.78 ``` ====== * api-change:``rds-data``: [``botocore``] Update rds-data client to latest version * api-change:``emr``: [``botocore``] Update emr client to latest version ``` ### 1.9.77 ``` ====== * api-change:``iot``: [``botocore``] Update iot client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``codedeploy``: [``botocore``] Update codedeploy client to latest version * api-change:``sagemaker``: [``botocore``] Update sagemaker client to latest version ``` ### 1.9.76 ``` ====== * api-change:``docdb``: [``botocore``] Update docdb client to latest version * api-change:``redshift``: [``botocore``] Update redshift client to latest version ``` ### 1.9.75 ``` ====== * api-change:``appmesh``: [``botocore``] Update appmesh client to latest version ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/boto3 - Changelog: https://pyup.io/changelogs/boto3/ - Repo: https://github.com/boto/boto3 </details> ### Update [newrelic](https://pypi.org/project/newrelic) from **4.8.0.110** to **4.10.0.112**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/newrelic - Changelog: https://pyup.io/changelogs/newrelic/ - Homepage: http://newrelic.com/docs/python/new-relic-for-python </details> ### Update [pytest](https://pypi.org/project/pytest) from **4.1.0** to **4.1.1**. <details> <summary>Changelog</summary> ### 4.1.1 ``` ========================= Bug Fixes --------- - `2256 <https://github.com/pytest-dev/pytest/issues/2256>`_: Show full repr with ``assert a==b`` and ``-vv``. - `3456 <https://github.com/pytest-dev/pytest/issues/3456>`_: Extend Doctest-modules to ignore mock objects. - `4617 <https://github.com/pytest-dev/pytest/issues/4617>`_: Fixed ``pytest.warns`` bug when context manager is reused (e.g. multiple parametrization). - `4631 <https://github.com/pytest-dev/pytest/issues/4631>`_: Don't rewrite assertion when ``__getattr__`` is broken Improved Documentation ---------------------- - `3375 <https://github.com/pytest-dev/pytest/issues/3375>`_: Document that using ``setup.cfg`` may crash other tools or cause hard to track down problems because it uses a different parser than ``pytest.ini`` or ``tox.ini`` files. Trivial/Internal Changes ------------------------ - `4602 <https://github.com/pytest-dev/pytest/issues/4602>`_: Uninstall ``hypothesis`` in regen tox env. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pytest - Changelog: https://pyup.io/changelogs/pytest/ - Homepage: https://docs.pytest.org/en/latest/ </details> Co-authored-by: pyup-bot <github-bot@pyup.io> Co-authored-by: Mike Cooper <mythmon@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
In #144 a deprecation warning was added for usage of the
implprefix
argument.However the
warnings.warn()
call doesn't set astacklevel
, which means when the warning is output, the blamed line is in pluggy, rather than the plugin that's usingimplprefix
. For example:https://travis-ci.org/mozilla/treeherder/jobs/409417404#L895
Passing
stacklevel=2
would make it clearer as to where the issue lies, and also mean the correct module path can be referenced in eg pytest'sfilterwarnings
(for downstream projects who enable warnings/deprecation warnings as errors).Many thanks :-)
CC @tgoodlet
The text was updated successfully, but these errors were encountered: