From g at zagatti.io Fri Mar 8 11:41:48 2019 From: g at zagatti.io (Guilherme Zagatti) Date: Fri, 08 Mar 2019 16:41:48 +0000 Subject: [pytest-dev] pytest-airflow plugin Message-ID: Dear Pytest Development Community, My name is Guilherme Zagatti. I am a developer at Flowminder, an award winning social-enterprise especializing in the use of Big Data for international development. We are big fans of pytest. We needed to integrate pytest with Airflow to develop data quality assurance tests before ingesting data to our databases. Therefore we created the pytest-airflow pluging. We just made it available to [pypi](https://pypi.org/project/pytest-airflow/) and [open sourced in Github](https://github.com/Flowminder/pytest-airflow). It would be great to receive feedback from the pytest community and your suggestions on how to best promote the plugin to other users. I am available to provide further details on the plugin. In the meanwhile, I have made available [an architecture documentation](https://github.com/Flowminder/pytest-airflow/blob/master/docs/architecture.md) that contains a primer on pytest and detailed explanation of the plugin. Perhaps the contents of this document is of interest to the pytest community more generally. Feel free to provide comments and share more widely. Again, very-well done for maintaining pytest. Best, Guilherme Zagatti -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.marie at se.com Tue Mar 12 05:43:15 2019 From: sylvain.marie at se.com (Sylvain MARIE) Date: Tue, 12 Mar 2019 09:43:15 +0000 Subject: [pytest-dev] pytest-airflow plugin In-Reply-To: References: Message-ID: Dear pytest enthusiasts, This is not pytest per se but quite low-level python so you may find it interesting also for pytest, that has many decorators. -- Writing python decorators is quite a tideous process, in particular when you wish to add arguments, and in particular in two cases : all optional arguments, and one mandatory argument. Indeed in these two cases there is a need to disambiguate between no-parenthesis and with-parenthesis usage. After having struggled with this pattern for two years in various open source and industrial projects, I ended up writing a library to hopefully solve this once and for all: https://smarie.github.io/python-decopatch/ . It is extensively tested (203 tests) against many combinations of signature/calls. I would gladly appreciate any feedback ! Please note that there is a "PEP proposal draft" in the project page because I belive that the best a library can do will always be a poor workaround, where the interpreter or stdlib could really fix it properly. Sorry for not providing too much implementation details in that page, my knowledge of the python interpreter is unfortunately quite limited. -- Finally there is an additional topic around decorators : people tend to believe that decorators and function wrappers are the same, which is absolutely not the case. I used the famous `decorator` lib in many projects but I was not satisfied because it was solving both issues at the same time, maintaining the confusion. I therefore proposed https://smarie.github.io/python-makefun/ . In particular it provides an equivalent of `@functools.wraps` that is truly signature-preserving (based on the same recipe than `decorator`). Once again, any feedback would be gladly appreciated ! Kind regards -- Sylvain De : pytest-dev De la part de Guilherme Zagatti Envoy? : vendredi 8 mars 2019 17:42 ? : pytest-dev at python.org Objet : [pytest-dev] pytest-airflow plugin [External email: Use caution with links and attachments] ________________________________ Dear Pytest Development Community, My name is Guilherme Zagatti. I am a developer at Flowminder, an award winning social-enterprise especializing in the use of Big Data for international development. We are big fans of pytest. We needed to integrate pytest with Airflow to develop data quality assurance tests before ingesting data to our databases. Therefore we created the pytest-airflow pluging. We just made it available to pypi and open sourced in Github. It would be great to receive feedback from the pytest community and your suggestions on how to best promote the plugin to other users. I am available to provide further details on the plugin. In the meanwhile, I have made available an architecture documentation that contains a primer on pytest and detailed explanation of the plugin. Perhaps the contents of this document is of interest to the pytest community more generally. Feel free to provide comments and share more widely. Again, very-well done for maintaining pytest. Best, Guilherme Zagatti ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.marie at se.com Tue Mar 12 05:44:47 2019 From: sylvain.marie at se.com (Sylvain MARIE) Date: Tue, 12 Mar 2019 09:44:47 +0000 Subject: [pytest-dev] decorators and signature-preserving wrappers Message-ID: (wrong title in previous email, sorry) Dear pytest enthusiasts, This is not pytest per se but quite low-level python so you may find it interesting also for pytest, that has many decorators. -- Writing python decorators is quite a tideous process, in particular when you wish to add arguments, and in particular in two cases : all optional arguments, and one mandatory argument. Indeed in these two cases there is a need to disambiguate between no-parenthesis and with-parenthesis usage. After having struggled with this pattern for two years in various open source and industrial projects, I ended up writing a library to hopefully solve this once and for all: https://smarie.github.io/python-decopatch/ . It is extensively tested (203 tests) against many combinations of signature/calls. I would gladly appreciate any feedback ! Please note that there is a "PEP proposal draft" in the project page because I belive that the best a library can do will always be a poor workaround, where the interpreter or stdlib could really fix it properly. Sorry for not providing too much implementation details in that page, my knowledge of the python interpreter is unfortunately quite limited. -- Finally there is an additional topic around decorators : people tend to believe that decorators and function wrappers are the same, which is absolutely not the case. I used the famous `decorator` lib in many projects but I was not satisfied because it was solving both issues at the same time, maintaining the confusion. I therefore proposed https://smarie.github.io/python-makefun/ . In particular it provides an equivalent of `@functools.wraps` that is truly signature-preserving (based on the same recipe than `decorator`). Once again, any feedback would be gladly appreciated ! Kind regards -- Sylvain De : pytest-dev > De la part de Guilherme Zagatti Envoy? : vendredi 8 mars 2019 17:42 ? : pytest-dev at python.org Objet : [pytest-dev] pytest-airflow plugin [External email: Use caution with links and attachments] ________________________________ Dear Pytest Development Community, My name is Guilherme Zagatti. I am a developer at Flowminder, an award winning social-enterprise especializing in the use of Big Data for international development. We are big fans of pytest. We needed to integrate pytest with Airflow to develop data quality assurance tests before ingesting data to our databases. Therefore we created the pytest-airflow pluging. We just made it available to pypi and open sourced in Github. It would be great to receive feedback from the pytest community and your suggestions on how to best promote the plugin to other users. I am available to provide further details on the plugin. In the meanwhile, I have made available an architecture documentation that contains a primer on pytest and detailed explanation of the plugin. Perhaps the contents of this document is of interest to the pytest community more generally. Feel free to provide comments and share more widely. Again, very-well done for maintaining pytest. Best, Guilherme Zagatti ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoddemus at gmail.com Tue Mar 12 12:26:24 2019 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Tue, 12 Mar 2019 13:26:24 -0300 Subject: [pytest-dev] pytest 4.3.1 bug fix release Message-ID: Hi everyone, pytest 4.3.1 has just been released to PyPI. This is a bug-fix release, being a drop-in replacement. To upgrade:: pip install --upgrade pytest The full changelog is available at https://docs.pytest.org/en/latest/changelog.html. Thanks to all who contributed to this release, among them: * Andras Mitzki * Anthony Sottile * Bruno Oliveira * Daniel Hahler * Danilo Horta * Grygorii Iermolenko * Jeff Hale * Kyle Altendorf * Stephan Hoyer * Zac Hatfield-Dodds * Zac-HD * songbowen Happy testing, The pytest Development Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From sylvain.marie at se.com Wed Mar 13 13:16:49 2019 From: sylvain.marie at se.com (Sylvain MARIE) Date: Wed, 13 Mar 2019 17:16:49 +0000 Subject: [pytest-dev] decorators and signature-preserving wrappers In-Reply-To: References: Message-ID: Hi Harry, Thanks for your email ! That?s exactly what I do when you turn the ?enable_introspection? flag on, but frankly I am not at all satisfied with my implementation today: it does not work from iPython/jupyter, and does not seem to work on classes either because the inspect.stack() that I am relying on does not seem to have the same behavior for functions and classes, in particular classes that have nested methods. You can have more details about this hack in the `disambiguate_using_introspection` method: https://github.com/smarie/python-decopatch/blob/master/decopatch/utils_disambiguation.py#L210 Kind regards Sylvain De : Harry Percival Envoy? : mardi 12 mars 2019 15:04 ? : Sylvain MARIE Cc : pytest-dev at python.org Objet : Re: [pytest-dev] decorators and signature-preserving wrappers [External email: Use caution with links and attachments] ________________________________ fascinating. re the last suggestion in your pep, inspect.is_in_decorator_stack, I don't have much experience of inspect, but couldn't you build a hacky version of that already by, I don't know, looking at the source of decorator arguments and parsing it for @s or something? On Tue, 12 Mar 2019, 09:44 Sylvain MARIE via pytest-dev, > wrote: (wrong title in previous email, sorry) Dear pytest enthusiasts, This is not pytest per se but quite low-level python so you may find it interesting also for pytest, that has many decorators. -- Writing python decorators is quite a tideous process, in particular when you wish to add arguments, and in particular in two cases : all optional arguments, and one mandatory argument. Indeed in these two cases there is a need to disambiguate between no-parenthesis and with-parenthesis usage. After having struggled with this pattern for two years in various open source and industrial projects, I ended up writing a library to hopefully solve this once and for all: https://smarie.github.io/python-decopatch/ . It is extensively tested (203 tests) against many combinations of signature/calls. I would gladly appreciate any feedback ! Please note that there is a "PEP proposal draft" in the project page because I belive that the best a library can do will always be a poor workaround, where the interpreter or stdlib could really fix it properly. Sorry for not providing too much implementation details in that page, my knowledge of the python interpreter is unfortunately quite limited. -- Finally there is an additional topic around decorators : people tend to believe that decorators and function wrappers are the same, which is absolutely not the case. I used the famous `decorator` lib in many projects but I was not satisfied because it was solving both issues at the same time, maintaining the confusion. I therefore proposed https://smarie.github.io/python-makefun/ . In particular it provides an equivalent of `@functools.wraps` that is truly signature-preserving (based on the same recipe than `decorator`). Once again, any feedback would be gladly appreciated ! Kind regards -- Sylvain De : pytest-dev > De la part de Guilherme Zagatti Envoy? : vendredi 8 mars 2019 17:42 ? : pytest-dev at python.org Objet : [pytest-dev] pytest-airflow plugin [External email: Use caution with links and attachments] ________________________________ Dear Pytest Development Community, My name is Guilherme Zagatti. I am a developer at Flowminder, an award winning social-enterprise especializing in the use of Big Data for international development. We are big fans of pytest. We needed to integrate pytest with Airflow to develop data quality assurance tests before ingesting data to our databases. Therefore we created the pytest-airflow pluging. We just made it available to pypi and open sourced in Github. It would be great to receive feedback from the pytest community and your suggestions on how to best promote the plugin to other users. I am available to provide further details on the plugin. In the meanwhile, I have made available an architecture documentation that contains a primer on pytest and detailed explanation of the plugin. Perhaps the contents of this document is of interest to the pytest community more generally. Feel free to provide comments and share more widely. Again, very-well done for maintaining pytest. Best, Guilherme Zagatti ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. ______________________________________________________________________ ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. ______________________________________________________________________ _______________________________________________ pytest-dev mailing list pytest-dev at python.org https://mail.python.org/mailman/listinfo/pytest-dev -- -- Harry Percival +44 78877 02511 ______________________________________________________________________ This email has been scanned by the Symantec Email Security.cloud service. ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicoddemus at gmail.com Sun Mar 31 17:15:47 2019 From: nicoddemus at gmail.com (Bruno Oliveira) Date: Sun, 31 Mar 2019 18:15:47 -0300 Subject: [pytest-dev] pytest 4.4 released! Message-ID: The pytest team is proud to announce the 4.4.0 release! pytest is a mature Python testing tool with more than a 2000 tests against itself, passing on many different interpreters and platforms. This release contains a number of bugs fixes and improvements, so users are encouraged to take a look at the CHANGELOG: https://docs.pytest.org/en/latest/changelog.html For complete documentation, please visit: https://docs.pytest.org/en/latest/ As usual, you can upgrade from pypi via: pip install -U pytest Thanks to all who contributed to this release, among them: * Anthony Sottile * ApaDoctor * Bernhard M. Wiedemann * Brian Skinn * Bruno Oliveira * Daniel Hahler * Gary Tyler * Jeong YunWon * Miro Hron?ok * Takafumi Arakaki * henrykironde * smheidrich Happy testing, The Pytest Development Team -------------- next part -------------- An HTML attachment was scrubbed... URL: