pycurl / pycurl Goto Github PK
View Code? Open in Web Editor NEWPycURL - Python interface to libcurl
Home Page: http://pycurl.io/
License: GNU Lesser General Public License v2.1
PycURL - Python interface to libcurl
Home Page: http://pycurl.io/
License: GNU Lesser General Public License v2.1
If libcurl and python are built with different crts, file pointers cannot be passed between them. This only affects python 2.
http://curl.haxx.se/mail/curlpython-2013-12/0026.html
There is already a conversion from file pointers to write methods for python 3 which can be used for python 2 on windows as well.
This fact should be documented for the benefit of anyone building pycurl/libcurl themselves. Also note that libcurl.dll cannot be swapped arbitrarily.
Hi there,
I'm using pycurl 7.19.0 (libcurl/7.28.1 OpenSSL/1.0.1e zlib/1.2.7 libidn/1.25 libssh2/1.4.3) with Python 3.3.0
I set my write function as follows:
self._curl.setopt(pycurl.WRITEFUNCTION, self._response_body.write)
where self._response_body is io.StringIO object
The above write fails on large arrays of data, with an error like this:
pycurl.error: (23, 'Failed writing body (1457 != 1460)')
Have a look at a more detailed description and a workaround here
#!/usr/bin/env python3
import pycurl
from io import StringIO
if __name__ == "__main__":
header = StringIO()
body = StringIO()
curl = pycurl.Curl()
curl.setopt(pycurl.HEADERFUNCTION, header.write)
curl.setopt(pycurl.WRITEFUNCTION, body.write)
curl.setopt(pycurl.URL, "http://www.python.org/")
curl.perform()
Pip's --pre flag makes it use a more liberal parser of version numbers, which makes it parse "7.19.0.3.win32-py2.7" as a version number and download that zip even on non-windows platforms. This is important mainly because --pre is the default for dependencies installed via tox. I'm not sure what naming rules pip follows, but these windows zip files should either be renamed to follow the correct rules or moved so they are not linked from the pypi download_url (You might also be able to remove the download_url setting entirely now that the releases can be downloaded from pypi directly)
My app uses PyCurl to upload multiple files one by one. It works all good with all cURL options and CPU consumption remains below 1%. When I add MAX_SEND_SPEED_LARGE option to throttle bandwidth, CPU consumption goes to 100%.
i download the zip file from this github project
and tried to install but there wase an error ;
'Traceback (most recent call last):
File "setup.py", line 128, in
match = re.search(r'Version (\d+)', err.split("
TypeError: Type str doesn't support the buffer API'
After some searching, I found that, in py3k, The stdout & stderr are file objects working with bytes data so i fixed it with:
line 128 in setup.py becomes :
match = re.search(r'Version (\d+)', str(err).split("\n")[0])
or
match = re.search(r'Version (\d+)', err.decode(sys.stdout.encoding).split("\n")[0])
and that fixed the problem.
thank you for your efforts
If we claim python 2.4 support, we should ensure our code actually works under it.
In particular we use with statements in tests.
Seem to be having an ssl certificate issue, check on travis.
pycurl.h now has this:
# warning \
"libcurl was compiled with SSL support, ...
This is no good for MSVC. Should be:
# ifdef _MSC_VER
# pragma message("libcurl was compiled with SSL support ...")
# else
See comments in 1ccd900.
Also, add setup.py --help
to test suite.
Need to define it for older pythons.
See comments in 751f428.
http://docs.python.org/2/c-api/gcsupport.html
The collector can run at unexpected times so objects must be valid while being tracked. This should be called once all the fields followed by the tp_traverse handler become valid, usually near the end of the constructor.
Hi Guys, It was a surprise for me to see such big activity in pycurl repo. I was thought that the project is frozen. I see you've uploaded a new version on pypi. Maybe there were many new versions of pycurl, but I noticed only the last one because it broked my tests.
I work on the website scraping framework called a Grab. I work on it for about 3 years and all this time I use pycurl as network backend. I have a large test suite (https://github.com/lorien/grab/tree/master/test) and recently it started throwing some errors https://travis-ci.org/lorien/grab/jobs/11910002. And then I went to pypi and noticed that last pycurl release is dated of this month.
The intresting fact, If I run tests on pycurl from http://githbub.com/lorien/pycurl (that is just copy of ubuntu pycurl with py3k patches) then I have no error. So, I think that you made some change to pycurl that breaks something inside it. Anyway, I just decided to open a new issue and update it when I have new info. I thought that you can also have some ideas about this.
My plan is to run Grab tests on revisions from your repo and find that revision is a root of the problem.
UPD: Could you also please point me to some blog post or just write here about how pycurl development process is organized. Is this repo an official repo of the pycurl project? Why does it have so few watchers and stars? Thanks.
Running this code in 10 threads causes high (80-90%) CPU usage:
url = 'https://www.google.com/'
buf = BytesIO()
c = pycurl.Curl()
c.setopt(c.URL, url)
c.setopt(c.CONNECTTIMEOUT, 10)
c.setopt(c.TIMEOUT, 20)
c.setopt(c.WRITEFUNCTION, buf.write)
c.perform()
response = buf.getvalue()
buf.close()
This only happens with https urls, http urls are fetched just fine.
Am I missing a setting or is this an expected behaviour?
====================================================================== FAIL: test_multi_socket (tests.multi_socket_test.MultiSocketTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/travis/build/pycurl-devs/pycurl/tests/multi_socket_test.py", line 75, in test_multi_socket assert len(socket_events) >= 6 AssertionError
When callback functions are used (e.g. pycurl.M_SOCKETFUNCTION), the pycurl object increments the reference count on the function, but as far as I can tell the reference count is never decremented, even if the callback is set to a new value or the pycurl object is closed. This leaks memory if curl handles are created and destroyed often.
Sample code which reproduces this leak can be found at http://stackoverflow.com/questions/23802020/process-memory-grows-huge-tornado-curlasynchttpclient
When setting headers with the HTTPHEADER option, pycurl expects a list of unicode strings. When receiving headers with the HEADERFUNCTION option, it returns byte strings. This is currently the main obstacle to using Tornado with pycurl on python 3 (see the last couple of messages in tornadoweb/tornado#671. To run the tests yourself, clone tornado and run "python -m tornado.test.runtests").
I believe the best way to handle headers is to use the str
type in both python 2 and 3, so on python 3 the headers should be decoded as latin1 (gross, but that's what the spec says, and in practice they're always ascii anyway) before being passed to the HEADERFUNCTION. Alternately, I'd be OK with leaving things in bytes for HEADERFUNCTION as long as HTTPHEADER (and possibly other places) accepted bytes too.
Windows XP
Python 3,3
MSvC 2010
building exited wih error :
"Using curl directory: D:\pycurl\build\curl
running install
running build
running build_py
running build_ext
building 'pycurl' extension
C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /
W3 /GS- /DNDEBUG -DPYCURL_VERSION="7.19.0.2" -ID:\pycurl\build\curl\include -IC:
\Python33\include -IC:\Python33\include /Tcsrc\pycurl.c /Fobuild\temp.win32-3.3
Release\src\pycurl.obj -DCURL_STATICLIB -D_WIN32_WINNT=0x0501 -O2 -GF -WX
pycurl.c
src\pycurl.c(3795) : error C2275: 'PyObject' : illegal use of this type as an ex
pression
c:\python33\include\object.h(109) : see declaration of 'PyObject'
src\pycurl.c(3795) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3796) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3799) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3800) : warning C4047: '=' : 'int' differs in levels of indirection
from 'PyObject *'
src\pycurl.c(3802) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3802) : warning C4047: 'return' : 'PyObject *' differs in levels of
indirection from 'int'
src\pycurl.c(3816) : error C2275: 'PyObject' : illegal use of this type as an ex
pression
c:\python33\include\object.h(109) : see declaration of 'PyObject'
src\pycurl.c(3816) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3817) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3820) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3821) : warning C4047: '=' : 'int' differs in levels of indirection
from 'PyObject *'
src\pycurl.c(3823) : error C2065: 'v' : undeclared identifier
src\pycurl.c(3823) : warning C4047: 'return' : 'PyObject *' differs in levels of
indirection from 'int'
error: command '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' f
ailed with exit status 2"
fixed by :
at pycurl.c :-
line 3795 :
static PyObject *
do_multi_getattro(PyObject *o, PyObject *n)
{
assert_multi_state((CurlMultiObject *)o);
PyObject *v = PyObject_GenericGetAttr(o, n);
if( !v && PyErr_ExceptionMatches(PyExc_AttributeError) )
{
PyErr_Clear();
v = my_getattro(o, n, ((CurlMultiObject *)o)->dict,
curlmultiobject_constants, curlmultiobject_methods);
}
return v;
}
Declaration shoul be moved to the start of the function to be :
static PyObject *
do_multi_getattro(PyObject *o, PyObject *n)
{
PyObject *v = PyObject_GenericGetAttr(o, n);
assert_multi_state((CurlMultiObject *)o);
if( !v && PyErr_ExceptionMatches(PyExc_AttributeError) )
{
PyErr_Clear();
v = my_getattro(o, n, ((CurlMultiObject *)o)->dict,
curlmultiobject_constants, curlmultiobject_methods);
}
return v;
}
and in line 3816 also
But we need to figure it out at runtime if libcurl is dynamically linked?
Also add a line item to release checklist to check manifest.
If a build is performed with libcurl version X, and succeeds, and subsequently version is changed to Y and another build is requested, winbuild thinks that because the state files exist, that libcurl version Y is built and installed, whereas this is not the case.
Winbuild has to check the state file and the libcurl directory for existence.
When I try to install pycurl from pip I get the following output:
$ pip install pycurl==7.19.0.2
Downloading/unpacking pycurl==7.19.0.2
Downloading pycurl-7.19.0.2.tar.gz (89kB): 89kB downloaded
Running setup.py egg_info for package pycurl
Using curl-config (libcurl 7.33.0)
Installing collected packages: pycurl
Running setup.py install for pycurl
Using curl-config (libcurl 7.33.0)
building 'pycurl' extension
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.7 -c src/pycurl.c -o build/temp.linux-x86_64-2.7/src/pycurl.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-x86_64-2.7/src/pycurl.o -L/usr/lib -lcurl -lssh2 -lssl -lcrypto -lssl -lcrypto -lz -lpython2.7 -o build/lib.linux-x86_64-2.7/pycurl.so /usr/lib/libcurl.a -Wl,-O1,--sort-common,--as-needed,-z,relro
gcc: error: /usr/lib/libcurl.a: No such file or directory
error: command 'gcc' failed with exit status 1
Complete output from command /home/mcbride/src/venvs/vistar/bin/python2 -c "import setuptools;__file__='/home/mcbride/src/venvs/vistar/build/pycurl/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-pshi4T-record/install-record.txt --single-version-externally-managed --install-headers /home/mcbride/src/venvs/vistar/include/site/python2.7:
Using curl-config (libcurl 7.33.0)
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/curl
copying python/curl/__init__.py -> build/lib.linux-x86_64-2.7/curl
running build_ext
building 'pycurl' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -pthread -fno-strict-aliasing -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -DNDEBUG -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -fPIC -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_OPENSSL=1 -DHAVE_CURL_SSL=1 -I/usr/include/python2.7 -c src/pycurl.c -o build/temp.linux-x86_64-2.7/src/pycurl.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro build/temp.linux-x86_64-2.7/src/pycurl.o -L/usr/lib -lcurl -lssh2 -lssl -lcrypto -lssl -lcrypto -lz -lpython2.7 -o build/lib.linux-x86_64-2.7/pycurl.so /usr/lib/libcurl.a -Wl,-O1,--sort-common,--as-needed,-z,relro
gcc: error: /usr/lib/libcurl.a: No such file or directory
error: command 'gcc' failed with exit status 1
This is because setup.py used "curl-config --static-libs" without checking if curl is built shared. Heres a shell session:
$ curl-config --built-shared
yes
$ curl-config --static-libs
/usr/lib/libcurl.a -Wl,-O1,--sort-common,--as-needed,-z,relro -lssh2 -lssl -lcrypto -lssl -lcrypto -lz
$ ls /usr/lib/libcurl.a
ls: cannot access /usr/lib/libcurl.a: No such file or directory
>pip-3.3 install pycurl
Downloading/unpacking pycurl
Downloading pycurl-7.19.0.2.tar.gz (89kB): 89kB downloaded
Running setup.py egg_info for package pycurl
Using curl directory: c:\src\build\pycurl\curl-7.16.2.1
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\doctor\appdata\local\temp\pip_build_Doctor\pycurl\setup.py", line 69, in <module>
assert os.path.isdir(CURL_DIR), "please check CURL_DIR in setup.py"
AssertionError: please check CURL_DIR in setup.py
Complete output from command python setup.py egg_info:
Using curl directory: c:\src\build\pycurl\curl-7.16.2.1
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "c:\users\doctor\appdata\local\temp\pip_build_Doctor\pycurl\setup.py", line 69, in <module>
assert os.path.isdir(CURL_DIR), "please check CURL_DIR in setup.py"
AssertionError: please check CURL_DIR in setup.py
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\doctor\appdata\local\temp\pip_build_Doctor\pycurl
Storing complete log in C:\Users\Doctor\pip\pip.log
If i must download precompiled libs, where can i do that for Windows (x64)?
/home/pie/apps/pycurl/doc/pycurl.rst:36: WARNING: error while formatting arguments for pycurl.Curl: 'builtin_function_or_method' object has no attribute '__bases__' /home/pie/apps/pycurl/doc/pycurl.rst:38: WARNING: error while formatting arguments for pycurl.CurlMulti: 'builtin_function_or_method' object has no attribute '__bases__' /home/pie/apps/pycurl/doc/pycurl.rst:40: WARNING: error while formatting arguments for pycurl.CurlShare: 'builtin_function_or_method' object has no attribute '__bases__'
http://curl.haxx.se/mail/curlpython-2012-05/0007.html
This applies to many other references in multi.c.
Extract python 2.4 building code from test matrix, build python 2.4, then run tests against it.
Or precompile python 2.4
src/pycurl.c has a check that python >= 2.2, need to bump that to 2.4.
with Python 3.4.0;
running build_ext
/usr/lib64/python3.4/site-packages/nose/plugins/manager.py:395: RuntimeWarning: Unable to load plugin html-output = htmloutput.htmloutput:HtmlOutput: No module named 'version'
RuntimeWarning)
............S......................................................Traceback (most recent call last):
File "/usr/lib64/python3.4/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/lib64/python3.4/site-packages/bottle.py", line 1727, in wrapper
rv = callback(*a, **ka)
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/app.py", line 73, in files
files = [convert_file(key, bottle.request.files[key]) for key in bottle.request.files]
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/app.py", line 73, in <listcomp>
files = [convert_file(key, bottle.request.files[key]) for key in bottle.request.files]
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/app.py", line 60, in convert_file
'data': file.file.read().decode(),
ValueError: I/O operation on closed file.
F.Traceback (most recent call last):
File "/usr/lib64/python3.4/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/lib64/python3.4/site-packages/bottle.py", line 1727, in wrapper
rv = callback(*a, **ka)
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/app.py", line 73, in files
files = [convert_file(key, bottle.request.files[key]) for key in bottle.request.files]
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/app.py", line 73, in <listcomp>
files = [convert_file(key, bottle.request.files[key]) for key in bottle.request.files]
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/app.py", line 60, in convert_file
'data': file.file.read().decode(),
ValueError: read of closed file
F......................successUnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)
Traceback (most recent call last):
. File "/usr/lib64/python3.4/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 274, in write
self.send_headers()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 332, in send_headers
self.send_preamble()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 453, in _write
self.stdout.write(data)
File "/usr/lib64/python3.4/socket.py", line 391, in write
return self._sock.send(b)
BrokenPipeError: [Errno 32] Broken pipe
Traceback (most recent call last):
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 138, in run
self.finish_response()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 274, in write
self.send_headers()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 332, in send_headers
self.send_preamble()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 255, in send_preamble
('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1')
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 453, in _write
self.stdout.write(data)
File "/usr/lib64/python3.4/socket.py", line 391, in write
return self._sock.send(b)
BrokenPipeError: [Errno 32] Broken pipe
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 141, in run
self.handle_error()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 368, in handle_error
self.finish_response()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 180, in finish_response
self.write(data)
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 274, in write
self.send_headers()
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 331, in send_headers
if not self.origin_server or self.client_is_modern():
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 344, in client_is_modern
return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.4/socketserver.py", line 306, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib64/python3.4/socketserver.py", line 332, in process_request
self.finish_request(request, client_address)
File "/usr/lib64/python3.4/socketserver.py", line 345, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib64/python3.4/socketserver.py", line 666, in __init__
self.handle()
File "/usr/lib64/python3.4/wsgiref/simple_server.py", line 126, in handle
handler.run(self.server.get_app())
File "/usr/lib64/python3.4/wsgiref/handlers.py", line 144, in run
self.close()
File "/usr/lib64/python3.4/wsgiref/simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
AttributeError: 'NoneType' object has no attribute 'split'
...S.......................successpycurl.error: write callback must return int or None
.pycurl.error: write callback must return int or None
.......TypeError: string argument expected, got 'bytes'
.
======================================================================
FAIL: test_post_buffer (tests.post_test.PostTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/post_test.py", line 112, in test_post_buffer
self.check_post(send, expect, 'http://localhost:8380/files')
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/post_test.py", line 122, in check_post
self.assertEqual(200, self.curl.getinfo(pycurl.HTTP_CODE))
AssertionError: 200 != 500
===============================================================
FAIL: test_post_file (tests.post_test.PostTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/post_test.py", line 100, in test_post_file
self.check_post(send, expect, 'http://localhost:8380/files')
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python3_4/tests/post_test.py", line 122, in check_post
self.assertEqual(200, self.curl.getinfo(pycurl.HTTP_CODE))
AssertionError: 200 != 500
----------------------------------------------------------------------
Ran 127 tests in 27.442s
FAILED (SKIP=2, failures=2
The BrokenPipeError: [Errno 32] Broken pipe portion seems somewhat harmless. Now for py2.7; Python 2.7.6
running build_ext
.EE.........S.........S.......................................................................successUnicodeEncodeError: 'ascii' codec can't encode characters in position 0-11: ordinal not in range(128)
.Traceback (most recent call last):
File "/usr/lib64/python2.7/wsgiref/handlers.py", line 86, in run
self.finish_response()
File "/usr/lib64/python2.7/wsgiref/handlers.py", line 128, in finish_response
self.write(data)
File "/usr/lib64/python2.7/wsgiref/handlers.py", line 212, in write
self.send_headers()
File "/usr/lib64/python2.7/wsgiref/handlers.py", line 270, in send_headers
self.send_preamble()
File "/usr/lib64/python2.7/wsgiref/handlers.py", line 194, in send_preamble
'Date: %s\r\n' % format_date_time(time.time())
File "/usr/lib64/python2.7/socket.py", line 324, in write
self.flush()
File "/usr/lib64/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
Traceback (most recent call last):
File "/usr/lib64/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib64/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib64/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib64/python2.7/SocketServer.py", line 651, in __init__
self.finish()
File "/usr/lib64/python2.7/SocketServer.py", line 710, in finish
self.wfile.close()
File "/usr/lib64/python2.7/socket.py", line 279, in close
self.flush()
File "/usr/lib64/python2.7/socket.py", line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
...S.......................successpycurl.error: write callback must return int or None
.pycurl.error: write callback must return int or None
.....S.S
======================================================================
ERROR: test_request_with_certinfo (tests.certinfo_test.CertinfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python2_7/tests/util.py", line 81, in decorated
return fn(*args, **kwargs)
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python2_7/tests/util.py", line 99, in decorated
return fn(*args, **kwargs)
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python2_7/tests/certinfo_test.py", line 55, in test_request_with_certinfo
self.curl.perform()
error: (56, 'SSL read: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number, errno 0')
===============================================================
ERROR: test_request_without_certinfo (tests.certinfo_test.CertinfoTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python2_7/tests/util.py", line 81, in decorated
return fn(*args, **kwargs)
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python2_7/tests/util.py", line 99, in decorated
return fn(*args, **kwargs)
File "/mnt/gen2/TmpDir/portage/dev-python/pycurl-7.19.3.1/work/pycurl-7.19.3.1-python2_7/tests/certinfo_test.py", line 35, in test_request_without_certinfo
self.curl.perform()
error: (56, 'SSL read: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number, errno 0')
----------------------------------------------------------------------
Ran 129 tests in 34.645s
FAILED (SKIP=5, errors=2)
Makefile:18: recipe for target 'do-test' failed
make: *** [do-test] Error 1
Oh, this is pycurl-7.19.3.1.
Do you get this with those 2 pys?
>>> reload(pycurl) Assertion failed: (PyDict_GetItem(dict1, key) == NULL), function insobj2, file src/pycurl.c, line 3676.
For some reason on http://pycurl.sourceforge.net/ is displayed 7.19.3 as the version instead of 7.19.0.3, and because of that pip install pycurl fails.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.