File tree Expand file tree Collapse file tree 2 files changed +2
-29
lines changed
Expand file tree Collapse file tree 2 files changed +2
-29
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ def init_petsc():
7575from firedrake .mg .opencascade_mh import *
7676from firedrake .norms import *
7777from firedrake .nullspace import *
78+ from firedrake .output import *
7879from firedrake .parameters import *
7980from firedrake .parloops import *
8081from firedrake .projection import *
@@ -96,11 +97,7 @@ def init_petsc():
9697set_log_handlers (comm = COMM_WORLD )
9798
9899# Moved functionality
99- from firedrake ._deprecation import plot , File # noqa: F401
100- # Once `File` is deprecated update the above line removing `File` and add
101- # from firedrake._deprecation import output
102- # sys.modules["firedrake.output"] = output
103- from firedrake .output import *
100+ from firedrake ._deprecation import plot # noqa: F401
104101import sys
105102sys .modules ["firedrake.plot" ] = plot
106103from firedrake .plot import *
Original file line number Diff line number Diff line change 22"""
33import importlib
44
5- from warnings import warn
6-
75
86class _fake_module :
97 """ Object which behaves like a module
@@ -47,28 +45,6 @@ def __call__(*args, **kwargs):
4745 return __call__
4846
4947
50- # Deprecate output.File in the global namespace
51- output = _fake_module (
52- "firedrake.output" ,
53- ["File" , ],
54- ["VTKFile" , ]
55- )
56-
57-
58- # I hate it
59- def File (* args , ** kwargs ):
60- """Deprecated File constructor.
61-
62- Use `VTKFile` from `firedrake.output` instead
63- """
64- from .output import VTKFile
65- warn (
66- "The use of `File` for output is deprecated, please update your "
67- "code to use `VTKFile` from `firedrake.output`."
68- )
69- return VTKFile (* args , ** kwargs )
70-
71-
7248# Deprecate plotting in the global namespace
7349plot = _fake_module (
7450 "firedrake.pyplot" ,
You can’t perform that action at this time.
0 commit comments