Commit 2210a2fd authored by Jason Madden's avatar Jason Madden

Merge py35

parents 591978a4 3cacfaad
...@@ -6,6 +6,7 @@ python: ...@@ -6,6 +6,7 @@ python:
- pypy - pypy
- 3.3 - 3.3
- 3.4 - 3.4
- 3.5
env: env:
- LINT=true - LINT=true
- LINT=false - LINT=false
......
...@@ -24,8 +24,9 @@ gevent is licensed under MIT license. ...@@ -24,8 +24,9 @@ gevent is licensed under MIT license.
get gevent get gevent
========== ==========
Install Python 2.6, 2.7, 3.3 or 3.4 along with the greenlet_ Install Python 2.6, 2.7, 3.3 or 3.4 along with the greenlet_ extension
extension. Or install PyPy 2.6 or above (but not PyPy3). (Python 3.5 has preliminary support). Or install PyPy 2.6 or above
(but not PyPy3).
Download the latest release from `Python Package Index`_ or clone `the repository`_. Download the latest release from `Python Package Index`_ or clone `the repository`_.
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
- Fix a possible ``ValueError`` from ``gevent.queue.Queue:peek``. - Fix a possible ``ValueError`` from ``gevent.queue.Queue:peek``.
Reported in :issue:`647` by Kevin Chen. Reported in :issue:`647` by Kevin Chen.
- ``gevent.subprocess`` works under Python 3.5. In general, Python 3.5
has preliminary support. Reported in :issue:`653` by Squeaky.
1.1b4 (Sep 4, 2015) 1.1b4 (Sep 4, 2015)
=================== ===================
......
...@@ -18,8 +18,15 @@ Support for Python 2.5 was removed when support for Python 3 was ...@@ -18,8 +18,15 @@ Support for Python 2.5 was removed when support for Python 3 was
added. Any further releases in the 1.0.x line will maintain support added. Any further releases in the 1.0.x line will maintain support
for Python 2.5. for Python 2.5.
Python 3.5 has preliminary support, which means that gevent is
expected to generally run and function with the same level of support
as on Python 3.4, but new features and APIs introduced in 3.5 may not
be properly supported (e.g., `DevpollSelector`_) and due to the recent
arrival of Python 3.5, the level of testing it has received is lower.
.. _python.org: http://www.python.org/downloads/ .. _python.org: http://www.python.org/downloads/
.. _PyPy: http://pypy.org .. _PyPy: http://pypy.org
.. _DevpollSelector: https://docs.python.org/3.5/whatsnew/3.5.html#selectors
PyPy Notes PyPy Notes
---------- ----------
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"""gevent friendly implementations of builtin functions.""" """gevent friendly implementations of builtin functions."""
from __future__ import absolute_import from __future__ import absolute_import
import imp import imp # deprecated since 3.4; issues PendingDeprecationWarning in 3.5
import sys import sys
import gevent.lock import gevent.lock
......
...@@ -41,6 +41,7 @@ from gevent.hub import InvalidSwitchError ...@@ -41,6 +41,7 @@ from gevent.hub import InvalidSwitchError
__all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue', 'Channel'] __all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue', 'Channel']
def _safe_remove(deq, item): def _safe_remove(deq, item):
# For when the item may have been removed by # For when the item may have been removed by
# Queue._unlock # Queue._unlock
...@@ -49,6 +50,7 @@ def _safe_remove(deq, item): ...@@ -49,6 +50,7 @@ def _safe_remove(deq, item):
except ValueError: except ValueError:
pass pass
class Queue(object): class Queue(object):
""" """
Create a queue object with a given maximum size. Create a queue object with a given maximum size.
......
...@@ -27,17 +27,20 @@ import subprocess as __subprocess__ ...@@ -27,17 +27,20 @@ import subprocess as __subprocess__
# Standard functions and classes that this module re-implements in a gevent-aware way. # Standard functions and classes that this module re-implements in a gevent-aware way.
__implements__ = ['Popen', __implements__ = [
'Popen',
'call', 'call',
'check_call', 'check_call',
'check_output'] 'check_output',
]
if PY3: if PY3:
__implements__.append("_posixsubprocess") __implements__.append("_posixsubprocess")
_posixsubprocess = None _posixsubprocess = None
# Standard functions and classes that this module re-imports. # Standard functions and classes that this module re-imports.
__imports__ = ['PIPE', __imports__ = [
'PIPE',
'STDOUT', 'STDOUT',
'CalledProcessError', 'CalledProcessError',
# Windows: # Windows:
...@@ -48,10 +51,12 @@ __imports__ = ['PIPE', ...@@ -48,10 +51,12 @@ __imports__ = ['PIPE',
'STD_ERROR_HANDLE', 'STD_ERROR_HANDLE',
'SW_HIDE', 'SW_HIDE',
'STARTF_USESTDHANDLES', 'STARTF_USESTDHANDLES',
'STARTF_USESHOWWINDOW'] 'STARTF_USESHOWWINDOW',
]
__extra__ = ['MAXFD', __extra__ = [
'MAXFD',
'_eintr_retry_call', '_eintr_retry_call',
'STARTUPINFO', 'STARTUPINFO',
'pywintypes', 'pywintypes',
...@@ -71,13 +76,31 @@ __extra__ = ['MAXFD', ...@@ -71,13 +76,31 @@ __extra__ = ['MAXFD',
'GetVersion', 'GetVersion',
'CreateProcess', 'CreateProcess',
'INFINITE', 'INFINITE',
'TerminateProcess'] 'TerminateProcess',
]
if sys.version_info[:2] >= (3, 3): if sys.version_info[:2] >= (3, 3):
__imports__ += ['DEVNULL', __imports__ += [
'DEVNULL',
'getstatusoutput', 'getstatusoutput',
'getoutput', 'getoutput',
'TimeoutExpired'] 'SubprocessError',
'TimeoutExpired',
]
if sys.version_info[:2] >= (3, 5):
__imports__ += [
'run', # in 3.5, `run` is implemented in terms of `with Popen`
'CompletedProcess',
]
# Removed in Python 3.5; this is the exact code that was removed:
# https://hg.python.org/cpython/rev/f98b0a5e5ef5
__extra__.remove('MAXFD')
try:
MAXFD = os.sysconf("SC_OPEN_MAX")
except:
MAXFD = 256
for name in __imports__[:]: for name in __imports__[:]:
try: try:
......
...@@ -9,6 +9,7 @@ import functools ...@@ -9,6 +9,7 @@ import functools
__all__ = ['wrap_errors'] __all__ = ['wrap_errors']
class wrap_errors(object): class wrap_errors(object):
""" """
Helper to make function return an exception, rather than raise it. Helper to make function return an exception, rather than raise it.
......
[tox] [tox]
envlist = envlist =
py26,py27,pypy,py33,py34,lint py26,py27,pypy,py33,py34,py35,lint
[testenv] [testenv]
deps = deps =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment