File tree Expand file tree Collapse file tree 2 files changed +0
-27
lines changed
Expand file tree Collapse file tree 2 files changed +0
-27
lines changed Original file line number Diff line number Diff line change 701701
702702from cirq import contrib
703703
704- # deprecate cirq.ops and related attributes
705-
706- from cirq import _compat
707-
708- _compat .deprecated_submodule (
709- new_module_name = 'cirq.circuits.moment' ,
710- old_parent = 'cirq.ops' ,
711- old_child = 'moment' ,
712- deadline = 'v0.16' ,
713- create_attribute = True ,
714- )
715-
716- ops .Moment = Moment # type: ignore
717- _compat .deprecate_attributes ('cirq.ops' , {'Moment' : ('v0.16' , 'Use cirq.circuits.Moment instead' )})
718-
719704# pylint: enable=wrong-import-position
Original file line number Diff line number Diff line change 1818import cirq
1919import cirq .testing
2020
21- ALLOW_DEPRECATION_IN_TEST = 'ALLOW_DEPRECATION_IN_TEST'
22-
23-
24- def test_deprecated_submodule ():
25- with cirq .testing .assert_deprecated ("Use cirq.circuits.moment instead" , deadline = "v0.16" ):
26- _ = cirq .ops .moment .Moment
27-
28-
29- def test_deprecated_attribute_in_cirq_ops ():
30- with cirq .testing .assert_deprecated ("Use cirq.circuits.Moment instead" , deadline = "v0.16" ):
31- _ = cirq .ops .Moment
32-
3321
3422def test_validation ():
3523 a = cirq .NamedQubit ('a' )
You can’t perform that action at this time.
0 commit comments