From c01bc6eea50bcbbe012523d63e607b05d241f48d Mon Sep 17 00:00:00 2001 From: John Franey Date: Mon, 13 May 2019 17:30:29 -0400 Subject: [PATCH] Update Tox config and fix failing CI envs Updates Python version for flake8 and docs Tox envs from 2.7 to 3.7. Fixes a failing test and a linting error. --- .travis.yml | 4 ++-- pelican/server.py | 2 +- pelican/tests/test_readers.py | 14 +++++++------- tox.ini | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 31b3ac8b..dd8a1562 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ language: python python: - - "3.5" + - "3.6" env: - TOX_ENV=docs - TOX_ENV=flake8 - TOX_ENV=py27 - - TOX_ENV=py35 + - TOX_ENV=py37 matrix: include: - python: 3.6 diff --git a/pelican/server.py b/pelican/server.py index 82ad70cd..841b8e88 100644 --- a/pelican/server.py +++ b/pelican/server.py @@ -138,6 +138,6 @@ if __name__ == '__main__': args.port, args.server) try: httpd.serve_forever() - except KeyboardInterrupt as e: + except KeyboardInterrupt: logger.info("Shutting down server.") httpd.socket.close() diff --git a/pelican/tests/test_readers.py b/pelican/tests/test_readers.py index 12c231de..6acc0b30 100644 --- a/pelican/tests/test_readers.py +++ b/pelican/tests/test_readers.py @@ -485,20 +485,20 @@ class MdReaderTest(ReaderTest): _path('article_with_markdown_and_footnote.md')) expected_content = ( '

This is some content' - '1' ' with some footnotes' - '2

\n' + '2

\n' '
\n' - '
\n
    \n
  1. \n' + '
    \n
      \n
    1. \n' '

      Numbered footnote ' - '

      \n' - '
    2. \n
    3. \n' + '
    4. \n
    5. \n' '

      Named footnote ' - '

      \n' '
    6. \n
    \n
') expected_metadata = { diff --git a/tox.ini b/tox.ini index fc95ff91..b21b62eb 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ commands = - coveralls [testenv:docs] -basepython = python2.7 +basepython = python3.7 deps = -rrequirements/docs.pip changedir = docs @@ -34,7 +34,7 @@ application-import-names = pelican import-order-style = cryptography [testenv:flake8] -basepython = python2.7 +basepython = python3.7 deps = -rrequirements/style.pip commands =