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

Remove Broken Import #9

Closed
wants to merge 1 commit into from
Closed

Remove Broken Import #9

wants to merge 1 commit into from

Conversation

noazark
Copy link

@noazark noazark commented Jul 18, 2016

The CloudFlare import in __init__.py appears to be unnecessary and is causing difficulties when installing.

Collecting cloudflare (from -r requirements.txt (line 12))
  Using cached cloudflare-1.1.5.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/6f/95l6m3j50cg11nzjbg87gg800000gn/T/pip-build-PQ7Smp/cloudflare/setup.py", line 5, in <module>
        from CloudFlare import __version__
      File "CloudFlare/__init__.py", line 3, in <module>
        from cloudflare import CloudFlare
      File "CloudFlare/cloudflare.py", line 5, in <module>
        import requests
    ImportError: No module named requests

The `CloudFlare` import in `__init__.py` appears to be unnecessary and is causing difficulties when installing (`ImportError: No module named requests`).
@frielp
Copy link

frielp commented Sep 12, 2016

👍 I'm running into the same issue

@tmacro
Copy link

tmacro commented Oct 18, 2016

This import is also causing me issues on installation, though with a slightly different error message.

Collecting cloudflare
  Using cached cloudflare-1.2.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-zoiw0fhx/cloudflare/setup.py", line 5, in <module>
        from CloudFlare import __version__
      File "/tmp/pip-build-zoiw0fhx/cloudflare/CloudFlare/__init__.py", line 3, in <module>
        from cloudflare import CloudFlare
    ImportError: No module named 'cloudflare'

This error only occurs when using python 3.x

@mahtin
Copy link
Collaborator

mahtin commented Oct 26, 2016

Yes, this was an issue caused as I initially tried to get Python3 support into the package. Sorry it got broke for a while. The release (as of today) 1.3.1 will install on Python2 or Python3 cleanly. There's plenty more capabilities within the package now. Please read the README.

@mahtin mahtin closed this Oct 26, 2016
@noazark noazark deleted the patch-1 branch October 27, 2016 17:44
@eillarra
Copy link

eillarra commented Nov 2, 2016

@mahtin "Installing cleanly" doesn't mean that the package works correctly with Python 3. The package should use absolute_import from __future__ to mimic Python 3 behaviour: this is needed for relative imports (PEP 328). It currently fails at __init__ when trying to from cloudflare import CloudFlare.

See #14 or #1 for more insight. Detailed commits for #14 can be found here: https://github.com/cloudflare/python-cloudflare/pull/14/files. If you want to merge these I can adapt the PR so that there are no conflicts with the latest source code, and reopen it.

@yesbox yesbox mentioned this pull request Dec 30, 2016
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.

None yet

5 participants