-
Notifications
You must be signed in to change notification settings - Fork 370
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
[Do Not Merge] Namespace no more v3 #1587
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Namespace packages are constant source of problems for users. The python packaging ecosystem around splitting packages across namespaces is fragile at the best of times and can often leave a you with an environment that isn't recoverable (especially when mixing install methods). There is also a performance hit whenever there is a piece of the namespace we allow external packages to extend since it requires doing a full python path search which can be slow depending on the backing I/O and the number of paths in sys.path for an environment. This commit addresses the piece from the aer perspective by moving qiskit.providers.aer to it's own package and namespace 'qiskit_aer'. This is coupled with a custom namespace module that implements a custom import loader at the root of the namespace. This has 2 advantages it removes the use of namespace packages so the fragility and performance impact are fixed since every element will be renamed to use 'qiskit_' instead of 'qiskit.' (aer being the only one remaining). This is the second attempt at doing this namespace rename, the first failed attempt in Qiskit#840 was trying to migrate all the former qiskit elements at the same time and was too difficult to migrate everything at once without causing breaking api changes. This commit is mechanically the same (renaming qiskit.providers.aer -> qiskit_aer), but how it integrates with qiskit-terra is changed. With Qiskit/qiskit#5089 qiskit-terra, the package which owns the 'qiskit.*' namespace, adds a metaimporter that will redirect imports from qiskit.providers.aer to qiskit_aer. This means before we can merge this commit Qiskit/qiskit#5089 will need to be released first to ensure that for backwards compatibility existing users will be able to access aer from the old namespace. Fixes Qiskit/qiskit#559
This reverts commit 4fa5bc9.
hhorii
force-pushed
the
namespace-no-more-v3
branch
2 times, most recently
from
August 29, 2022 16:25
dd73fd3
to
6dfb376
Compare
hhorii
force-pushed
the
namespace-no-more-v3
branch
from
August 29, 2022 17:24
6dfb376
to
d2cc39e
Compare
hhorii
force-pushed
the
namespace-no-more-v3
branch
from
August 30, 2022 00:58
2bf9c59
to
3a96e68
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR is just for debugging CI errors in #1526.
Details and comments