1
0
mirror of https://github.com/pypiserver/pypiserver synced 2025-02-22 19:19:37 +01:00

upgrade bottle to 0.9.7

it contains a workaround for a bug in some versions of lib2to3, which
might break the installation of pypiserver on python 3.
This commit is contained in:
Ralf Schmitt 2011-11-23 22:15:24 +01:00
parent 9e53d3170d
commit 4cd4fa380e

@ -15,7 +15,7 @@ License: MIT (see LICENSE.txt for details)
from __future__ import with_statement
__author__ = 'Marcel Hellkamp'
__version__ = '0.9.6'
__version__ = '0.9.7'
__license__ = 'MIT'
import base64
@ -40,9 +40,14 @@ import warnings
from Cookie import SimpleCookie
from tempfile import TemporaryFile
from traceback import format_exc
from urllib import urlencode, quote as urlquote, unquote as urlunquote
from urlparse import urlunsplit, urljoin, SplitResult as UrlSplitResult
# Workaround for a bug in some versions of lib2to3 (fixed on CPython 2.7 and 3.2)
import urllib
urlencode = urllib.urlencode
urlquote = urllib.quote
urlunquote = urllib.unquote
try: from collections import MutableMapping as DictMixin
except ImportError: # pragma: no cover
from UserDict import DictMixin
@ -2289,7 +2294,7 @@ class SimpleTemplate(BaseTemplate):
ptrbuffer = [] # Buffer for printable strings and token tuple instances
codebuffer = [] # Buffer for generated python code
multiline = dedent = oneline = False
template = self.source if self.source else open(self.filename).read()
template = self.source or open(self.filename, 'rb').read()
def yield_tokens(line):
for i, part in enumerate(re.split(r'\{\{(.*?)\}\}', line)):