From 34f803e2d9ca8ebf50cb931cd66ff4c6d138b252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ionel=20Cristian=20M=C4=83rie=C8=99?= Date: Tue, 26 Jan 2021 23:14:51 +0200 Subject: [PATCH] Update skel and replace py35 with py39 in test grid. --- .appveyor.yml | 85 +++++++++++++++++++------------------- .bumpversion.cfg | 4 +- .cookiecutterrc | 12 +++--- .editorconfig | 10 +++-- .gitignore | 5 ++- .readthedocs.yml | 10 +++++ .travis.yml | 72 ++++++++++++++++---------------- CONTRIBUTING.rst | 13 +++--- LICENSE | 3 +- README.rst | 12 +++--- ci/requirements.txt | 1 + ci/templates/.appveyor.yml | 1 + docs/conf.py | 7 +--- setup.py | 2 +- tox.ini | 5 ++- 15 files changed, 129 insertions(+), 113 deletions(-) create mode 100644 .readthedocs.yml mode change 100644 => 100755 setup.py diff --git a/.appveyor.yml b/.appveyor.yml index 257d1f2a..25ae4ca6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,5 +1,6 @@ version: '{branch}-{build}' build: off +image: Visual Studio 2019 environment: global: TWINE_USERNAME: ionel @@ -55,48 +56,6 @@ environment: PYTHON_ARCH: '64' WHEEL_PATH: .tox/dist WINDOWS_SDK_VERSION: v7.0 - - TOXENV: py35-pure-cover,codecov - TOXPYTHON: C:\Python35\python.exe - PYTHON_HOME: C:\Python35 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '32' - - TOXENV: py35-pure-cover,codecov - TOXPYTHON: C:\Python35-x64\python.exe - PYTHON_HOME: C:\Python35-x64 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '64' - - TOXENV: py35-pure-nocov - TOXPYTHON: C:\Python35\python.exe - PYTHON_HOME: C:\Python35 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '32' - - TOXENV: py35-pure-nocov - TOXPYTHON: C:\Python35-x64\python.exe - PYTHON_HOME: C:\Python35-x64 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '64' - - TOXENV: py35-cython-cover,codecov - TOXPYTHON: C:\Python35\python.exe - PYTHON_HOME: C:\Python35 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '32' - - TOXENV: py35-cython-cover,codecov - TOXPYTHON: C:\Python35-x64\python.exe - PYTHON_HOME: C:\Python35-x64 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '64' - - TOXENV: py35-cython-nocov - TOXPYTHON: C:\Python35\python.exe - PYTHON_HOME: C:\Python35 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '32' - WHEEL_PATH: .tox/dist - - TOXENV: py35-cython-nocov - TOXPYTHON: C:\Python35-x64\python.exe - PYTHON_HOME: C:\Python35-x64 - PYTHON_VERSION: '3.5' - PYTHON_ARCH: '64' - WHEEL_PATH: .tox/dist - TOXENV: py36-pure-cover,codecov TOXPYTHON: C:\Python36\python.exe PYTHON_HOME: C:\Python36 @@ -223,6 +182,48 @@ environment: PYTHON_VERSION: '3.8' PYTHON_ARCH: '64' WHEEL_PATH: .tox/dist + - TOXENV: py39-pure-cover,codecov + TOXPYTHON: C:\Python39\python.exe + PYTHON_HOME: C:\Python39 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '32' + - TOXENV: py39-pure-cover,codecov + TOXPYTHON: C:\Python39-x64\python.exe + PYTHON_HOME: C:\Python39-x64 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '64' + - TOXENV: py39-pure-nocov + TOXPYTHON: C:\Python39\python.exe + PYTHON_HOME: C:\Python39 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '32' + - TOXENV: py39-pure-nocov + TOXPYTHON: C:\Python39-x64\python.exe + PYTHON_HOME: C:\Python39-x64 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '64' + - TOXENV: py39-cython-cover,codecov + TOXPYTHON: C:\Python39\python.exe + PYTHON_HOME: C:\Python39 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '32' + - TOXENV: py39-cython-cover,codecov + TOXPYTHON: C:\Python39-x64\python.exe + PYTHON_HOME: C:\Python39-x64 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '64' + - TOXENV: py39-cython-nocov + TOXPYTHON: C:\Python39\python.exe + PYTHON_HOME: C:\Python39 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '32' + WHEEL_PATH: .tox/dist + - TOXENV: py39-cython-nocov + TOXPYTHON: C:\Python39-x64\python.exe + PYTHON_HOME: C:\Python39-x64 + PYTHON_VERSION: '3.9' + PYTHON_ARCH: '64' + WHEEL_PATH: .tox/dist init: - ps: echo $env:TOXENV - ps: ls C:\Python* diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 287117f8..c9be017d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -8,8 +8,8 @@ search = 'fallback_version': '{current_version}' replace = 'fallback_version': '{new_version}' [bumpversion:file:README.rst] -search = v{current_version}. -replace = v{new_version}. +search = /v{current_version}.svg +replace = /v{new_version}.svg [bumpversion:file:docs/conf.py] search = version = release = '{current_version}' diff --git a/.cookiecutterrc b/.cookiecutterrc index 5904a3ea..0ac7a731 100644 --- a/.cookiecutterrc +++ b/.cookiecutterrc @@ -1,9 +1,6 @@ # Generated by cookiepatcher, a small shim around cookiecutter (pip install cookiepatcher) -cookiecutter: - _extensions: - - jinja2_time.TimeExtension - _template: cookiecutter-pylibrary +default_context: allow_tests_inside_package: no appveyor: yes c_extension_function: '-' @@ -23,10 +20,11 @@ cookiecutter: distribution_name: hunter email: contact@ionelmc.ro full_name: Ionel Cristian Mărieș - landscape: no + legacy_python: yes license: BSD 2-Clause License linter: flake8 package_name: hunter + pre_commit: yes project_name: Hunter project_short_description: Hunter is a flexible code tracing toolkit, not for measuring coverage, but for debugging, logging, inspection and other nefarious purposes. It has a simple Python API and a convenient terminal API (see `Environment variable activation `_). pypi_badge: yes @@ -49,7 +47,7 @@ cookiecutter: test_runner: pytest travis: yes travis_osx: no - version: 3.0.2 + version: 3.3.1 website: https://blog.ionelmc.ro year_from: '2015' - year_to: '2019' + year_to: '2021' diff --git a/.editorconfig b/.editorconfig index 608de9c1..586c7367 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,16 +1,20 @@ -# see http://editorconfig.org +# see https://editorconfig.org/ root = true [*] +# Use Unix-style newlines for most files (except Windows files, see below). end_of_line = lf trim_trailing_whitespace = true -insert_final_newline = true indent_style = space +insert_final_newline = true indent_size = 4 charset = utf-8 [*.{bat,cmd,ps1}] end_of_line = crlf -[*.yml] +[*.{yml,yaml}] indent_size = 2 + +[*.tsv] +indent_style = tab diff --git a/.gitignore b/.gitignore index f20791ee..fb3ade12 100644 --- a/.gitignore +++ b/.gitignore @@ -39,11 +39,14 @@ htmlcov # Translations *.mo -# Mr Developer +# Buildout .mr.developer.cfg + +# IDE project files .project .pydevproject .idea +.vscode *.iml *.komodoproject diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 00000000..59ff5c04 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,10 @@ +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details +version: 2 +sphinx: + configuration: docs/conf.py +formats: all +python: + install: + - requirements: docs/requirements.txt + - method: pip + path: . diff --git a/.travis.yml b/.travis.yml index 1a8e241b..f31597a1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,42 +88,6 @@ matrix: - WHEEL_MANYLINUX="1 cp27" python: '2.7' arch: amd64 - - env: - - TOXENV=py35-pure-cover,codecov - python: '3.5' - arch: arm64 - - env: - - TOXENV=py35-pure-cover,codecov - python: '3.5' - arch: amd64 - - env: - - TOXENV=py35-pure-nocov - - WHEEL_MANYLINUX="2014-arm cp35" - python: '3.5' - arch: arm64 - - env: - - TOXENV=py35-pure-nocov - - WHEEL_MANYLINUX="1 cp35" - python: '3.5' - arch: amd64 - - env: - - TOXENV=py35-cython-cover,codecov - python: '3.5' - arch: arm64 - - env: - - TOXENV=py35-cython-cover,codecov - python: '3.5' - arch: amd64 - - env: - - TOXENV=py35-cython-nocov - - WHEEL_MANYLINUX="2014-arm cp35" - python: '3.5' - arch: arm64 - - env: - - TOXENV=py35-cython-nocov - - WHEEL_MANYLINUX="1 cp35" - python: '3.5' - arch: amd64 - env: - TOXENV=py36-pure-cover,codecov python: '3.6' @@ -258,6 +222,42 @@ matrix: - WHEEL_MANYLINUX="1 cp38" python: '3.8' arch: amd64 + - env: + - TOXENV=py39-pure-cover,codecov + python: '3.9' + arch: arm64 + - env: + - TOXENV=py39-pure-cover,codecov + python: '3.9' + arch: amd64 + - env: + - TOXENV=py39-pure-nocov + - WHEEL_MANYLINUX="2014-arm cp39" + python: '3.9' + arch: arm64 + - env: + - TOXENV=py39-pure-nocov + - WHEEL_MANYLINUX="1 cp39" + python: '3.9' + arch: amd64 + - env: + - TOXENV=py39-cython-cover,codecov + python: '3.9' + arch: arm64 + - env: + - TOXENV=py39-cython-cover,codecov + python: '3.9' + arch: amd64 + - env: + - TOXENV=py39-cython-nocov + - WHEEL_MANYLINUX="2014-arm cp39" + python: '3.9' + arch: arm64 + - env: + - TOXENV=py39-cython-nocov + - WHEEL_MANYLINUX="1 cp39" + python: '3.9' + arch: amd64 - env: - TOXENV=pypy-pure-cover,codecov - TOXPYTHON=pypy diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 40779816..1dd4b9e4 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -37,10 +37,11 @@ Development To set up `python-hunter` for local development: -1. `Fork python-hunter `_. -2. Clone your fork locally (replace ``USERNAME`` with your GitHub username):: +1. Fork `python-hunter `_ + (look for the "Fork" button). +2. Clone your fork locally:: - git clone git@github.com:USERNAME/python-hunter.git + git clone git@github.com:YOURGITHUBNAME/python-hunter.git 3. Create a branch for local development:: @@ -48,7 +49,7 @@ To set up `python-hunter` for local development: Now you can make your changes locally. -4. When you're done making changes, run all the checks, doc builder and spell checker with `tox `_ one command:: +4. When you're done making changes run all the checks and docs builder with `tox `_ one command:: tox @@ -84,6 +85,6 @@ To run a subset of tests:: tox -e envname -- pytest -k test_myfeature -To run all the test environments in *parallel* (you need to ``pip install detox``):: +To run all the test environments in *parallel*:: - detox + tox -p auto diff --git a/LICENSE b/LICENSE index af0c96fc..37d521fb 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,6 @@ BSD 2-Clause License -Copyright (c) 2015-2019, Ionel Cristian Mărieș -All rights reserved. +Copyright (c) 2015-2021, Ionel Cristian Mărieș. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/README.rst b/README.rst index fa25b8e3..259f25dd 100644 --- a/README.rst +++ b/README.rst @@ -10,16 +10,18 @@ Overview * - docs - |docs| * - tests - - | |travis| |appveyor| |requires| |codecov| + - | |travis| |appveyor| |requires| + | |codecov| * - package - - | |version| |wheel| |supported-versions| |supported-implementations| |commits-since| + - | |version| |wheel| |supported-versions| |supported-implementations| + | |commits-since| .. |docs| image:: https://readthedocs.org/projects/python-hunter/badge/?style=flat :target: https://readthedocs.org/projects/python-hunter :alt: Documentation Status -.. |travis| image:: https://api.travis-ci.org/ionelmc/python-hunter.svg?branch=master +.. |travis| image:: https://api.travis-ci.com/ionelmc/python-hunter.svg?branch=master :alt: Travis-CI Build Status - :target: https://travis-ci.org/ionelmc/python-hunter + :target: https://travis-ci.com/github/ionelmc/python-hunter .. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/ionelmc/python-hunter?branch=master&svg=true :alt: AppVeyor Build Status @@ -29,7 +31,7 @@ Overview :alt: Requirements Status :target: https://requires.io/github/ionelmc/python-hunter/requirements/?branch=master -.. |codecov| image:: https://codecov.io/github/ionelmc/python-hunter/coverage.svg?branch=master +.. |codecov| image:: https://codecov.io/gh/ionelmc/python-hunter/branch/master/graphs/badge.svg?branch=master :alt: Coverage Status :target: https://codecov.io/github/ionelmc/python-hunter diff --git a/ci/requirements.txt b/ci/requirements.txt index 1c8d385b..d7f5177e 100644 --- a/ci/requirements.txt +++ b/ci/requirements.txt @@ -1,3 +1,4 @@ virtualenv>=16.6.0 pip>=19.1.1 setuptools>=18.0.1 +six>=1.14.0 diff --git a/ci/templates/.appveyor.yml b/ci/templates/.appveyor.yml index 53bbbaed..d8252117 100644 --- a/ci/templates/.appveyor.yml +++ b/ci/templates/.appveyor.yml @@ -1,5 +1,6 @@ version: '{branch}-{build}' build: off +image: Visual Studio 2019 environment: global: TWINE_USERNAME: ionel diff --git a/docs/conf.py b/docs/conf.py index 0644754d..b2103a91 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,15 +20,10 @@ 'sphinx.ext.todo', 'sphinx.ext.viewcode', ] -if os.getenv('SPELLCHECK'): - extensions += 'sphinxcontrib.spelling', - spelling_show_suggestions = True - spelling_lang = 'en_US' - source_suffix = '.rst' master_doc = 'index' project = 'Hunter' -year = '2015-2019' +year = '2015-2021' author = 'Ionel Cristian Mărieș' copyright = '{0}, {1}'.format(year, author) try: diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 index 7e56deb4..b73064f8 --- a/setup.py +++ b/setup.py @@ -139,10 +139,10 @@ def _unavailable(self, e): 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Utilities', diff --git a/tox.ini b/tox.ini index 406ca0df..eb5a85e0 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ envlist = clean, check, docs, - {py27,py35,py36,py37,py38,pypy,pypy3}-{pure,cython}-{cover,nocov}, + {py27,py36,py37,py38,py39,pypy,pypy3}-{pure,cython}-{cover,nocov}, report ignore_basepython_conflict = true @@ -29,7 +29,8 @@ basepython = py36: {env:TOXPYTHON:python3.6} py37: {env:TOXPYTHON:python3.7} py38: {env:TOXPYTHON:python3.8} - {bootstrap,codecov,clean,check,docs,report}: {env:TOXPYTHON:python} + py39: {env:TOXPYTHON:python3.9} + {bootstrap,clean,check,report,docs,codecov}: {env:TOXPYTHON:python3} setenv = PYTHONPATH={toxinidir}/tests PYTHONUNBUFFERED=yes