Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions cirq-core/cirq/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,19 +701,4 @@

from cirq import contrib

# deprecate cirq.ops and related attributes

from cirq import _compat

_compat.deprecated_submodule(
new_module_name='cirq.circuits.moment',
old_parent='cirq.ops',
old_child='moment',
deadline='v0.16',
create_attribute=True,
)

ops.Moment = Moment # type: ignore
_compat.deprecate_attributes('cirq.ops', {'Moment': ('v0.16', 'Use cirq.circuits.Moment instead')})

# pylint: enable=wrong-import-position
12 changes: 0 additions & 12 deletions cirq-core/cirq/circuits/moment_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@
import cirq
import cirq.testing

ALLOW_DEPRECATION_IN_TEST = 'ALLOW_DEPRECATION_IN_TEST'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused variable?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a hint to allow for deprecated functionality in the test module.



def test_deprecated_submodule():
with cirq.testing.assert_deprecated("Use cirq.circuits.moment instead", deadline="v0.16"):
_ = cirq.ops.moment.Moment


def test_deprecated_attribute_in_cirq_ops():
with cirq.testing.assert_deprecated("Use cirq.circuits.Moment instead", deadline="v0.16"):
_ = cirq.ops.Moment


def test_validation():
a = cirq.NamedQubit('a')
Expand Down