Comments (8)
dwavesystems/dwave-preprocessing#45
from dwave-cloud-client.
Hi @yurivict , dwave-system, dwave-cloud-client, dwave-preprocessing, dwave-drivers, dwave-samplers, etc are all namespace packages. Specifically pkgutil-style.
from dwave-cloud-client.
But they conflict with each other because they all install the same file.
from dwave-cloud-client.
This is intentional. It allows all of those individually installed packages to share the same dwave
namespace. That's also why the file is identical in all of them. See namespace packages. At some point in the future we may switch to using native namespace packages which do not require an __init__.py
, but since we first started using them when we still supported Python 2, we still use the pkgutil-style.
from dwave-cloud-client.
In such case the correct structure would be to have one base package that installs __init__.py
and then have any number of other packages that depend on it which don't install __init__.py
.
Package managers reject file conflicts - such packages can't be installed at the same time.
from dwave-cloud-client.
Our supported package installer, pip, handles the conflict by creating the following structure:
site-packages/
dwave/
cloud/
preprocessing/
system/
__init__.py
I believe it keeps the first installed __init__.py
from that namespace and ignores subsequent ones, but I would need to go deeper into the docs to confirm which __init__.py
is used.
from dwave-cloud-client.
What would happen if these files would be different? Would one of them be ignored? This would lead to a breakage.
from dwave-cloud-client.
If they were different then yes, many would be ignored. Which is why we keep them identical, as required by the docs I linked above. Relevant section:
Every distribution that uses the namespace package must include an identical __init__.py. If any distribution does not, it will cause the namespace logic to fail and the other sub-packages will not be importable. Any additional code in __init__.py will be inaccessible.
from dwave-cloud-client.
Related Issues (20)
- Upgrade to pydantic 2+
- `dwave sample --random-problem` fails for unstructured solvers
- Add OAuth/OIDC client, enable authorizing against Leap
- Add credentials/tokens storage
- Implement a utility HTTP server/interface
- Implement OAuth 2.0 Authorization Code Flow with PKCE
- Implement CLI support for auth (`dwave auth` subcommand)
- Http request retry `backoff_max` not working with `urllib3>=2`
- Add config options for defining Leap API endpoint
- Add timing output to `dwave sample`
- dwave.cloud.exceptions.SolverFailureError: Internal SAPI Error HOT 5
- Add `from_config`-like factories to `dwave.cloud.api` clients and resources
- Make SAPI endpoint config option name(s) clearer
- Extract and further abstract region/endpoint resolution
- Add `AuthFlow` as token/auth source for `LeapAccount`/`LeapAPIClient`
- dwave auth login does not time out for target website failure HOT 2
- Add Leap auth flow to `dwave setup`
- Prefer QPU solvers in `dwave ping`
- Drop support for dimod 0.9.x
- Add `--raw`/`-r` option to "get token" CLI commands
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dwave-cloud-client.