Skip to content

Commit

Permalink
Merge pull request #36 from mahmoud/refresh_2023
Browse files Browse the repository at this point in the history
2023 Refresh
  • Loading branch information
mahmoud committed Oct 17, 2023
2 parents 2a2612b + 9048380 commit 506cb91
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 52 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ jobs:
- {name: Mac, python: '3.9', os: macos-latest, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
- {name: '2.7', python: '2.7', os: ubuntu-latest, tox: py27}
- {name: 'PyPy2', python: 'pypy2', os: ubuntu-latest, tox: pypy}
- {name: 'PyPy3', python: 'pypy3', os: ubuntu-latest, tox: pypy3}
- {name: 'PyPy2', python: 'pypy-2.7', os: ubuntu-latest, tox: pypy}
- {name: 'PyPy3', python: 'pypy-3.9', os: ubuntu-latest, tox: pypy3}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: update pip
Expand All @@ -47,3 +45,19 @@ jobs:
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
- run: pip install tox
- run: tox -e ${{ matrix.tox }}
tests-py27:
name: '2.7'
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: update pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- run: pip install tox
- run: tox -e py27
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ Clastic's approach to updates is as follows:
Check this page when upgrading to make sure you know about all the new
features and potential breakages.



21.1.2
------
*(Oct 17, 2023)*

Bumped a few dependencies to their last py2-compatible version ahead of dropping Py3 support in 23.0.0. (Skipped 21.1.1)

21.1.0
------
*(November 7, 2021)*
Expand Down
2 changes: 1 addition & 1 deletion clastic/_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

from __future__ import unicode_literals

version_info = (21, 1, 1, 'dev')
version_info = (21, 1, 2, '')
__version__ = '.'.join(["%s" % part for part in version_info if part or part == 0])
7 changes: 5 additions & 2 deletions clastic/tests/test_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import unicode_literals

import os
import sys
import json

from clastic import Application, render_basic, StaticFileRoute, MetaApplication
Expand All @@ -16,6 +17,8 @@
except:
PY3 = True

IS_PYPY = '__pypy__' in sys.builtin_module_names


def test_meta_basic():
app = Application([('/meta', MetaApplication()),
Expand Down Expand Up @@ -51,15 +54,15 @@ def ep_method(self):
('/callable_obj', obj, render_basic),
StaticFileRoute('/file', _CUR_DIR + '/test_meta.py'),
('/meta', MetaApplication())]
if PY3:
if PY3 and not IS_PYPY:
routes.append(('/builtin', sum, render_basic))

app = Application(routes=routes,
resources={'iterable': [1, 2, 3], 'start': 0})

cl = app.get_local_client()
assert cl.get('/meta/').status_code == 200
if not PY3:
if not PY3 or IS_PYPY:
return

resp = cl.get('/meta/json/')
Expand Down
28 changes: 18 additions & 10 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
ashes
attr
attrs==21.4.0
click<8 # pip-tools uses it
boltons
chameleon
coverage
chameleon<3.10 # 4.0 dropped 2.7 support, 3.10 made scopes dict-like in a way that breaks tests
coverage<6
face
glom
Mako
filelock==3.2.1
glom<23.3.0 # dropped py2
importlib-metadata==2.1.3 # py2-only
Mako==1.1.6 # py2-only
markupsafe==1.1.1
more-itertools<6.0.0 # >=6.0 breaks py27/pypy
pip-tools
pip-tools==5.5.0
psutil==5.8.0
pytest<5.0.0
secure-cookie # werkzeug goes 1.0 but adds an 0ver dep that's been in prod since 2007
tox
Werkzeug
secure-cookie==0.1.0 # werkzeug goes 1.0 but adds an 0ver dep that's been in prod since 2007. can go to 0.2.0 after py2 drop
tox==3.28.0 # py2
Werkzeug==1.0.1
packaging==20.9 # py2-only
platformdirs==2.0.2 # py2-only
pyparsing==2.4.7 # py2-only
pip==20.1.1
virtualenv>=16.4.3 # open(mode='rU') warnings
virtualenv==20.15.1
zipp==1.2.0
56 changes: 29 additions & 27 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,39 @@
# This file is autogenerated by pip-compile with python 3.7
# To update, run:
#
# pip-compile --annotation-style=line requirements.in
# pip-compile --annotation-style=line --strip-extras requirements.in
#
appdirs==1.4.3 # via virtualenv
ashes==19.2.0 # via -r requirements.in
atomicwrites==1.3.0 # via pytest
attr==0.3.1 # via -r requirements.in
attrs==19.3.0 # via glom, pytest
boltons==20.0.0 # via -r requirements.in, face, glom
chameleon==3.6.2 # via -r requirements.in
click==7.0 # via pip-tools
coverage==5.0.3 # via -r requirements.in
distlib==0.3.0 # via virtualenv
atomicwrites==1.4.1 # via pytest
attrs==21.4.0 # via -r requirements.in, glom, pytest
boltons==23.0.0 # via -r requirements.in, face, glom
chameleon==3.9.1 # via -r requirements.in
click==7.1.2 # via -r requirements.in, pip-tools
coverage==5.5 # via -r requirements.in
distlib==0.3.7 # via virtualenv
face==20.1.1 # via -r requirements.in, glom
filelock==3.0.12 # via tox, virtualenv
glom==19.10.0 # via -r requirements.in
importlib-metadata==1.7.0 # via pluggy, pytest, tox, virtualenv
mako==1.1.1 # via -r requirements.in
markupsafe==1.1.1 # via mako
filelock==3.2.1 # via -r requirements.in, tox, virtualenv
glom==23.1.1 # via -r requirements.in
importlib-metadata==2.1.3 # via -r requirements.in, pytest, tox, virtualenv
mako==1.1.6 # via -r requirements.in
markupsafe==1.1.1 # via -r requirements.in, mako
more-itertools==5.0.0 # via -r requirements.in, pytest
packaging==20.1 # via pytest, tox
pip-tools==4.5.0 # via -r requirements.in
packaging==20.9 # via -r requirements.in, pytest, tox
pip-tools==5.5.0 # via -r requirements.in
platformdirs==2.0.2 # via -r requirements.in, virtualenv
pluggy==0.13.1 # via pytest, tox
psutil==5.8.0 # via -r requirements.in
py==1.8.1 # via pytest, tox
pyparsing==2.4.6 # via packaging
pytest==4.6.9 # via -r requirements.in
py==1.11.0 # via pytest, tox
pyparsing==2.4.7 # via -r requirements.in, packaging
pytest==4.6.11 # via -r requirements.in
secure-cookie==0.1.0 # via -r requirements.in
six==1.14.0 # via more-itertools, packaging, pip-tools, pytest, tox, virtualenv
toml==0.10.0 # via tox
tox==3.14.5 # via -r requirements.in
virtualenv==20.0.5 # via -r requirements.in, tox
wcwidth==0.1.8 # via pytest
werkzeug==1.0.0 # via -r requirements.in, secure-cookie
zipp==1.2.0 # via importlib-metadata
six==1.16.0 # via more-itertools, pytest, tox, virtualenv
# tomli==2.0.1 # via tox <- shouldn't be. tomli was added in tox>=4
tox==3.28.0 # via -r requirements.in
virtualenv==20.15.1 # via -r requirements.in, tox
wcwidth==0.2.8 # via pytest
werkzeug==1.0.1 # via -r requirements.in, secure-cookie
zipp==1.2.0 # via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
17 changes: 13 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
' explicit development practices while eliminating'
' global state.')

if sys.version_info < (2,6):
if sys.version_info < (2,7):
raise NotImplementedError("Sorry, clastic only supports Python >2.6")

setup(name='clastic',
Expand All @@ -42,10 +42,20 @@
'clastic.tests'],
include_package_data=True,
zip_safe=False,
install_requires=['Werkzeug>=1.0.0,<2.0', 'boltons>=20.0.0', 'ashes', 'glom', 'secure-cookie'],
install_requires=[
'Werkzeug>=1.0.0,<2.0',
'ashes',
'attrs<=21.4.0',
'boltons>=20.0.0',
'glom<=23.1.1',
'secure-cookie==0.1.0'],
license=__license__,
platforms='any',
tests_require=['Mako==1.0.7', 'pytest==4.6.9', 'psutil==5.8.0'],
tests_require=[
'chameleon==3.9.1',
'Mako==1.1.6',
'pytest==4.6.9',
'psutil==5.8.0'],
classifiers=[
'Intended Audience :: Developers',
'Development Status :: 5 - Production/Stable',
Expand All @@ -56,7 +66,6 @@
'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
Expand Down
5 changes: 2 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ install_command = python -m pip install {opts} pip==20.1.1 {packages}
# Uses default basepython otherwise reporting doesn't work on Travis where
# Python 3.6 is only available in 3.6 jobs.
[testenv:coverage-report]
depends = py27,py37,py38,py39,pypy
changedir = .tox
deps = coverage
commands = coverage combine --rcfile {toxinidir}/.tox-coveragerc
Expand All @@ -23,8 +24,6 @@ commands = coverage combine --rcfile {toxinidir}/.tox-coveragerc
[testenv:packaging]
changedir = {toxinidir}
deps =
check-manifest==0.35
readme_renderer==17.2
readme_renderer==37.3
commands =
# check-manifest
python setup.py check --metadata --restructuredtext --strict

0 comments on commit 506cb91

Please sign in to comment.