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

Bug: "Import Error _DEFAULT_CA_CERTS" With tornado 5.0 #203

Closed
tommyyz opened this issue Mar 12, 2018 · 16 comments
Closed

Bug: "Import Error _DEFAULT_CA_CERTS" With tornado 5.0 #203

tommyyz opened this issue Mar 12, 2018 · 16 comments
Labels

Comments

@tommyyz
Copy link

tommyyz commented Mar 12, 2018

Since tornado updated to 5.0, the latest version of pynsq has conflict with this new tornado:

>>> import nsq
Traceback (most recent call last):
  File "/Users/tom/Virtualenvs/athena/lib/python3.5/site-packages/nsq/async.py", line 31, in <module>
    from tornado.simple_httpclient import _default_ca_certs as default_ca_certs
ImportError: cannot import name '_default_ca_certs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/tom/Virtualenvs/athena/lib/python3.5/site-packages/nsq/__init__.py", line 29, in <module>
    from .async import AsyncConn
  File "/Users/tom/Virtualenvs/athena/lib/python3.5/site-packages/nsq/async.py", line 34, in <module>
    from tornado.simple_httpclient import _DEFAULT_CA_CERTS
ImportError: cannot import name '_DEFAULT_CA_CERTS'

This bug causes huge consequences on my application and plz fix this ASAP.
Currently my way to fix this bug is to put these lines in requirements.txt to force tornado use 4.5.3:

tornado==4.5.3
pynsq
@tommyyz
Copy link
Author

tommyyz commented Mar 12, 2018

oooops I just found out pynsq-0.8.3 fixed that issue. ORZ.. waiting for this release!

@ploxiln
Copy link
Member

ploxiln commented Mar 12, 2018

Yup, still, this is a good additional note for #185

@kimixsx
Copy link

kimixsx commented Mar 26, 2018

Encountered this issue + 1, where did you find out pynsq-0.8.3 fixed it?

@ploxiln
Copy link
Member

ploxiln commented Mar 26, 2018

the change in pynsq-0.8.3 is to require tornado < 5.0

@tommyyz
Copy link
Author

tommyyz commented Mar 26, 2018

@ploxiln yeah I checked the changes hahaha...

@yxy
Copy link

yxy commented Apr 14, 2018

same issue

@memotype
Copy link

memotype commented Sep 18, 2018

What is the status on this issue? I just ran "pip3 install pynsq" and trying to import it I get this error. Seems odd that this issue would still be open 6 months later being as it renders the module completely unusable...

@ploxiln
Copy link
Member

ploxiln commented Sep 18, 2018

This module is usable if you use tornado < 5.0
(which would be enforced by https://github.com/nsqio/pynsq/blob/master/setup.py#L35 but there has not yet been a pynsq release with that constraint). I suggest you pip3 install tornado==4.5.3

@ploxiln
Copy link
Member

ploxiln commented Sep 19, 2018

The setup.py checks for tornado<5.0 but we haven't made any release since that change. There have also been a couple of python3-related fixes since then, so maybe it's time for another release @jehiah @mreiferson ?

(even though the long-awaited tornado-5.0 compatibility, which I said I would work on, has not been done yet ...)

@mreiferson
Copy link
Member

Given that actual compatibility is a ways off, yea, should probably issue a point release for the patch.

@SylphiaWindy
Copy link

Why closed this while not fixed?

@ploxiln
Copy link
Member

ploxiln commented Nov 12, 2018

the latest release 0.8.3 prevents you from using pynsq with tornado >= 5.0 (so you can use at latest tornado 4.5.3) so you won't run into this particular error

compatibility with tornado-5.x is still a needed feature/bugfix and not forgotten

@SylphiaWindy
Copy link

Alright, I see. How about just using None for default ca_certs, or import certifi and using certifi.where

@xiaoliuhust
Copy link

what's the time of next release of pynsq, i want to use pynsq with tornado 5.1

@pirm-in
Copy link

pirm-in commented Mar 15, 2019

Hi there!
Is there any update about the support for tornado-5? Compatibility with the asyncio loop would be awesome. maybe a feature branch where we could help?

Or is there any other way to use pynsq, when i already have asyncio in place. I am currently struggling with combining the two, because i already have a blocking asyncio-loop.
Thanks!

Edit:
Ok, i just found #185
Is it only the merge conflicts, or is there more to it?

@mreiferson
Copy link
Member

please continue discussion in #185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants