Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 0 additions & 9 deletions qiskit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

"""Main Qiskit public functionality."""

import pkgutil
import sys
import warnings

Expand Down Expand Up @@ -69,14 +68,6 @@
import qiskit.circuit.measure
import qiskit.circuit.reset

# Allow extending this namespace. Please note that currently this line needs
# to be placed *before* the wrapper imports or any non-import code AND *before*
# importing the package you want to allow extensions for (in this case `backends`).

# Support for the deprecated extending this namespace.
# Remove this after 0.46.0 release
__path__ = pkgutil.extend_path(__path__, __name__)

# Please note these are global instances, not modules.
from qiskit.providers.basicaer import BasicAer

Expand Down
7 changes: 0 additions & 7 deletions qiskit/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,8 +750,6 @@ def status(self):
to wrap a :class:`~.BackendV1` object with a :class:`~.BackendV2` interface.
"""

import pkgutil

# Providers interface
from qiskit.providers.provider import Provider
from qiskit.providers.provider import ProviderV1
Expand All @@ -773,8 +771,3 @@ def status(self):
BackendConfigurationError,
)
from qiskit.providers.jobstatus import JobStatus


# Support for the deprecated extending this namespace.
# Remove this after 0.46.0 release
__path__ = pkgutil.extend_path(__path__, __name__)
14 changes: 14 additions & 0 deletions releasenotes/notes/remove-namespace-hooks-995bdb7515a9fe35.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
upgrade:
- |
Support for extensions of the ``qiskit`` and ``qiskit.providers`` namespaces
by external packages has been removed. Support for doing this was deprecated
in the Qiskit 0.44.0 release. In the past, the Qiskit project was composed
of elements that extended a shared namespace and hook points were added
to enable doing that. However, it was not intended for these interfaces to
ever be used by other packages. Now that the overall Qiskit package is no
longer using that packaging model, leaving the possibility for these
extensions carry more risk than benefits and has therefore been removed.
If you’re maintaining a package that extends the Qiskit namespace (i.e.
your users import from ``qiskit.x`` or ``qiskit.providers.y``) you should
transition to using a standalone Python namespace for your package.