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:
parent
0fb1fa68a8
commit
259f571cb9
@ -4,6 +4,7 @@ python:
|
|||||||
- "2.7"
|
- "2.7"
|
||||||
- "3.5"
|
- "3.5"
|
||||||
- "3.6"
|
- "3.6"
|
||||||
|
- "3.7"
|
||||||
|
|
||||||
dist: xenial
|
dist: xenial
|
||||||
|
|
||||||
@ -44,4 +45,6 @@ matrix:
|
|||||||
python: "2.7"
|
python: "2.7"
|
||||||
- env: WR_TEST=yes
|
- env: WR_TEST=yes
|
||||||
python: "3.5"
|
python: "3.5"
|
||||||
|
- env: WR_TEST=yes
|
||||||
|
python: "3.7"
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ environment:
|
|||||||
- PYTHON: "C:\\Python35-x64"
|
- PYTHON: "C:\\Python35-x64"
|
||||||
- PYTHON: "C:\\Python36"
|
- PYTHON: "C:\\Python36"
|
||||||
- PYTHON: "C:\\Python36-x64"
|
- PYTHON: "C:\\Python36-x64"
|
||||||
|
- PYTHON: "C:\\Python37"
|
||||||
|
- PYTHON: "C:\\Python37-x64"
|
||||||
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
|
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
|
||||||
|
@ -7,6 +7,9 @@ class WbException(Exception):
|
|||||||
self.msg = msg
|
self.msg = msg
|
||||||
self.url = url
|
self.url = url
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return "{0}('{1}',)".format(self.__class__.__name__, self.msg)
|
||||||
|
|
||||||
# Default Error Code
|
# Default Error Code
|
||||||
# def status(self):
|
# def status(self):
|
||||||
# return '500 Internal Server Error'
|
# return '500 Internal Server Error'
|
||||||
|
@ -214,9 +214,7 @@ class ZipNumIndexSource(BaseIndexSource):
|
|||||||
reader.close()
|
reader.close()
|
||||||
if query.page_count:
|
if query.page_count:
|
||||||
yield self._page_info(0, pagesize, 0)
|
yield self._page_info(0, pagesize, 0)
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
raise
|
|
||||||
|
|
||||||
first = IDXObject(first_line)
|
first = IDXObject(first_line)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user