Skip to content

Commit 506cb91

Browse files
authored
Merge pull request #36 from mahmoud/refresh_2023
2023 Refresh
2 parents 2a2612b + 9048380 commit 506cb91

File tree

8 files changed

+95
-52
lines changed

8 files changed

+95
-52
lines changed

.github/workflows/tests.yaml

+19-5
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ jobs:
2323
- {name: Mac, python: '3.9', os: macos-latest, tox: py39}
2424
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
2525
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
26-
- {name: '3.6', python: '3.6', os: ubuntu-latest, tox: py36}
27-
- {name: '2.7', python: '2.7', os: ubuntu-latest, tox: py27}
28-
- {name: 'PyPy2', python: 'pypy2', os: ubuntu-latest, tox: pypy}
29-
- {name: 'PyPy3', python: 'pypy3', os: ubuntu-latest, tox: pypy3}
26+
- {name: 'PyPy2', python: 'pypy-2.7', os: ubuntu-latest, tox: pypy}
27+
- {name: 'PyPy3', python: 'pypy-3.9', os: ubuntu-latest, tox: pypy3}
3028
steps:
3129
- uses: actions/checkout@v2
32-
- uses: actions/setup-python@v2
30+
- uses: actions/setup-python@v4
3331
with:
3432
python-version: ${{ matrix.python }}
3533
- name: update pip
@@ -47,3 +45,19 @@ jobs:
4745
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
4846
- run: pip install tox
4947
- run: tox -e ${{ matrix.tox }}
48+
tests-py27:
49+
name: '2.7'
50+
runs-on: ubuntu-20.04
51+
container:
52+
image: python:2.7.18-buster
53+
strategy:
54+
fail-fast: false
55+
steps:
56+
- uses: actions/checkout@v2
57+
- name: update pip
58+
run: |
59+
pip install -U wheel
60+
pip install -U setuptools
61+
python -m pip install -U pip
62+
- run: pip install tox
63+
- run: tox -e py27

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ Clastic's approach to updates is as follows:
1313
Check this page when upgrading to make sure you know about all the new
1414
features and potential breakages.
1515

16+
17+
18+
21.1.2
19+
------
20+
*(Oct 17, 2023)*
21+
22+
Bumped a few dependencies to their last py2-compatible version ahead of dropping Py3 support in 23.0.0. (Skipped 21.1.1)
23+
1624
21.1.0
1725
------
1826
*(November 7, 2021)*

clastic/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
from __future__ import unicode_literals
33

4-
version_info = (21, 1, 1, 'dev')
4+
version_info = (21, 1, 2, '')
55
__version__ = '.'.join(["%s" % part for part in version_info if part or part == 0])

clastic/tests/test_meta.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from __future__ import unicode_literals
33

44
import os
5+
import sys
56
import json
67

78
from clastic import Application, render_basic, StaticFileRoute, MetaApplication
@@ -16,6 +17,8 @@
1617
except:
1718
PY3 = True
1819

20+
IS_PYPY = '__pypy__' in sys.builtin_module_names
21+
1922

