Drop Python 2.7.

* Disable Linkchecker Test.
* Switch to unittest.mock in standard lib.
* Apply `pyupgrade --py3-plus`.
* Note: Using `builtins.open` mocks all calls to `open`, including test setup
(such as in `load_config`). Whereas, `path.to.namespace.open` only mocks
`open` in that namepsace. This all worked differently when we used `io.open`
as that wasn't a builtin to begin with. 
* Add a helpful error msg for PY2 users who use non-standard install methods.

Closes #1926.
This commit is contained in:
Waylan Limberg
2019-12-20 08:44:07 -05:00
committed by GitHub
parent a308bdc057
commit c9032bd6bf
46 changed files with 304 additions and 568 deletions

View File

@@ -1,7 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from setuptools import setup
import re
import os
@@ -64,7 +62,7 @@ setup(
'PyYAML>=3.10',
'tornado>=5.0'
],
python_requires='>=2.7.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*',
python_requires='>=3.4',
entry_points={
'console_scripts': [
'mkdocs = mkdocs.__main__:cli',
@@ -85,13 +83,12 @@ setup(
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3 :: Only',
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
'Topic :: Documentation',