Skip to content

Commit

Permalink
Windows: Use 32-bit distribution of python
Browse files Browse the repository at this point in the history
  • Loading branch information
user234683 committed Sep 15, 2018
1 parent 6ca20ff commit 4212164
Show file tree
Hide file tree
Showing 166 changed files with 175,623 additions and 44,695 deletions.
Binary file modified python/_asyncio.pyd
Binary file not shown.
Binary file not shown.
Binary file modified python/_bz2.pyd
Binary file not shown.
Binary file modified python/_ctypes.pyd
Binary file not shown.
Binary file modified python/_decimal.pyd
Binary file not shown.
Binary file modified python/_distutils_findvs.pyd
Binary file not shown.
Binary file modified python/_elementtree.pyd
Binary file not shown.
Binary file modified python/_hashlib.pyd
Binary file not shown.
Binary file modified python/_lzma.pyd
Binary file not shown.
Binary file modified python/_msi.pyd
Binary file not shown.
Binary file modified python/_multiprocessing.pyd
Binary file not shown.
Binary file modified python/_overlapped.pyd
Binary file not shown.
Binary file modified python/_socket.pyd
Binary file not shown.
Binary file modified python/_sqlite3.pyd
Binary file not shown.
Binary file modified python/_ssl.pyd
Binary file not shown.
Binary file not shown.
44 changes: 44 additions & 0 deletions python/gevent/__greenlet_primitives.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
cimport cython

# This file must not cimport anything from gevent.

cdef wref

cdef BlockingSwitchOutError


cdef extern from "greenlet/greenlet.h":

ctypedef class greenlet.greenlet [object PyGreenlet]:
pass

# These are actually macros and so much be included
# (defined) in each .pxd, as are the two functions
# that call them.
greenlet PyGreenlet_GetCurrent()
object PyGreenlet_Switch(greenlet self, void* args, void* kwargs)
void PyGreenlet_Import()

@cython.final
cdef inline greenlet getcurrent():
return PyGreenlet_GetCurrent()

cdef bint _greenlet_imported

cdef inline void greenlet_init():
global _greenlet_imported
if not _greenlet_imported:
PyGreenlet_Import()
_greenlet_imported = True

cdef inline object _greenlet_switch(greenlet self):
return PyGreenlet_Switch(self, NULL, NULL)

cdef class TrackedRawGreenlet(greenlet):
pass

cdef class SwitchOutGreenletWithLoop(TrackedRawGreenlet):
cdef public loop

cpdef switch(self)
cpdef switch_out(self)
Binary file added python/gevent/__hub_local.cp36-win32.pyd
Binary file not shown.
17 changes: 17 additions & 0 deletions python/gevent/__hub_local.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from gevent.__greenlet_primitives cimport SwitchOutGreenletWithLoop

cdef _threadlocal

cpdef get_hub_class()
cpdef SwitchOutGreenletWithLoop get_hub_if_exists()
cpdef set_hub(SwitchOutGreenletWithLoop hub)
cpdef get_loop()
cpdef set_loop(loop)

# We can't cdef this, it won't do varargs.
# cpdef WaitOperationsGreenlet get_hub(*args, **kwargs)

# XXX: TODO: Move the definition of TrackedRawGreenlet
# into a file that can be cython compiled so get_hub can
# return that.
cpdef SwitchOutGreenletWithLoop get_hub_noargs()
Binary file added python/gevent/__hub_primitives.cp36-win32.pyd
Binary file not shown.
69 changes: 69 additions & 0 deletions python/gevent/__hub_primitives.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
cimport cython

from gevent.__greenlet_primitives cimport SwitchOutGreenletWithLoop
from gevent.__hub_local cimport get_hub_noargs as get_hub

from gevent.__waiter cimport Waiter
from gevent.__waiter cimport MultipleWaiter

cdef InvalidSwitchError
cdef _waiter
cdef _greenlet_primitives
cdef traceback
cdef _timeout_error
cdef Timeout


cdef extern from "greenlet/greenlet.h":

ctypedef class greenlet.greenlet [object PyGreenlet]:
pass

