1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

Python 3.7 Support (#447)

* py3.7 fixes:
- add __repr__ to WBException for consistent output in py3.7
- don't raise StopIteration in generator, just return

* ci: add py3.7 builds to travis and appveyor, (don't include in integration test suite for now)
This commit is contained in:
Ilya Kreymer 2019-02-27 08:43:33 -08:00 committed by GitHub
parent 0fb1fa68a8
commit 259f571cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 3 deletions

View File

@ -4,6 +4,7 @@ python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"
dist: xenial
@ -44,4 +45,6 @@ matrix:
python: "2.7"
- env: WR_TEST=yes
python: "3.5"
- env: WR_TEST=yes
python: "3.7"

View File

@ -9,6 +9,9 @@ environment:
- PYTHON: "C:\\Python35-x64"
- PYTHON: "C:\\Python36"
- PYTHON: "C:\\Python36-x64"
- PYTHON: "C:\\Python37"
- PYTHON: "C:\\Python37-x64"
install:
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

View File

@ -7,6 +7,9 @@ class WbException(Exception):
self.msg = msg
self.url = url
def __repr__(self):
return "{0}('{1}',)".format(self.__class__.__name__, self.msg)
# Default Error Code
# def status(self):
# return '500 Internal Server Error'

View File

@ -214,9 +214,7 @@ class ZipNumIndexSource(BaseIndexSource):
reader.close()
if query.page_count:
yield self._page_info(0, pagesize, 0)
return
else:
raise
return
first = IDXObject(first_line)