Skip to content

Commit

Permalink
drop support for Python 2 and 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Apr 14, 2020
1 parent 64048c1 commit e085f3e
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 131 deletions.
48 changes: 13 additions & 35 deletions .azure-pipelines.yaml
@@ -1,41 +1,33 @@
trigger:
- master
- "*.x"
- '*.x'

variables:
vmImage: ubuntu-latest
python.version: "3.7"
TOXENV: py,coverage-ci
hasTestResults: true
python.version: '3.8'
TOXENV: py

strategy:
matrix:
Python 3.7 Linux:
Linux:
vmImage: ubuntu-latest
Python 3.7 Windows:
Windows:
vmImage: windows-latest
Python 3.7 Mac:
Mac:
vmImage: macos-latest
PyPy 3 Linux:
Python 3.7:
python.version: '3.7'
Python 3.6:
python.version: '3.6'
PyPy:
python.version: pypy3
Python 3.6 Linux:
python.version: "3.6"
Python 3.5 Linux:
python.version: "3.5"
Python 2.7 Linux:
python.version: "2.7"
Python 2.7 Windows:
python.version: "2.7"
vmImage: windows-latest
Docs:
TOXENV: docs
hasTestResults: false
Style:
TOXENV: style
hasTestResults: false

pool:
vmImage: $(vmImage)
vmImage: $[ variables.vmImage ]

steps:
- task: UsePythonVersion@0
Expand All @@ -46,19 +38,5 @@ steps:
- script: pip --disable-pip-version-check install -U tox
displayName: Install tox

- script: tox -s false -- --junit-xml=test-results.xml
- script: tox
displayName: Run tox

- task: PublishTestResults@2
inputs:
testResultsFiles: test-results.xml
testRunTitle: $(Agent.JobName)
condition: eq(variables['hasTestResults'], 'true')
displayName: Publish test results

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage.xml
condition: eq(variables['hasTestResults'], 'true')
displayName: Publish coverage results
26 changes: 11 additions & 15 deletions .gitignore
@@ -1,19 +1,15 @@
*.pyc
*.pyo
/.idea/
/.vscode/
/env/
/venv/
__pycache__/
.idea/
.vscode/
.DS_Store
env/
venv/
*.pyc
*.egg-info/
*.eggs/
build/
dist/
docs/_build/
.pytest_cache/
.tox/
/build/
/dist/
/.pytest_cache/
/.tox/
.coverage
.coverage.*
htmlcov/
.hypothesis/
/htmlcov/
/docs/_build/
8 changes: 8 additions & 0 deletions CHANGES.rst
@@ -1,3 +1,11 @@
Version 2.0.0
-------------

Unreleased

- Drop support for Python 2 and 3.5.


Version 1.1.0
-------------

Expand Down
5 changes: 1 addition & 4 deletions MANIFEST.in
@@ -1,9 +1,6 @@
include CHANGES.rst
include LICENSE.rst
include README.rst
include tox.ini
graft docs
prune docs/_build
graft tests
prune tests/.hypothesis
global-exclude *.py[co]
global-exclude *.pyc
3 changes: 0 additions & 3 deletions README.rst
Expand Up @@ -60,11 +60,8 @@ Links

* Website: https://palletsprojects.com/p/itsdangerous/
* Documentation: https://itsdangerous.palletsprojects.com/
* License: `BSD-3-Clause`_
* Releases: https://pypi.org/project/itsdangerous/
* Code: https://github.com/pallets/itsdangerous
* Issue tracker: https://github.com/pallets/itsdangerous/issues
* Test status: https://dev.azure.com/pallets/itsdangerous/_build
* Official chat: https://discord.gg/t6rrQZH

.. _BSD-3-Clause: https://github.com/pallets/itsdangerous/blob/master/LICENSE.rst
40 changes: 33 additions & 7 deletions setup.cfg
@@ -1,23 +1,49 @@
[metadata]
license_file = LICENSE.rst
name = itsdangerous
version = attr: itsdangerous.__version__
url = https://palletsprojects.com/p/itsdangerous/
project_urls =
Documentation = https://itsdangerous.palletsprojects.com/
Code = https://github.com/pallets/itsdangerous
Issue tracker = https://github.com/pallets/itsdangerous/issues
license = BSD-3-Clause
license_files = LICENSE.rst
maintainer = Pallets
maintainer_email = contact@palletsprojects.com
description = Safely pass data to untrusted environments and back.
long_description = file: README.rst
long_description_content_type = text/x-rst
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python

[bdist_wheel]
universal = 1
[options]
packages = find:
package_dir = = src
include_package_data = true
python_requires = >= 3.6

[options.packages.find]
where = src

[tool:pytest]
testpaths = tests
filterwarnings =
error

[coverage:run]
branch = True
branch = true
source =
itsdangerous
tests

[coverage:paths]
source =
src/itsdangerous
.tox/*/lib/python*/site-packages/itsdangerous
.tox/*/site-packages/itsdangerous
src
*/site-packages

[flake8]
# B = bugbear
Expand Down
46 changes: 1 addition & 45 deletions setup.py
@@ -1,47 +1,3 @@
import io
import re

from setuptools import find_packages
from setuptools import setup

with io.open("README.rst", "rt", encoding="utf8") as f:
readme = f.read()

with io.open("src/itsdangerous/__init__.py", "rt", encoding="utf8") as f:
version = re.search(r'__version__ = "(.*?)"', f.read()).group(1)

setup(
name="itsdangerous",
version=version,
url="https://palletsprojects.com/p/itsdangerous/",
project_urls={
"Documentation": "https://itsdangerous.palletsprojects.com/",
"Code": "https://github.com/pallets/itsdangerous",
"Issue tracker": "https://github.com/pallets/itsdangerous/issues",
},
license="BSD-3-Clause",
author="Armin Ronacher",
author_email="armin.ronacher@active-4.com",
maintainer="Pallets",
maintainer_email="contact@palletsprojects.com",
description="Various helpers to pass data to untrusted environments and back.",
long_description=readme,
packages=find_packages("src"),
package_dir={"": "src"},
include_package_data=True,
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"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",
],
)
setup(name="itsdangerous")
2 changes: 1 addition & 1 deletion src/itsdangerous/__init__.py
Expand Up @@ -19,4 +19,4 @@
from .url_safe import URLSafeSerializer
from .url_safe import URLSafeTimedSerializer

__version__ = "1.1.0"
__version__ = "2.0.0.dev"
25 changes: 4 additions & 21 deletions tox.ini
@@ -1,38 +1,21 @@
[tox]
envlist =
py{37,36,35,27,py3,py}
py{38,37,36,py3}
style
docs
coverage
skip_missing_interpreters = true

[testenv]
deps =
coverage
pytest
freezegun
commands = coverage run -p -m pytest -Werror --tb=short --basetemp={envtmpdir} {posargs}
commands = pytest --tb=short --basetemp={envtmpdir} {posargs}

[testenv:style]
deps = pre-commit
skip_install = True
skip_install = true
commands = pre-commit run --all-files --show-diff-on-failure

[testenv:docs-html]
[testenv:docs]
deps = -r docs/requirements.txt
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html

[testenv:coverage]
deps = coverage
skip_install = true
commands =
coverage combine
coverage html
coverage report

[testenv:coverage-ci]
deps = coverage
skip_install = true
commands =
coverage combine
coverage xml

0 comments on commit e085f3e

Please sign in to comment.