# These are actually macros and so much be included
# (defined) in each .pxd, as are the two functions
# that call them.
greenlet PyGreenlet_GetCurrent()
void PyGreenlet_Import()

@cython.final
cdef inline greenlet getcurrent():
return PyGreenlet_GetCurrent()

cdef bint _greenlet_imported

cdef inline void greenlet_init():
global _greenlet_imported
if not _greenlet_imported:
PyGreenlet_Import()
_greenlet_imported = True


cdef class WaitOperationsGreenlet(SwitchOutGreenletWithLoop):

cpdef wait(self, watcher)
cpdef cancel_wait(self, watcher, error, close_watcher=*)
cpdef _cancel_wait(self, watcher, error, close_watcher)

cdef class _WaitIterator:
cdef SwitchOutGreenletWithLoop _hub
cdef MultipleWaiter _waiter
cdef _switch
cdef _timeout
cdef _objects
cdef _timer
cdef Py_ssize_t _count
cdef bint _begun



cdef _cleanup(self)

cpdef iwait_on_objects(objects, timeout=*, count=*)
cpdef wait_on_objects(objects=*, timeout=*, count=*)

cdef _primitive_wait(watcher, timeout, timeout_exc, WaitOperationsGreenlet hub)
cpdef wait_on_watcher(watcher, timeout=*, timeout_exc=*, WaitOperationsGreenlet hub=*)
cpdef wait_read(fileno, timeout=*, timeout_exc=*)
cpdef wait_write(fileno, timeout=*, timeout_exc=*, event=*)
cpdef wait_readwrite(fileno, timeout=*, timeout_exc=*, event=*)
cpdef wait_on_socket(socket, watcher, timeout_exc=*)
Binary file added python/gevent/__ident.cp36-win32.pyd
Binary file not shown.
26 changes: 26 additions & 0 deletions python/gevent/__ident.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cimport cython

cdef extern from "Python.h":

ctypedef class weakref.ref [object PyWeakReference]:
pass

cdef heappop
cdef heappush
cdef object WeakKeyDictionary
cdef type ref

@cython.internal
@cython.final
cdef class ValuedWeakRef(ref):
cdef object value

@cython.final
cdef class IdentRegistry:
cdef object _registry
cdef list _available_idents

@cython.final
cpdef object get_ident(self, obj)
@cython.final
cpdef _return_ident(self, ValuedWeakRef ref)
Binary file added python/gevent/__imap.cp36-win32.pyd
Binary file not shown.
45 changes: 45 additions & 0 deletions python/gevent/__imap.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
cimport cython
from gevent._greenlet cimport Greenlet
from gevent.__semaphore cimport Semaphore
from gevent._queue cimport UnboundQueue

@cython.freelist(100)
@cython.internal
@cython.final
cdef class Failure:
cdef readonly exc
cdef raise_exception

cdef inline _raise_exc(Failure failure)

cdef class IMapUnordered(Greenlet):
cdef bint _zipped
cdef func
cdef iterable
cdef spawn
cdef Semaphore _result_semaphore
cdef int _outstanding_tasks
cdef int _max_index

cdef readonly UnboundQueue queue
cdef readonly bint finished

cdef _inext(self)
cdef _ispawn(self, func, item, int item_index)

# Passed to greenlet.link
cpdef _on_result(self, greenlet)
# Called directly
cdef _on_finish(self, exception)

cdef _iqueue_value_for_success(self, greenlet)
cdef _iqueue_value_for_failure(self, greenlet)
cdef _iqueue_value_for_self_finished(self)
cdef _iqueue_value_for_self_failure(self, exception)

cdef class IMap(IMapUnordered):
cdef int index
cdef dict _results