2023
def test_meta_basic():
2124
app = Application([('/meta', MetaApplication()),
@@ -51,15 +54,15 @@ def ep_method(self):
5154
('/callable_obj', obj, render_basic),
5255
StaticFileRoute('/file', _CUR_DIR + '/test_meta.py'),
5356
('/meta', MetaApplication())]
54-
if PY3:
57+
if PY3 and not IS_PYPY:
5558
routes.append(('/builtin', sum, render_basic))
5659

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

6063
cl = app.get_local_client()
6164
assert cl.get('/meta/').status_code == 200
62-
if not PY3:
65+
if not PY3 or IS_PYPY:
6366
return
6467

6568
resp = cl.get('/meta/json/')

requirements.in

+18-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
ashes
2-
attr
2+
attrs==21.4.0
3+
click<8 # pip-tools uses it
34
boltons
4-
chameleon
5-
coverage
5+
chameleon<3.10 # 4.0 dropped 2.7 support, 3.10 made scopes dict-like in a way that breaks tests
6+
coverage<6
67
face
7-
glom
8-
Mako
8+
filelock==3.2.1
9+
glom<23.3.0 # dropped py2
10+
importlib-metadata==2.1.3 # py2-only
11+
Mako==1.1.6 # py2-only
12+
markupsafe==1.1.1
913
more-itertools<6.0.0 # >=6.0 breaks py27/pypy
10-
pip-tools
14+
pip-tools==5.5.0
1115
psutil==5.8.0
1216
pytest<5.0.0
13-
secure-cookie # werkzeug goes 1.0 but adds an 0ver dep that's been in prod since 2007
14-
tox
15-
Werkzeug
17+
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
18+
tox==3.28.0 # py2
19+
Werkzeug==1.0.1
20+
packaging==20.9 # py2-only
21+
platformdirs==2.0.2 # py2-only
22+
pyparsing==2.4.7 # py2-only
1623
pip==20.1.1
17-
virtualenv>=16.4.3 # open(mode='rU') warnings
24+
virtualenv==20.15.1
25+
zipp==1.2.0

requirements.txt

+29-27
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,39 @@
22
# This file is autogenerated by pip-compile with python 3.7
33
# To update, run:
44
#
5-
# pip-compile --annotation-style=line requirements.in
5+
# pip-compile --annotation-style=line --strip-extras requirements.in
66
#
7-
appdirs==1.4.3 # via virtualenv
87
ashes==19.2.0 # via -r requirements.in
9-
atomicwrites==1.3.0 # via pytest
10-
attr==0.3.1 # via -r requirements.in
11-
attrs==19.3.0 # via glom, pytest
12-
boltons==20.0.0 # via -r requirements.in, face, glom
13-
chameleon==3.6.2 # via -r requirements.in
14-
click==7.0 # via pip-tools
15-
coverage==5.0.3 # via -r requirements.in
16-
distlib==0.3.0 # via virtualenv
8+
atomicwrites==1.4.1 # via pytest
9+
attrs==21.4.0 # via -r requirements.in, glom, pytest
10+
boltons==23.0.0 # via -r requirements.in, face, glom
11+
chameleon==3.9.1 # via -r requirements.in
12+
click==7.1.2 # via -r requirements.in, pip-tools
13+
coverage==5.5 # via -r requirements.in
14+
distlib==0.3.7 # via virtualenv
1715
face==20.1.1 # via -r requirements.in, glom
18-
filelock==3.0.12 # via tox, virtualenv
19-
glom==19.10.0 # via -r requirements.in
20-
importlib-metadata==1.7.0 # via pluggy, pytest, tox, virtualenv
21-
mako==1.1.1 # via -r requirements.in
22-
markupsafe==1.1.1 # via mako
16+
filelock==3.2.1 # via -r requirements.in, tox, virtualenv
17+
glom==23.1.1 # via -r requirements.in
18+
importlib-metadata==2.1.3 # via -r requirements.in, pytest, tox, virtualenv
19+
mako==1.1.6 # via -r requirements.in
20+
markupsafe==1.1.1 # via -r requirements.in, mako
2321
more-itertools==5.0.0 # via -r requirements.in, pytest
24-
packaging==20.1 # via pytest, tox
25-
pip-tools==4.5.0 # via -r requirements.in
22+
packaging==20.9 # via -r requirements.in, pytest, tox
23+
pip-tools==5.5.0 # via -r requirements.in
24+
platformdirs==2.0.2 # via -r requirements.in, virtualenv
2625
pluggy==0.13.1 # via pytest, tox
2726
psutil==5.8.0 # via -r requirements.in
28-
py==1.8.1 # via pytest, tox
29-
pyparsing==2.4.6 # via packaging
30-
pytest==4.6.9 # via -r requirements.in
27+
py==1.11.0 # via pytest, tox
28+
pyparsing==2.4.7 # via -r requirements.in, packaging
29+
pytest==4.6.11 # via -r requirements.in
3130
secure-cookie==0.1.0 # via -r requirements.in
32-
six==1.14.0 # via more-itertools, packaging, pip-tools, pytest, tox, virtualenv
33-
toml==0.10.0 # via tox
34-
tox==3.14.5 # via -r requirements.in
35-
virtualenv==20.0.5 # via -r requirements.in, tox
36-
wcwidth==0.1.8 # via pytest
37-
werkzeug==1.0.0 # via -r requirements.in, secure-cookie
38-
zipp==1.2.0 # via importlib-metadata
31+
six==1.16.0 # via more-itertools, pytest, tox, virtualenv
32+
# tomli==2.0.1 # via tox <- shouldn't be. tomli was added in tox>=4
33+
tox==3.28.0 # via -r requirements.in
34+
virtualenv==20.15.1 # via -r requirements.in, tox
35+
wcwidth==0.2.8 # via pytest
36+
werkzeug==1.0.1 # via -r requirements.in, secure-cookie
37+
zipp==1.2.0 # via importlib-metadata
38+
39+
# The following packages are considered to be unsafe in a requirements file:
40+
# pip

setup.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
' explicit development practices while eliminating'
2626
' global state.')
2727

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

