Skip to content

Commit

Permalink
Merge pull request #79 from TheFriendlyCoder/py2deprecation
Browse files Browse the repository at this point in the history
Fixes #78 dropped python 2 support
  • Loading branch information
TheFriendlyCoder committed Jul 18, 2020
2 parents c1b08ad + fa9057c commit 351fd01
Show file tree
Hide file tree
Showing 13 changed files with 93 additions and 176 deletions.
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.5.6
16 changes: 9 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
language: python

python:
- 2.7
- 3.5
- 3.6
- pypy
- 3.7
- 3.8
- pypy3.5

install:
- pip install tox twine wheel python-coveralls
# NOTE: we had to add coverage package at a pinned version to fix pypy3 builds
- pip install tox tox-factor wheel python-coveralls coverage==4.5.4

script:
- echo $TRAVIS_PYTHON_VERSION
- export PYVER=`echo $TRAVIS_PYTHON_VERSION | tr "." "\n" | head -n 1 | sed 's/^py//'`
- echo $PYVER
- tox -e py$PYVER
- tox -f py$PYVER

# Deploy to test.pypi.org for branches
# Deploy to pypi.org for tags
Expand All @@ -23,14 +23,16 @@ script:
jobs:
include:
- stage: deploy-release
python: 3.6
python: 3.7
script:
- pip install twine
- python setup.py bdist_wheel
- twine upload dist/*.whl -u $DEPLOY_USER -p $DEPLOY_PASS
if: tag IS true
- stage: deploy-snapshot
python: 3.6
python: 3.7
script:
- pip install twine
- python setup.py bdist_wheel
- twine upload --repository-url https://test.pypi.org/legacy/
dist/*.whl -u $DEPLOY_USER -p $DEPLOY_PASS
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ anyone would like to contribute to this pet project feel free to fork it and
send me pull requests for any changes you may like.

Comments, suggestions and bugs may be reported to the project
`maintainer <mailto:kevin@thefriendlycoder.com>`_
`maintainer <mailto:thefriendlycoder@gmail.com>`_

Full API documentation can be found on
`ReadTheDocs.org <http://friendlypins.readthedocs.io/en/latest/>`_.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# -- Project information -----------------------------------------------------

copyright = '2019, Kevin S. Phillips'
copyright = '2020, Kevin S. Phillips'
author = 'Kevin S. Phillips'
_proj_props = ast.literal_eval(open('../project.prop').read())
_proj_dir = os.path.join(_src_dir, _proj_props["NAME"])
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ anyone would like to contribute to this pet project feel free to fork it and
send me pull requests for any changes you may like.

Comments, suggestions and bugs may be reported to the project
`maintainer <mailto:kevin@thefriendlycoder.com>`_
`maintainer <mailto:thefriendlycoder@gmail.com>`_

Indices and tables
==================
Expand Down
11 changes: 2 additions & 9 deletions lock.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,9 @@
# referenced by the tox.ini config file at build time.
# Any changes to this pattern will need to be reflected
# there as well.
virtualenv -p python2 tmp
virtualenv -p `which python3` tmp
source ./tmp/bin/activate
pip install -e .[dev]
pip freeze --exclude-editable > ./tests/python2.reqs
deactivate
rm -rf tmp

virtualenv -p python3 tmp
source ./tmp/bin/activate
pip install -e .[dev]
pip install -e ".[dev]"
pip freeze --exclude-editable > ./tests/python3.reqs
deactivate
rm -rf tmp
5 changes: 3 additions & 2 deletions project.prop
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
"mock",
"pylint",
"sphinx",
"sphinxcontrib-apidoc",
"tox",
"radon",
"tox-factor"
],
"DESCRIPTION" : "Python wrapper around the Pinterest developer APIs",
"KEYWORDS" : "pinterest api wrapper library",
"SUPPORTED_PYTHON_VERSION" :
">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4",
">=3.5.0, <4",
}
2 changes: 1 addition & 1 deletion src/friendlypins/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# pylint: disable=missing-docstring
__version__ = "1.0.5"
__version__ = "2.0.0"
3 changes: 3 additions & 0 deletions tests/pypy3.reqs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pytest
pytest-cov
mock
67 changes: 0 additions & 67 deletions tests/python2.reqs

This file was deleted.

108 changes: 57 additions & 51 deletions tests/python3.reqs
Original file line number Diff line number Diff line change
@@ -1,57 +1,63 @@
alabaster==0.7.12
astroid==2.1.0
atomicwrites==1.3.0
attrs==18.2.0
Babel==2.6.0
bleach==3.1.0
certifi==2018.11.29
appdirs==1.4.4
astroid==2.4.2
attrs==19.3.0
Babel==2.8.0
bleach==3.1.5
certifi==2020.6.20
chardet==3.0.4
colorama==0.4.1
coverage==4.5.2
dateutils==0.6.6
docutils==0.14
entrypoints==0.3
filelock==3.0.10
flake8==3.7.5
flake8-polyfill==1.0.2
idna==2.8
imagesize==1.1.0
isort==4.3.4
Jinja2==2.10
lazy-object-proxy==1.3.1
mando==0.6.4
MarkupSafe==1.1.0
coverage==5.2
dateutils==0.6.8
distlib==0.3.1
docutils==0.16
filelock==3.0.12
idna==2.10
imagesize==1.2.0
importlib-metadata==1.7.0
importlib-resources==3.0.0
isort==4.3.21
Jinja2==2.11.2
lazy-object-proxy==1.4.3
MarkupSafe==1.1.1
mccabe==0.6.1
mock==2.0.0
more-itertools==5.0.0
packaging==19.0
pbr==5.1.2
Pillow==5.4.1
mock==3.0.5
more-itertools==8.4.0
packaging==20.4
pathlib2==2.3.5
pbr==5.4.5
Pillow==7.2.0
pkginfo==1.5.0.1
pluggy==0.8.1
py==1.7.0
pycodestyle==2.5.0
pyflakes==2.1.0
Pygments==2.3.1
pylint==2.2.2
pyparsing==2.3.1
pytest==4.2.0
pytest-cov==2.6.1
python-dateutil==2.8.0
pytz==2018.9
radon==3.0.1
readme-renderer==24.0
requests==2.21.0
pluggy==0.13.1
py==1.9.0
Pygments==2.6.1
pylint==2.5.3
pyparsing==2.4.7
pytest==5.4.3
pytest-cov==2.10.0
python-dateutil==2.8.1
pytz==2020.1
readme-renderer==26.0
requests==2.24.0
requests-toolbelt==0.9.1
six==1.12.0
snowballstemmer==1.2.1
Sphinx==1.8.4
sphinxcontrib-websupport==1.1.0
toml==0.10.0
tox==3.7.0
tqdm==4.31.1
twine==1.12.1
urllib3==1.24.1
virtualenv==16.4.0
six==1.15.0
snowballstemmer==2.0.0
Sphinx==3.1.2
sphinxcontrib-apidoc==0.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==1.0.3
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.4
toml==0.10.1
tox==3.17.1
tox-factor==0.1.2
tqdm==4.48.0
twine==1.15.0
typed-ast==1.4.1
urllib3==1.25.9
virtualenv==20.0.27
wcwidth==0.2.5
webencodings==0.5.1
wrapt==1.11.1
wrapt==1.12.1
zipp==1.2.0
42 changes: 14 additions & 28 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
[tox]
envlist = py2,py3,pypy,pypy3
skipsdist=true
envlist = {py3,pypy3}-{lint,test,docs}
skip_missing_interpreters=False

[testenv]
whitelist_externals =
rm
bash
commands =
rm -rf dist
python setup.py bdist_wheel
/bin/bash -c 'pip install dist/*.whl'
pylint setup.py
bash -c "source toxenv.sh; pylint ./src/$PROJECT_NAME"
bash -c "source toxenv.sh; pytest {posargs} ./tests -v --cov-report html --cov $PROJECT_NAME --no-cov-on-fail"

[testenv:py2]
deps = -rtests/python2.reqs

[testenv:pypy]
deps = -rtests/python2.reqs
setenv =
PROJECT_PATH=friendlypins

[testenv:py3]
deps = -rtests/python3.reqs
usedevelop=True
envdir =
py3: {toxworkdir}/py3
pypy3: {toxworkdir}/pypy3

[testenv:pypy3]
deps = -rtests/python3.reqs
deps =
py3: -rtests/python3.reqs
pypy3: -rtests/pypy3.reqs

[testenv:py3-docs]
deps = -rtests/python3.reqs
whitelist_externals =
bash
commands =
bash -c "source toxenv.sh; sphinx-apidoc -f -e -o ./docs/ src/$PROJECT_NAME"
python setup.py build_sphinx
py3-lint: python -m pylint setup.py
py3-lint: python -m pylint ./src/{env:PROJECT_PATH}
test: python -m pytest {posargs} ./tests -v --cov-report html --cov {env:PROJECT_PATH} --no-cov-on-fail
py3-docs: python setup.py build_sphinx
8 changes: 0 additions & 8 deletions toxenv.sh

This file was deleted.

0 comments on commit 351fd01

Please sign in to comment.