summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/lib/bottle.py4
-rw-r--r--module/web/json_app.py14
-rw-r--r--module/web/pyload_app.py6
-rw-r--r--pavement.py3
4 files changed, 9 insertions, 18 deletions
diff --git a/module/lib/bottle.py b/module/lib/bottle.py
index f8624bf13..2c243278e 100644
--- a/module/lib/bottle.py
+++ b/module/lib/bottle.py
@@ -91,10 +91,6 @@ except ImportError: # pragma: no cover
py3k = sys.version_info >= (3,0,0)
NCTextIOWrapper = None
-if sys.version_info < (2,6,0):
- msg = "Python 2.5 support may be dropped in future versions of Bottle."
- warnings.warn(msg, DeprecationWarning)
-
if py3k: # pragma: no cover
json_loads = lambda s: json_lds(touni(s))
# See Request.POST
diff --git a/module/web/json_app.py b/module/web/json_app.py
index 43465770a..2d0f56357 100644
--- a/module/web/json_app.py
+++ b/module/web/json_app.py
@@ -1,14 +1,11 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import os
-import os.path
from os.path import join
from traceback import print_exc
-import shutil
from shutil import copyfileobj
-from bottle import route, request, HTTPError, validate
+from bottle import route, request, HTTPError
from webinterface import PYLOAD
@@ -86,8 +83,7 @@ def packages():
return HTTPError()
-@route("/json/package/:id")
-@validate(id=int)
+@route("/json/package/<id:int>")
@login_required('LIST')
def package(id):
try:
@@ -133,8 +129,7 @@ def package_order(ids):
return HTTPError()
-@route("/json/abort_link/:id")
-@validate(id=int)
+@route("/json/abort_link/<id:int>")
@login_required('DELETE')
def abort_link(id):
try:
@@ -191,8 +186,7 @@ def add_package():
PYLOAD.setPackageData(pack, data)
-@route("/json/move_package/:dest/:id")
-@validate(dest=int, id=int)
+@route("/json/move_package/<dest:int/<id:int>")
@login_required('MODIFY')
def move_package(dest, id):
try:
diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py
index 9612e495e..df4a4b3d4 100644
--- a/module/web/pyload_app.py
+++ b/module/web/pyload_app.py
@@ -83,7 +83,7 @@ def error500(error):
error.traceback.replace("\n", "<br>") if error.traceback else "No Traceback"])
# render js
-@route("/media/js/:path#.+\.js#")
+@route("/media/js/<path:re:.+\.js>")
def js_dynamic(path):
response.headers['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT",
time.gmtime(time.time() + 60 * 60 * 24 * 2))
@@ -100,7 +100,7 @@ def js_dynamic(path):
except:
return HTTPError(404, "Not Found")
-@route('/media/:path#.+#')
+@route('/media/<path:path>')
def server_static(path):
response.headers['Expires'] = time.strftime("%a, %d %b %Y %H:%M:%S GMT",
time.gmtime(time.time() + 60 * 60 * 24 * 7))
@@ -220,7 +220,7 @@ def downloads():
return render_to_response('downloads.html', {'files': data}, [pre_processor])
-@route("/downloads/get/:path#.+#")
+@route("/downloads/get/<path:re:.+>")
@login_required("DOWNLOAD")
def get_download(path):
path = unquote(path).decode("utf8")
diff --git a/pavement.py b/pavement.py
index 7f956e78d..618617ef0 100644
--- a/pavement.py
+++ b/pavement.py
@@ -37,7 +37,8 @@ setup(
#data_files=[],
include_package_data=True,
exclude_package_data={'pyload': ['docs*', 'scripts*']}, #exluced from build but not from sdist
- install_requires=['thrift >= 0.8.0', 'jinja2', 'pycurl', 'Beaker', 'bottle >= 0.10.0', 'BeautifulSoup>=3.2, <3.3'] + extradeps,
+ # 'bottle >= 0.10.0' not in list, because its small and contain little modifications
+ install_requires=['thrift >= 0.8.0', 'jinja2', 'pycurl', 'Beaker', 'BeautifulSoup>=3.2, <3.3'] + extradeps,
extras_require={
'SSL': ["pyOpenSSL"],
'DLC': ['pycrypto'],