Skip to content

Commit

Permalink
Support Python3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
housleyjk committed Sep 26, 2015
1 parent 4fe2425 commit 47d2b31
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ Changes

.. :changelog:
0.3.1 (201-01-31)
0.3.2 (2015-09-24)
------------------
- Support Python3.5

0.3.1 (2015-01-31)
-------------------
- Fix issues related to POST requests
- Fix issues related to coroutine mappers
- Sync with Gunicorn settings a la issue #917
Expand Down
9 changes: 4 additions & 5 deletions aiopyramid/traversal.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
"""
The aiopyramid.traversal module is deprecated, use aiopyramid.helpers.synchronize instead.
See http://aiopyramid.readthedocs.org/en/latest/features.html#traversal.
""" # noqa

import warnings
warnings.warn(__doc__, DeprecationWarning)

""" # NOQA

import asyncio
import warnings

from pyramid.traversal import (
ResourceTreeTraverser as TraverserBase,
Expand All @@ -22,6 +19,8 @@

SLASH = "/"

warnings.warn(__doc__, DeprecationWarning)


@synchronize
@asyncio.coroutine
Expand Down
6 changes: 3 additions & 3 deletions aiopyramid/tweens.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
http://aiopyramid.readthedocs.org/en/latest/features.html#tweens.
"""

import warnings
warnings.warn(__doc__, DeprecationWarning)

import asyncio
import warnings

from .helpers import synchronize

warnings.warn(__doc__, DeprecationWarning)


def coroutine_logger_tween_factory(handler, registry):
"""
Expand Down
5 changes: 4 additions & 1 deletion aiopyramid/websocket/config/gunicorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def __init__(self, environ, switch_protocols):
self.status_int = 101

http_1_1 = environ['SERVER_PROTOCOL'] == 'HTTP/1.1'
get_header = lambda k: environ['HTTP_' + k.upper().replace('-', '_')]

def get_header(k):
return environ['HTTP_' + k.upper().replace('-', '_')]

key = websockets.handshake.check_request(get_header)

if not http_1_1 or key is None:
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@

setup(
name='aiopyramid',
version='0.3.1',
version='0.3.2',
description='Tools for running pyramid using asyncio.',
long_description=README + '\n\n\n\n' + CHANGES,
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[tox]
envlist = py33,py34
envlist = py33,py34,py35

[testenv]
deps =
deps =
pytest
pytest-pep8
commands = py.test --pep8
Expand Down

0 comments on commit 47d2b31

Please sign in to comment.