gevent-1.0a1 tarball and windows builds are now available for download
at http://code.google.com/p/gevent/downloads/list
Read the changelog here:
https://bitbucket.org/denis/gevent/src/tip/changelog.rst#cl-1
Please try it out and report any issues you have. Be sure to take a
look at the list of backward-incompatible changes.
If you use gevent in a commercial environment, I encourage you to make
a donation to support the development: http://gevent.org/sfc.html
Cheers,
Denis.
the 1.0 alpha includes all c library dependencies, no prior installation needed, it should work fine on freebsd afaics.
the changelog looks awesome! i'm looking forward to trying out some of the new thread features for disk i/o worker pools.
cheers,
Kapil
Get 1.0a2 from http://code.google.com/p/gevent/downloads/list
I just noted, that previously it was possible to have
JoinableQueue(0), now we don't have an alternative for that.
Also, in all versions of gevent join()/task_done() are not available
on PriorityQueue/LifoQueue.
Maybe task_done()/join() should be put directly on Queue and Channel?
JoinableQueue then becomes an alias for Queue.
On Wed, Aug 3, 2011 at 7:25 AM, Equand <equ...@gmail.com> wrote:
> Woahaaaa...
> Congratulations!
> 0.13.6 is still in pypi...
> also how will it work with setuptools easy_install under freebsd
it's alpha so it does not belong on PyPI.
> will it work right, or like previously I'll have to compile libev,
> cares and compile gevent to get the paths on FreeBSD?
no, just unpack the tarball and do "python setup.py build"
No, tarball is bitbucket repo + generated C extensions.
In order to generate those you need unifdef, cython, m4, all recent versions.
Makefile is indeed renamed to Makefile.ext in tarball so that setup.py
won't try to run it.
> I installed GNU m4 with --prefix=/usr and re ran the setup build.
> It broke with util/cython_ifdef.py:No such file or directory
> which is weird because that file is right there.
cython_ifdef.py contains the shebang
#!/usr/bin/python
which you don't have. I think it should be changed to
#!/usr/bin/env python
----
cheers,
ralf
I suppose this will also help:
https://bitbucket.org/denis/gevent/changeset/31ae9ffab85f
I don't want to have complicated m4 templates, but we can get rid of
m4 altogether
and use some small Python template engine that we could just put in
util/ as a single file.
> 2.
> Eliminate -o for unifdef in util/cython_ifdef.py by using a redirect.
> This worked for me:
> Instead of: system_unifdef('unifdef -t -b %s -o %s %s' % (key,
> options.sourcefile, tmpname))
> Use: system_unifdef('unifdef -t -b %s %s > %s' % (key, tmpname,
> options.sourcefile))
OK, pushed this.
> 3.
> I guess Ralf's env shebang for cython_ifdef.py would harm no one if it
> was in the standard build?
> Instead of: #!/usr/bin/python
> Use: #!/usr/bin/env python
>
> I presume Commit 31ae9ffab85f in Makefile 'python util/
> cython_ifdef.py' would work too,
> but it's not there in the repo now though.
It's in the repo:
https://bitbucket.org/denis/gevent/src/bc7be40cf648/Makefile#cl-10
> I guess could also use sys.exec_prefix to determine the python path,
> and pass it into Makefile somehow.
There's no need for that. It does not matter which Python version you
run cython_ifdef.py script with.
> This would enable people like me with multiple python versions to say
> python2.7 setup.py build.
You can do that now, no changes necessary.
>
>> This would enable people like me with multiple python versions to say
>> python2.7 setup.py build.
>
> You can do that now, no changes necessary.
One still needs a python executable in PATH for this to
work. archlinux's python is python 3. util/cython_ifdef.py won't work
with that one. Some of the BSDs don't even ship with a python executable
(it's called python2.x). The current Makefile won't work for them.
The attached patch would solve these issues. However trying it with
python 2.5 I get another error:
,----
| /usr/local/bin/python2.5 util/cython_ifdef.py -o gevent.core.c gevent/core.pyx
| gevent/core.pyx: found symbols: EV_STANDALONE, _WIN32
| Traceback (most recent call last):
| File "util/cython_ifdef.py", line 412, in <module>
| main()
| File "util/cython_ifdef.py", line 397, in main
| for key in iter_configurations(symbols):
| File "util/cython_ifdef.py", line 272, in iter_configurations
| config = _bin(x, size)
| File "util/cython_ifdef.py", line 265, in _bin
| result = bin(number)[2:]
| NameError: global name 'bin' is not defined
| make: *** [gevent/gevent.core.c] Error 1
`----
----
Cheers,
Ralf
The "-b" option was kind of important in order to generate nicer
(smaller) .c source.
Regardless, I've committed a better preprocessor script that no longer
needs unifdef. While I'm here I've also made it evaluate #defines, so
m4 is not used as well.
Here's the new script:
https://bitbucket.org/denis/gevent/src/44fbda89a33a/util/cythonpp.py
And here's how the source now looks like:
https://bitbucket.org/denis/gevent/src/44fbda89a33a/gevent/core.ppyx
Let me know if it works for you and if you spot any bugs.
>
> Regardless, I've committed a better preprocessor script that no longer
> needs unifdef. While I'm here I've also made it evaluate #defines, so
> m4 is not used as well.
nice!
>
> Here's the new script:
> https://bitbucket.org/denis/gevent/src/44fbda89a33a/util/cythonpp.py
> And here's how the source now looks like:
> https://bitbucket.org/denis/gevent/src/44fbda89a33a/gevent/core.ppyx
>
> Let me know if it works for you and if you spot any bugs.
building with 2.5 doesn't work, since python 2.5 doesn't have
itertools.product:
,----
| /usr/bin/python2.5 util/cythonpp.py -o gevent.core.c gevent/core.ppyx
| Traceback (most recent call last):
| File "util/cythonpp.py", line 677, in <module>
| process_filename(filename, options.output_file)
| File "util/cythonpp.py", line 56, in process_filename
| for configuration in get_configurations(filename):
| File "util/cythonpp.py", line 584, in get_configurations
| for configuration in get_selections(conditions):
| File "util/cythonpp.py", line 566, in get_selections
| return set([flat_tuple(sorted(set(x))) for x in itertools.product(items, repeat=len(items))])
| AttributeError: 'module' object has no attribute 'product'
`----
--
Cheers
Ralf