This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here is what you need to do to make uwsgi RPC and Python 3 play nice: | |
Patch the uwsgi master with this small change, notice changed s (which means Unicode in Python 3 and bytes in 2) to y (bytes) | |
--- a/plugins/python/uwsgi_pymodule.c | |
+++ b/plugins/python/uwsgi_pymodule.c | |
@@ -428,7 +428,7 @@ PyObject *py_uwsgi_register_rpc(PyObject * self, PyObject * args) { | |
char *name; | |
PyObject *func; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uwsgi | |
def hello_world(): | |
return "Hello World" | |
uwsgi.register_rpc("hello", hello_world) | |
print(uwsgi.rpc(None, "hello")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Timer] Timings: | |
[Timer] annotate --- 621.4 s | |
[Timer] rtype_lltype --- 179.6 s | |
[Timer] ========================================== | |
[Timer] Total: --- 801.0 s | |
[translation:info] Error: | |
[translation:info] File "/src/pypy/rpython/translator/goal/translate.py", line 318, in main | |
[translation:info] drv.proceed(goals) | |
[translation:info] File "/src/pypy/rpython/translator/driver.py", line 539, in proceed | |
[translation:info] return self._execute(goals, task_skip = self._maybe_skip()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[translation:info] self.processblock(graph, block) | |
[translation:info] File "/src/pypy/rpython/annotator/annrpython.py", line 342, in processblock | |
[translation:info] self.flowin(graph, block) | |
[translation:info] File "/src/pypy/rpython/annotator/annrpython.py", line 414, in flowin | |
[translation:info] self.consider_op(op) | |
[translation:info] File "/src/pypy/rpython/annotator/annrpython.py", line 588, in consider_op | |
[translation:info] resultcell = op.consider(self) | |
[translation:info] File "/src/pypy/rpython/flowspace/operation.py", line 104, in consider | |
[translation:info] return spec(annotator, *self.args) | |
[translation:info] File "/src/pypy/rpython/flowspace/operation.py", line 204, in specialized |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dynamic Section: | |
NEEDED libpypy-c.so | |
NEEDED libpthread.so.0 | |
NEEDED libc.so.6 | |
RPATH /opt/prefix/lib:$ORIGIN/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@a00fe1c2b870 testing_1]# ldd libpypy-c.so | |
linux-gate.so.1 => (0xf76f3000) | |
libdl.so.2 => /lib/libdl.so.2 (0xf3ddd000) | |
libbz2.so.1 => /usr/lib/libbz2.so.1 (0xf3dcc000) | |
libm.so.6 => /lib/libm.so.6 (0xf3da3000) | |
libz.so.1 => /lib/libz.so.1 (0xf3d90000) | |
libssl.so.1.0.0 => /opt/prefix/lib/libssl.so.1.0.0 (0xf3d21000) | |
libcrypto.so.1.0.0 => /opt/prefix/lib/libcrypto.so.1.0.0 (0xf3b2f000) | |
librt.so.1 => /lib/librt.so.1 (0xf3b26000) | |
libexpat.so.1 => /opt/prefix/lib/libexpat.so.1 (0xf3afc000) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[197f3] translation-task} | |
[Timer] Timings: | |
[Timer] annotate --- 1015.1 s | |
[Timer] =========================================== | |
[Timer] Total: --- 1015.1 s | |
[translation:info] Error: | |
[translation:info] File "/home/squeaky/workspace/portable-pypy/centos-i686/workspace/src/pypy/rpython/translator/goal/translate.py", line 316, in main | |
[translation:info] drv.proceed(goals) | |
[translation:info] File "/home/squeaky/workspace/portable-pypy/centos-i686/workspace/src/pypy/rpython/translator/driver.py", line 531, in proceed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
objdump -p libssl.so.1.0.1e | |
libssl.so.1.0.1e: file format elf64-x86-64 | |
Program Header: | |
LOAD off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**21 | |
filesz 0x000000000006135c memsz 0x000000000006135c flags r-x | |
LOAD off 0x0000000000061bd0 vaddr 0x0000000000261bd0 paddr 0x0000000000261bd0 align 2**21 | |
filesz 0x0000000000009760 memsz 0x0000000000009880 flags rw- | |
DYNAMIC off 0x0000000000064ca8 vaddr 0x0000000000264ca8 paddr 0x0000000000264ca8 align 2**3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
squeaky@squeaky-mbp ~/workspace/docker/trydocker ls -lha | |
total 8.0K | |
drwxrwxr-x. 2 squeaky squeaky 4.0K Jun 15 20:08 . | |
drwxrwxr-x. 10 squeaky squeaky 4.0K Jun 15 20:08 .. | |
squeaky@squeaky-mbp ~/workspace/docker/trydocker docker run --rm -t -i -v `pwd`/asd:/asd busybox /bin/sh | |
/ # ls -lha /asd | |
ls: can't open '/asd': Permission denied | |
total 0 | |
/ # % ✘ squeaky@squeaky-mbp ~/workspace/docker/trydocker ls -lha | |
total 12K |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function createScript ($document, callback, success) { | |
callback.done = true; | |
callback(); | |
}; | |