Drop support for EOL Python 3.3
This commit is contained in:
parent
91edcffdf2
commit
a8b7efc776
|
@ -32,9 +32,9 @@ with *scp*.
|
|||
|
||||
Quickstart: Installation and Usage
|
||||
==================================
|
||||
*pypiserver* ``> 1.2.x`` works with python ``2.7`` and ``3.3+`` or *pypy*.
|
||||
Older python-versions may still work, but they are not tested.
|
||||
For legacy python versions, use ``pypiserver-1.1.x`` series.
|
||||
*pypiserver* ``> 1.2.x`` works with Python ``2.7`` and ``3.4+`` or *pypy*.
|
||||
Older Python versions may still work, but they are not tested.
|
||||
For legacy Python versions, use ``pypiserver-1.1.x`` series.
|
||||
|
||||
.. Tip::
|
||||
The commands below work on a unix-like operating system with a posix shell.
|
||||
|
|
|
@ -17,7 +17,6 @@ import warnings
|
|||
import functools as ft
|
||||
|
||||
|
||||
warnings.filterwarnings("ignore", "Python 2.5 support may be dropped in future versions of Bottle")
|
||||
log = logging.getLogger('pypiserver.main')
|
||||
|
||||
|
||||
|
|
|
@ -89,17 +89,15 @@ except ImportError: # pragma: no cover
|
|||
|
||||
def json_dumps(data):
|
||||
raise ImportError(
|
||||
"JSON support requires Python 2.6 or simplejson.")
|
||||
"JSON support requires simplejson.")
|
||||
|
||||
json_lds = json_dumps
|
||||
|
||||
# We now try to fix 2.5/2.6/3.1/3.2 incompatibilities.
|
||||
# We now try to fix 2.x/3.x incompatibilities.
|
||||
# It ain't pretty but it works... Sorry for the mess.
|
||||
|
||||
py = sys.version_info
|
||||
py3k = py >= (3, 0, 0)
|
||||
py25 = py < (2, 6, 0)
|
||||
py31 = (3, 1, 0) <= py < (3, 2, 0)
|
||||
|
||||
# Workaround for the missing "as" keyword in py3k.
|
||||
def _e():
|
||||
|
@ -144,17 +142,7 @@ else: # 2.x
|
|||
from StringIO import StringIO as BytesIO
|
||||
from ConfigParser import SafeConfigParser as ConfigParser, \
|
||||
Error as ConfigParserError
|
||||
if py25:
|
||||
msg = "Python 2.5 support may be dropped in future versions of Bottle."
|
||||
warnings.warn(msg, DeprecationWarning)
|
||||
from UserDict import DictMixin
|
||||
|
||||
def next(it):
|
||||
return it.next()
|
||||
|
||||
bytes = str
|
||||
else: # 2.6, 2.7
|
||||
from collections import MutableMapping as DictMixin
|
||||
from collections import MutableMapping as DictMixin
|
||||
unicode = unicode
|
||||
json_loads = json_lds
|
||||
eval(compile('def _raise(*a): raise a[0], a[1], a[2]', '<py3fix>', 'exec'))
|
||||
|
@ -174,15 +162,6 @@ def touni(s, enc='utf8', err='strict'):
|
|||
|
||||
tonat = touni if py3k else tob
|
||||
|
||||
# 3.2 fixes cgi.FieldStorage to accept bytes (which makes a lot of sense).
|
||||
# 3.1 needs a workaround.
|
||||
if py31:
|
||||
from io import TextIOWrapper
|
||||
|
||||
class NCTextIOWrapper(TextIOWrapper):
|
||||
def close(self):
|
||||
pass # Keep wrapped buffer open.
|
||||
|
||||
|
||||
# A bug in functools causes it to break if the wrapper is an instance method
|
||||
def update_wrapper(wrapper, wrapped, *a, **ka):
|
||||
|
@ -1295,11 +1274,7 @@ class BaseRequest(object):
|
|||
for key in ('REQUEST_METHOD', 'CONTENT_TYPE', 'CONTENT_LENGTH'):
|
||||
if key in self.environ: safe_env[key] = self.environ[key]
|
||||
args = dict(fp=self.body, environ=safe_env, keep_blank_values=True)
|
||||
if py31:
|
||||
args['fp'] = NCTextIOWrapper(args['fp'],
|
||||
encoding='utf8',
|
||||
newline='\n')
|
||||
elif py3k:
|
||||
if py3k:
|
||||
args['encoding'] = 'utf8'
|
||||
data = cgi.FieldStorage(**args)
|
||||
self['_cgi.FieldStorage'] = data #http://bugs.python.org/issue18394
|
||||
|
@ -1696,7 +1671,7 @@ class BaseResponse(object):
|
|||
:param path: limits the cookie to a given path (default: current path)
|
||||
:param secure: limit the cookie to HTTPS connections (default: off).
|
||||
:param httponly: prevents client-side javascript to read this cookie
|
||||
(default: off, requires Python 2.6 or newer).
|
||||
(default: off).
|
||||
|
||||
If neither `expires` nor `max_age` is set (default), the cookie will
|
||||
expire at the end of the browser session (as soon as the browser
|
||||
|
|
|
@ -7,14 +7,13 @@
|
|||
|
||||
docopt # For `/bin/bumpver.py`.
|
||||
gevent>=1.1b4; python_version >= '3'
|
||||
mock; python_version <= '3.2'
|
||||
mock; python_version == '2.7'
|
||||
pip>=7
|
||||
passlib>=1.6
|
||||
pytest>=2.3; python_version != '3.3'
|
||||
pytest>=2.3,<3.3; python_version == '3.3'
|
||||
pytest>=2.3
|
||||
setuptools
|
||||
setuptools-git>=0.3
|
||||
tox
|
||||
twine>=1.7
|
||||
webtest; python_version != '2.5'
|
||||
wheel>=0.25.0
|
||||
webtest
|
||||
wheel>=0.25.0
|
5
setup.py
5
setup.py
|
@ -11,7 +11,7 @@ else:
|
|||
|
||||
tests_require = ['pytest>=2.3', 'tox', 'twine', 'pip>=7',
|
||||
'passlib>=1.6', 'webtest']
|
||||
if sys.version_info <= (3, 2):
|
||||
if sys.version_info == (2, 7):
|
||||
tests_require.append('mock')
|
||||
|
||||
setup_requires = ['setuptools', 'setuptools-git >= 0.3']
|
||||
|
@ -36,6 +36,7 @@ setup(name="pypiserver",
|
|||
version=get_version(),
|
||||
packages=["pypiserver"],
|
||||
package_data={'pypiserver': ['welcome.html']},
|
||||
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
|
||||
setup_requires=setup_requires,
|
||||
extras_require={
|
||||
'passlib': ['passlib>=1.6'],
|
||||
|
@ -60,10 +61,10 @@ setup(name="pypiserver",
|
|||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.3",
|
||||
"Programming Language :: Python :: 3.4",
|
||||
"Programming Language :: Python :: 3.5",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: Python :: Implementation :: PyPy",
|
||||
"Topic :: Software Development :: Build Tools",
|
||||
"Topic :: System :: Software Distribution"],
|
||||
|
|
Loading…
Reference in New Issue