Skip to content
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

UFL deprecated function used in UFL code #132

Closed
IgorBaratta opened this issue Nov 17, 2022 · 8 comments
Closed

UFL deprecated function used in UFL code #132

IgorBaratta opened this issue Nov 17, 2022 · 8 comments

Comments

@IgorBaratta
Copy link
Member

IgorBaratta commented Nov 17, 2022

Running ufl tests highlights the issue:

python3 -m pytest -xvs test/
====================================================================================================== test session starts ======================================================================================================
platform linux -- Python 3.8.10, pytest-7.1.3, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: ...
plugins: forked-1.4.0, xdist-2.5.0
collected 561 items                                                                                                                                                                                                             

test/test_algorithms.py::test_extract_arguments_vs_fixture PASSED
test/test_algorithms.py::test_extract_coefficients_vs_fixture PASSED
test/test_algorithms.py::test_extract_elements_and_extract_unique_elements PASSED
test/test_algorithms.py::test_pre_and_post_traversal PASSED
test/test_algorithms.py::test_expand_indices Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_algorithms.py::test_adjoint PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/Constant.py] PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/ConvectionJacobi.py] PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/ConvectionJacobi2.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/ConvectionVector.py] PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/Elasticity.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/EnergyNorm.py] PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/Equation.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/ExplicitConvection.py] PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/FEEC.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/FunctionOperators.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/H1norm.py] PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/HarmonicMap.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/HarmonicMap2.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/Heat.py] PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/HornSchunck.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED
test/test_analyse_demos.py::test_demo_files[/home/ia397/Projects/fenics/ufl/demo/HyperElasticity.py] Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
Expr.ufl_domain() is deprecated, please use extract_unique_domain(expr) instead.
PASSED

 
@garth-wells
Copy link
Member

@mscroggs could you take a look at this?

@chrisrichardson
Copy link
Contributor

We should be using the Python logging and warnings system, instead of UFL's homemade one. Then we could suppress the warnings more easily.

@garth-wells
Copy link
Member

garth-wells commented Nov 21, 2022

We should be using the Python logging and warnings system, instead of UFL's homemade one. Then we could suppress the warnings more easily.

and turn deprecation warnings into error so we can find where the functions are called.

@chrisrichardson
Copy link
Contributor

@mscroggs
Copy link
Member

We should be using the Python logging and warnings system, instead of UFL's homemade one. Then we could suppress the warnings more easily.

I also started on this in https://github.com/FEniCS/ufl/tree/mscroggs/log

@mscroggs
Copy link
Member

This warnings will be showing up after #131.

There were some functions that had comment stating that they should be made to give a deprecation warning, that I replaced with deprecation warnings. I'll take a look and work out which of these is causing this

@mscroggs
Copy link
Member

mscroggs commented Jan 4, 2023

Can this now be closed following #139?

@IgorBaratta
Copy link
Member Author

I think so, the warnings are not showing up anymore.

@mscroggs mscroggs closed this as completed Jan 4, 2023
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

No branches or pull requests

4 participants