Hi Bruno (ccing pypy-dev)!
Bruno Gola wrote:
> After having some problems I finished PEP 328 and I'm starting to work
> on stdlib now.
>
> However, there is one test that's still failing and I can't fix it :(.
> It's in interpreter/test/test_nestedscope.py (lambda_in_genexpr), any
> hints?
No clue yet, will take a look.
> About the stdlib, do you have any suggestion about how/where to begin?
>
> I'm looking at http://docs.python.org/whatsnew/modules.html but it
…
[View More]> seems that most of the changes will not affect my work (as most of the
> modules are written in pure python).
>
> My plans initially are:
> - copy the stdlib from CPython 2.5.2
> - apply the changes from modified-2.4.1
Yes, exactly. You should add a new directory lib-python/2.5.2 and import
CPython's stdlib there. Then you need to carefully look at the changes
in modified-2.4.1 and check how they need to be applied to the relevant
2.5.2 module.
> - rewrite any new module written in C*
This one has a much lower priority than getting the pure-Python modules
to a sensible state.
> * well, taking a better look, it seems that the new modules are
> wsgiref, xml.etree package, hashlib (all in python), ctypes and
> sqlite3 (in C, but it seems too that there are some work already done
> on those two modules, am I right?).
sqlite3 and ctypes should be done already. Some work on hashlib was
started, afair. It is in the lib dir, I think?
> Of course tests are in my plan as well.
They'd better be :-). I guess part of the porting work should really be
to check that the stdlib tests keep passing, which is quite important
because they also check the other 2.5 features that you implemented.
> Sorry for not being online on IRC today while working, I'm behind a
> proxy and it isn't a friendly proxy :-)
You know that you can use other ports to connect to freenode? I think
even 8000 works, which most procies let through.
Cheers,
Carl Friedrich
[View Less]
Hi all,
I'm going to merge the "opt-option" branch; I'll write a blog post entry
when it's done. It removes the "--faassen" and "--allopts" options to
translate.py and adds instead the "--opt=#" option, which can also be
spelled "-O#", where "#" is one of 0, 1, size, mem, 2 or 3. Levels from
0 to 3 are trade-offs between the time+memory it takes to translate, and
the efficiency of the produced executable. Levels "size" and "mem" try
(or should try in the future) to minimize the executable …
[View More]size and the
runtime memory usage, respectively. The level is a global option of
translate.py but it also influences PyPy-specific options in
targetpypystandalone.py; for example, a bit arbitrarily, geninterp is
disabled with -O0. The specific config options enabled or disabled by
each level can depend on e.g. the selected backend; see the two
functions set_opt_level() and set_pypy_opt_level().
We have a number of open branches; does it make sense, in an effort to
reduce confusion, to apply this change to some of them too?
A bientot,
Armin
[View Less]
I checked out a copy of pypy today and upon trying to run "python
pypy-dist/pypy/bin/py.py" I get this error:
k@k-desktop:~$ python pypy-dist/pypy/bin/py.py
[cbuild:execute] cc -O3 -fomit-frame-pointer -pthread -c gcctest.c -o
gcctest.o
Traceback (most recent call last):
File "pypy-dist/pypy/bin/py.py", line 147, in <module>
sys.exit(main_(sys.argv))
File "pypy-dist/pypy/bin/py.py", line 64, in main_
space = option.make_objspace(config)
File "/home/k/pypy-dist/pypy/tool/…
[View More]option.py", line 48, in make_objspace
space = Space(config)
File "/home/k/pypy-dist/pypy/interpreter/baseobjspace.py", line 237, in
__init__
self.initialize()
File "/home/k/pypy-dist/pypy/objspace/std/objspace.py", line 71, in
initialize
self.model = StdTypeModel(self.config)
File "/home/k/pypy-dist/pypy/objspace/std/model.py", line 88, in __init__
import pypy.objspace.std.marshal_impl # install marshal multimethods
File "/home/k/pypy-dist/pypy/objspace/std/marshal_impl.py", line 21, in
<module>
from pypy.rlib.rstruct import ieee
File "/home/k/pypy-dist/pypy/rlib/rstruct/__init__.py", line 8, in
<module>
from pypy.rlib.rstruct.formatiterator import FormatIterator
File "/home/k/pypy-dist/pypy/rlib/rstruct/formatiterator.py", line 2, in
<module>
from pypy.rlib.rstruct.nativefmttable import native_is_bigendian
File "/home/k/pypy-dist/pypy/rlib/rstruct/nativefmttable.py", line 8, in
<module>
from pypy.rpython.tool import rffi_platform
File "/home/k/pypy-dist/pypy/rpython/tool/rffi_platform.py", line 5, in
<module>
from pypy.rpython.lltypesystem import rffi
File "/home/k/pypy-dist/pypy/rpython/lltypesystem/rffi.py", line 338, in
<module>
NUMBER_TYPES = setup()
File "/home/k/pypy-dist/pypy/rpython/lltypesystem/rffi.py", line 330, in
setup
tp = platform.inttype(name.upper(), c_name, signed)
File "/home/k/pypy-dist/pypy/rpython/tool/rfficache.py", line 49, in
inttype
bits = sizeof_c_type(c_name, **kwds) * 8
File "/home/k/pypy-dist/pypy/rpython/tool/rfficache.py", line 38, in
sizeof_c_type
return int(ask_gcc(question, **kwds))
File "/home/k/pypy-dist/pypy/rpython/tool/rfficache.py", line 34, in
ask_gcc
return build_executable_cache([c_file], eci)
File "/home/k/pypy-dist/pypy/tool/gcc_cache.py", line 23, in
build_executable_cache
result = py.process.cmdexec(build_executable(c_files, eci))
File "/home/k/pypy-dist/pypy/translator/tool/cbuild.py", line 621, in
build_executable
compiler.build(noerr=noerr)
File "/home/k/pypy-dist/pypy/translator/tool/cbuild.py", line 574, in
build
raise CompilationError(data)
pypy.translator.tool.cbuild.CompilationError: gcctest.c:3:20: error:
stdlib.h: No such file or directory
gcctest.c:4:23: error: sys/types.h: No such file or directory
gcctest.c: In function 'main':
gcctest.c:11: warning: incompatible implicit declaration of built-in
function 'printf'
gcctest.c:13:2: warning: no newline at end of file
command 'cc' failed with exit status 1
My gcc -v is this:
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
And my python version is this:
Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Can anyone suggest how I might fix this?
Thanks!
p.s. I know this is a pretty noob question, and I am not sure if a
development mailing list is the right place to post it, but right now it
seems like the only potential place I can find. Am I wrong in this
assumption, and is there another list dedicated to people trying to get into
pypy?
[View Less]
Hi.
I am writing a compiler called unPython (http://code.google.com/p/unpython)
a very young and immature compiler for compiling Python to C.
I am presenting the compiler at SciPy conference and need to write a paper
about it. Under related work, I want to describe PyPy and also the status of
NumPy support in PyPy.
Can someone comment on whats the status of NumPy support in PyPy?
Btw, unPython is a compiler I am writing for my Masters thesis. It compiles
Python to C code with particular focus …
[View More]on NumPy. In fact currently, not much
of Python is supported.
One particular focus of unPython is parallel computing .. in particular
OpenMP like parallel-for loops.
I will release a new (much better) version over the next 1-2 weeks and will
let people here know as well if its not considered spam :)
So if you want to try out the compiler, I would request you to wait 1-2
weeks.
thanks,
rahul
[View Less]