Michael Merickel
2016-01-07 7d9b5f07d5d310b5e0ce645796cd159e30d8a1c7
Merge pull request #2210 from Pylons/bugfix/1.5-on-py3.5

Bugfix: Pyramid 1.5 on Python 3.5
6 files modified
58 ■■■■ changed files
.travis.yml 38 ●●●● patch | view | raw | blame | history
pyramid/compat.py 5 ●●●●● patch | view | raw | blame | history
pyramid/config/util.py 3 ●●●● patch | view | raw | blame | history
pyramid/util.py 9 ●●●● patch | view | raw | blame | history
setup.py 1 ●●●● patch | view | raw | blame | history
tox.ini 2 ●●● patch | view | raw | blame | history
.travis.yml
@@ -1,19 +1,37 @@
# Wire up travis
language: python
sudo: false
python:
  - 2.6
  - 2.7
  - pypy
  - 3.2
  - 3.3
  - 3.4
  - pypy3
matrix:
    include:
        - python: 2.6
          env: TOXENV=py26
        - python: 2.7
          env: TOXENV=py27
        - python: 3.2
          env: TOXENV=py32
        - python: 3.3
          env: TOXENV=py33
        - python: 3.4
          env: TOXENV=py34
        - python: 3.5
          env: TOXENV=py35
        - python: pypy
          env: TOXENV=pypy
        - python: pypy3
          env: TOXENV=pypy3
        - python: 2.6
          env: TOXENV=cover
install: python setup.py dev
install:
  - travis_retry pip install tox
script: python setup.py test -q
script:
  - travis_retry tox
notifications:
  email:
    - pyramid-checkins@lists.repoze.org
  irc:
    channels:
      - "chat.freenode.net#pyramid"
pyramid/compat.py
@@ -244,3 +244,8 @@
def is_bound_method(ob):
    return inspect.ismethod(ob) and getattr(ob, im_self, None) is not None
# support annotations and keyword-only arguments in PY3
if PY3:
    from inspect import getfullargspec as getargspec
else:
    from inspect import getargspec
pyramid/config/util.py
@@ -3,6 +3,7 @@
from pyramid.compat import (
    bytes_,
    getargspec,
    is_nonstr_iter,
    )
@@ -201,7 +202,7 @@
            return False
    try:
        argspec = inspect.getargspec(fn)
        argspec = getargspec(fn)
    except TypeError:
        return False
pyramid/util.py
@@ -519,7 +519,14 @@
            info = ActionInfo(*info)
        if info is None:
            try:
                f = traceback.extract_stack(limit=3)
                f = traceback.extract_stack(limit=4)
                # Work around a Python 3.5 issue whereby it would insert an
                # extra stack frame. This should no longer be necessary in
                # Python 3.5.1
                last_frame = ActionInfo(*f[-1])
                if last_frame.function == 'extract_stack': # pragma: no cover
                    f.pop()
                info = ActionInfo(*f[-backframes])
            except: # pragma: no cover
                info = ActionInfo(None, 0, '', '')
setup.py
@@ -83,6 +83,7 @@
        "Programming Language :: Python :: 3.2",
        "Programming Language :: Python :: 3.3",
        "Programming Language :: Python :: 3.4",
        "Programming Language :: Python :: 3.5",
        "Programming Language :: Python :: Implementation :: CPython",
        "Programming Language :: Python :: Implementation :: PyPy",
        "Framework :: Pyramid",
tox.ini
@@ -1,6 +1,6 @@
[tox]
envlist = 
    py26,py27,py32,py33,py34,pypy,cover
    py26,py27,py32,py33,py34,py35,pypy,pypy3,cover
[testenv]
commands =