spyoungtech / grequests

Requests + Gevent = <3
https://pypi.python.org/pypi/grequests
BSD 2-Clause "Simplified" License
4.49k stars 331 forks source link

Importing grequests crashes Python 3.5.1 on OS X 10.11 #88

Closed mikidep closed 4 years ago

mikidep commented 8 years ago
$ python3
Python 3.5.1 (default, May 14 2016, 11:40:57) 
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import grequests
Illegal instruction: 4

Resulting in a crash. I will provide any kind of dumps if needed.

kennethreitz commented 8 years ago

I suspect this is related to gevent, not grequests. I suggest trying with a newer/older version, if possible.

spyoungtech commented 6 years ago

I have experienced a similar issue where importing grequests will cause a segmentation fault on MacOS El Capitan. Creating a virtualenv seemed to resolve the issue for whatever reason.

The behavior was different between Python versions (3.6 segfaulted but 3.5 worked, independent of whether I used gevent 1.2.0 or 1.2.2). Inside of a virtualenv, however, it always just worked.

$ python3
Python 3.6.3 (v3.6.3:2c5fed86e0, Oct  3 2017, 00:32:08) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import grequests
Segmentation fault: 11

but in the virtualenv...

(testvenv)$ python
Python 3.6.3 (v3.6.3:2c5fed86e0, Oct  3 2017, 00:32:08) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import grequests
>>> exit()
spyoungtech commented 4 years ago

Seems to be fixed with newer versions of gevent