Skip to content
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

Disable pm api by default #1216

Merged
merged 1 commit into from
Jan 18, 2019

Conversation

njgheorghita
Copy link
Contributor

What was wrong?

Disable PMAPI by default, and mechanism to enable the unstable API.

Cute Animal Picture

image

)

def enable_unstable_package_management_api(self):
from web3.pm import PM
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was the quick and easy solution to avoiding the circular import this time around, but it seems to me like this won't be suitable long-term when we want to make the PM api available on the web3 object by default.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm missing it: which circular import? Does web3.pm import from web3.main somehow?

I don't follow how this will be different from any other modules that are attached on Web3 by default.

)

def enable_unstable_package_management_api(self):
from web3.pm import PM
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm missing it: which circular import? Does web3.pm import from web3.main somehow?

I don't follow how this will be different from any other modules that are attached on Web3 by default.

@njgheorghita
Copy link
Contributor Author

njgheorghita commented Jan 17, 2019

@carver Sorry, it's not very clear but web3.pm imports from ethpm.package which imports Web3 from web3.main

@carver
Copy link
Collaborator

carver commented Jan 17, 2019

@carver Sorry, it's not very clear but web3.pm imports from ethpm.package which imports Web3 from web3.main

At some point, we may have to vendor ethpm like we did ens. For now, the internal import is okay. It may instead make sense to do the internal import inside web3.pm, but I don't have any suggestion on that yet

@njgheorghita njgheorghita merged commit c679af1 into ethereum:pm-api Jan 18, 2019
@njgheorghita njgheorghita deleted the pm-api-unstable-flag branch January 18, 2019 09:38
njgheorghita added a commit that referenced this pull request Jan 18, 2019
njgheorghita added a commit that referenced this pull request Jan 18, 2019
njgheorghita added a commit that referenced this pull request Jan 18, 2019
njgheorghita added a commit that referenced this pull request Jan 18, 2019
njgheorghita added a commit that referenced this pull request Jan 21, 2019
njgheorghita added a commit that referenced this pull request Jan 22, 2019
njgheorghita added a commit that referenced this pull request Jan 22, 2019
njgheorghita added a commit that referenced this pull request Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants