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

Merge py35

parents 591978a4 3cacfaad
......@@ -6,6 +6,7 @@ python:
- pypy
- 3.3
- 3.4
- 3.5
env:
- LINT=true
- LINT=false
......
......@@ -24,8 +24,9 @@ gevent is licensed under MIT license.
get gevent
==========
Install Python 2.6, 2.7, 3.3 or 3.4 along with the greenlet_
extension. Or install PyPy 2.6 or above (but not PyPy3).
Install Python 2.6, 2.7, 3.3 or 3.4 along with the greenlet_ extension
(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`_.
......
......@@ -9,6 +9,8 @@
- Fix a possible ``ValueError`` from ``gevent.queue.Queue:peek``.
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)
===================
......
......@@ -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
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/
.. _PyPy: http://pypy.org
.. _DevpollSelector: https://docs.python.org/3.5/whatsnew/3.5.html#selectors
PyPy Notes
----------
......
......@@ -2,7 +2,7 @@
"""gevent friendly implementations of builtin functions."""
from __future__ import absolute_import
import imp
import imp # deprecated since 3.4; issues PendingDeprecationWarning in 3.5
import sys
import gevent.lock
......
......@@ -41,6 +41,7 @@ from gevent.hub import InvalidSwitchError
__all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue', 'Channel']
def _safe_remove(deq, item):
# For when the item may have been removed by
# Queue._unlock
......@@ -49,6 +50,7 @@ def _safe_remove(deq, item):
except ValueError:
pass
class Queue(object):
"""
Create a queue object with a given maximum size.
......
......@@ -27,57 +27,80 @@ import subprocess as __subprocess__
# Standard functions and classes that this module re-implements in a gevent-aware way.
__implements__ = ['Popen',
'call',
'check_call',
'check_output']
__implements__ = [
'Popen',
'call',
'check_call',
'check_output',
]
if PY3:
__implements__.append("_posixsubprocess")
_posixsubprocess = None
# Standard functions and classes that this module re-imports.
__imports__ = ['PIPE',
'STDOUT',
'CalledProcessError',
# Windows:
'CREATE_NEW_CONSOLE',
'CREATE_NEW_PROCESS_GROUP',
'STD_INPUT_HANDLE',
'STD_OUTPUT_HANDLE',
'STD_ERROR_HANDLE',
'SW_HIDE',
'STARTF_USESTDHANDLES',
'STARTF_USESHOWWINDOW']
__extra__ = ['MAXFD',
'_eintr_retry_call',
'STARTUPINFO',
'pywintypes',
'list2cmdline',
'_subprocess',
# Python 2.5 does not have _subprocess, so we don't use it
# XXX We don't run on Py 2.5 anymore; can/could/should we use _subprocess?
'WAIT_OBJECT_0',
'WaitForSingleObject',
'GetExitCodeProcess',
'GetStdHandle',
'CreatePipe',
'DuplicateHandle',
'GetCurrentProcess',
'DUPLICATE_SAME_ACCESS',
'GetModuleFileName',
'GetVersion',
'CreateProcess',
'INFINITE',
'TerminateProcess']
__imports__ = [
'PIPE',
'STDOUT',
'CalledProcessError',
# Windows:
'CREATE_NEW_CONSOLE',
'CREATE_NEW_PROCESS_GROUP',
'STD_INPUT_HANDLE',
'STD_OUTPUT_HANDLE',
'STD_ERROR_HANDLE',
'SW_HIDE',
'STARTF_USESTDHANDLES',
'STARTF_USESHOWWINDOW',
]
__extra__ = [
'MAXFD',
'_eintr_retry_call',
'STARTUPINFO',
'pywintypes',
'list2cmdline',
'_subprocess',
# Python 2.5 does not have _subprocess, so we don't use it
# XXX We don't run on Py 2.5 anymore; can/could/should we use _subprocess?
'WAIT_OBJECT_0',
'WaitForSingleObject',
'GetExitCodeProcess',
'GetStdHandle',
'CreatePipe',
'DuplicateHandle',
'GetCurrentProcess',
'DUPLICATE_SAME_ACCESS',
'GetModuleFileName',
'GetVersion',
'CreateProcess',
'INFINITE',
'TerminateProcess',
]
if sys.version_info[:2] >= (3, 3):
__imports__ += ['DEVNULL',
'getstatusoutput',
'getoutput',
'TimeoutExpired']
__imports__ += [
'DEVNULL',
'getstatusoutput',
'getoutput',
'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__[:]:
try:
......
......@@ -9,6 +9,7 @@ import functools
__all__ = ['wrap_errors']
class wrap_errors(object):
"""
Helper to make function return an exception, rather than raise it.
......
[tox]
envlist =
py26,py27,pypy,py33,py34,lint
py26,py27,pypy,py33,py34,py35,lint
[testenv]
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