@cython.locals(index=int)
cdef _inext(self)
94 changes: 68 additions & 26 deletions python/gevent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
to provide a high-level synchronous API on top of libev event loop.
See http://www.gevent.org/ for the documentation.
.. versionchanged:: 1.3a2
Add the `config` object.
"""

from __future__ import absolute_import
Expand All @@ -15,31 +18,43 @@

#: The programatic version identifier. The fields have (roughly) the
#: same meaning as :data:`sys.version_info`
#: Deprecated in 1.2.
version_info = _version_info(1, 2, 2, 'dev', 0)

#: The human-readable PEP 440 version identifier
__version__ = '1.2.2'


__all__ = ['get_hub',
'Greenlet',
'GreenletExit',
'spawn',
'spawn_later',
'spawn_raw',
'iwait',
'wait',
'killall',
'Timeout',
'with_timeout',
'getcurrent',
'sleep',
'idle',
'kill',
'signal',
'fork',
'reinit']
#: .. deprecated:: 1.2
#: Use ``pkg_resources.parse_version(__version__)`` (or the equivalent
#: ``packaging.version.Version(__version__)``).
version_info = _version_info(1, 3, 0, 'dev', 0)

#: The human-readable PEP 440 version identifier.
#: Use ``pkg_resources.parse_version(__version__)`` or
#: ``packaging.version.Version(__version__)`` to get a machine-usable
#: value.
__version__ = '1.3.6'


__all__ = [
'get_hub',
'Greenlet',
'GreenletExit',
'spawn',
'spawn_later',
'spawn_raw',
'iwait',
'wait',
'killall',
'Timeout',
'with_timeout',
'getcurrent',
'sleep',
'idle',
'kill',
'signal', # deprecated
'signal_handler',
'fork',
'reinit',
'getswitchinterval',
'setswitchinterval',
# Added in 1.3a2
'config',
]


import sys
Expand All @@ -48,11 +63,37 @@
import socket # pylint:disable=unused-import,useless-suppression
del socket

from gevent.hub import get_hub, iwait, wait
try:
# Floating point number, in number of seconds,
# like time.time
getswitchinterval = sys.getswitchinterval
setswitchinterval = sys.setswitchinterval
except AttributeError:
# Running on Python 2
_switchinterval = 0.005

def getswitchinterval():
return _switchinterval

def setswitchinterval(interval):
# Weed out None and non-numbers. This is not
# exactly exception compatible with the Python 3
# versions.
if interval > 0:
global _switchinterval
_switchinterval = interval

from gevent._config import config
from gevent._hub_local import get_hub
from gevent._hub_primitives import iwait_on_objects as iwait
from gevent._hub_primitives import wait_on_objects as wait

from gevent.greenlet import Greenlet, joinall, killall
joinall = joinall # export for pylint
spawn = Greenlet.spawn
spawn_later = Greenlet.spawn_later
#: The singleton configuration object for gevent.
config = config

from gevent.timeout import Timeout, with_timeout
from gevent.hub import getcurrent, GreenletExit, spawn_raw, sleep, idle, kill, reinit
Expand All @@ -66,6 +107,7 @@
# to treat 'from gevent import signal' as a callable, to matter whether
# the 'gevent.signal' module has been imported first
from gevent.hub import signal as _signal_class
signal_handler = _signal_class
from gevent import signal as _signal_module

# The object 'gevent.signal' must:
Expand Down
Binary file added python/gevent/__semaphore.cp36-win32.pyd
Binary file not shown.
33 changes: 32 additions & 1 deletion python/gevent/_semaphore.pxd → python/gevent/__semaphore.pxd
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
cimport cython

from gevent.__hub_local cimport get_hub_noargs as get_hub
cdef Timeout

cdef bint _greenlet_imported

cdef extern from "greenlet/greenlet.h":

ctypedef class greenlet.greenlet [object PyGreenlet]:
pass

# These are actually macros and so much be included
# (defined) in each .pxd, as are the two functions
# that call them.
greenlet PyGreenlet_GetCurrent()
void PyGreenlet_Import()

cdef inline greenlet getcurrent():
return PyGreenlet_GetCurrent()

cdef inline void greenlet_init():
global _greenlet_imported
if not _greenlet_imported:
PyGreenlet_Import()
_greenlet_imported = True


cdef void _init()


cdef class Semaphore:
cdef public int counter
cdef readonly object _links
cdef readonly list _links
cdef readonly object _notifier
cdef public int _dirty
cdef object __weakref__
Expand Down
Binary file added python/gevent/__tracer.cp36-win32.pyd
Binary file not shown.
Loading

0 comments on commit 4212164

Please sign in to comment.