3131
setup(name='clastic',
@@ -42,10 +42,20 @@
4242
'clastic.tests'],
4343
include_package_data=True,
4444
zip_safe=False,
45-
install_requires=['Werkzeug>=1.0.0,<2.0', 'boltons>=20.0.0', 'ashes', 'glom', 'secure-cookie'],
45+
install_requires=[
46+
'Werkzeug>=1.0.0,<2.0',
47+
'ashes',
48+
'attrs<=21.4.0',
49+
'boltons>=20.0.0',
50+
'glom<=23.1.1',
51+
'secure-cookie==0.1.0'],
4652
license=__license__,
4753
platforms='any',
48-
tests_require=['Mako==1.0.7', 'pytest==4.6.9', 'psutil==5.8.0'],
54+
tests_require=[
55+
'chameleon==3.9.1',
56+
'Mako==1.1.6',
57+
'pytest==4.6.9',
58+
'psutil==5.8.0'],
4959
classifiers=[
5060
'Intended Audience :: Developers',
5161
'Development Status :: 5 - Production/Stable',
@@ -56,7 +66,6 @@
5666
'Topic :: Internet :: WWW/HTTP :: WSGI :: Server',
5767
'Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries',
5868
'Topic :: Software Development :: Libraries :: Application Frameworks',
59-
'Programming Language :: Python :: 2.6',
6069
'Programming Language :: Python :: 2.7',
6170
'Programming Language :: Python :: 3.7',
6271
'Programming Language :: Python :: 3.8',

tox.ini

+2-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ install_command = python -m pip install {opts} pip==20.1.1 {packages}
1313
# Uses default basepython otherwise reporting doesn't work on Travis where
1414
# Python 3.6 is only available in 3.6 jobs.
1515
[testenv:coverage-report]
16+
depends = py27,py37,py38,py39,pypy
1617
changedir = .tox
1718
deps = coverage
1819
commands = coverage combine --rcfile {toxinidir}/.tox-coveragerc
@@ -23,8 +24,6 @@ commands = coverage combine --rcfile {toxinidir}/.tox-coveragerc
2324
[testenv:packaging]
2425
changedir = {toxinidir}
2526
deps =
26-
check-manifest==0.35
27-
readme_renderer==17.2
27+
readme_renderer==37.3
2828
commands =
29-
# check-manifest
3029
python setup.py check --metadata --restructuredtext --strict

0 commit comments

Comments
 (0)