Skip to content

Commit 1e3e942

Browse files
authored
uprev deps (#106)
* uprev deps * drop 3.6, uprev, fix warnings * fix netlify, xfail on 3.10 * fix mkdocs * remove 3.6 comments * linting
1 parent 54b2b2b commit 1e3e942

File tree

15 files changed

+48
-56
lines changed

15 files changed

+48
-56
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
- uses: actions/setup-python@v2
1919
with:
20-
python-version: '3.8'
20+
python-version: '3.10'
2121

2222
- run: pip install -U pip wheel
2323
- run: pip install -r tests/requirements-linting.txt
@@ -31,11 +31,7 @@ jobs:
3131
fail-fast: false
3232
matrix:
3333
os: [ubuntu, macos, windows]
34-
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10.0-rc.1']
35-
exclude:
36-
# numpy currently get's upset with macos and python 3.10
37-
- os: macos
38-
python-version: '3.10.0-rc.1'
34+
python-version: ['3.7', '3.8', '3.9', '3.10']
3935

4036
env:
4137
PYTHON: ${{ matrix.python-version }}
@@ -95,7 +91,7 @@ jobs:
9591
- name: set up python
9692
uses: actions/setup-python@v2
9793
with:
98-
python-version: '3.8'
94+
python-version: '3.10'
9995

10096
- name: install
10197
run: make install

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ lint:
2121

2222
.PHONY: test
2323
test:
24-
pytest --cov=devtools --cov-fail-under 0
24+
coverage run -m pytest
2525

2626
.PHONY: testcov
2727
testcov:
28-
pytest --cov=devtools --cov-fail-under 0
28+
coverage run -m pytest
2929
@echo "building coverage html"
3030
@coverage html
3131

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pip install devtools[pygments]
2020

2121
`pygments` is not required but if it's installed, output will be highlighted and easier to read.
2222

23-
`devtools` has no other required dependencies except python 3.6, 3.7, 3.8 or 3.9.
24-
If you've got python 3.6+ and `pip` installed, you're good to go.
23+
`devtools` has no other required dependencies except python 3.7, 3.8, 3.9 or 3.10.
24+
If you've got python 3.7+ and `pip` installed, you're good to go.
2525

2626
## Usage
2727

devtools/prettier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(
7474
((list, set, frozenset), self._format_list_like),
7575
(bytearray, self._format_bytearray),
7676
(generator_types, self._format_generator),
77-
# put this last as the check can be slow
77+
# put these last as the check can be slow
7878
(LaxMapping, self._format_dict),
7979
(DataClassType, self._format_dataclass),
8080
(SQLAlchemyClassType, self._format_sqlalchemy_class),

devtools/utils.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,9 @@ class LaxMapping(metaclass=MetaLaxMapping):
133133

134134
class MetaDataClassType(type):
135135
def __instancecheck__(self, instance: 'Any') -> bool:
136-
try:
137-
from dataclasses import _is_dataclass_instance
138-
except ImportError:
139-
# python 3.6
140-
return False
141-
else:
142-
return _is_dataclass_instance(instance)
136+
from dataclasses import is_dataclass
137+
138+
return is_dataclass(instance)
143139

144140

145141
class DataClassType(metaclass=MetaDataClassType):

docs/install.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ pip install devtools[pygments]
66

77
`pygments` is not required but if it's installed, output will be highlighted and easier to read.
88

9-
`devtools` has no other required dependencies except python 3.6, 3.7, 3.8, or 3.9.
10-
If you've got python 3.6+ and `pip` installed, you're good to go.
9+
`devtools` has no other required dependencies except python 3.7, 3.8, 3.9 or 3.10.
10+
If you've got python 3.7+ and `pip` installed, you're good to go.

docs/requirements.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
ansi2html==1.5.2
2-
mkdocs==1.1.2
3-
markdown==3.2.2
1+
ansi2html==1.8.0
2+
mkdocs==1.3.1
43
mkdocs-exclude==1.0.2
5-
mkdocs-material==5.5.0
6-
markdown-include==0.5.1
7-
pygments==2.7.4
4+
mkdocs-material==8.3.9
5+
markdown-include==0.7.0
6+
pygments==2.12.0

docs/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ We all know the annoyance of running code only to discover a missing import, thi
8989
frustrating when the function you're using isn't used except during development.
9090

9191
You can setup your environment to make `debug` available at all times by editing `sitecustomize.py`,
92-
with ubuntu and python3.6 this file can be found at `/usr/lib/python3.6/sitecustomize.py` but you might
92+
with ubuntu and python3.8 this file can be found at `/usr/lib/python3.8/sitecustomize.py` but you might
9393
need to look elsewhere depending on your OS/python version.
9494

9595
Add the following to `sitecustomize.py`

mkdocs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,16 @@ theme:
1212

1313
repo_name: samuelcolvin/python-devtools
1414
repo_url: https://github.com/samuelcolvin/python-devtools
15-
google_analytics:
16-
- 'UA-62733018-4'
17-
- 'auto'
15+
16+
extra:
17+
analytics:
18+
provider: google
19+
property: UA-62733018-4
20+
social:
21+
- icon: fontawesome/brands/github-alt
22+
link: https://github.com/samuelcolvin/python-devtools
23+
- icon: fontawesome/brands/twitter
24+
link: https://twitter.com/samuel_colvin
1825

1926
extra_css:
2027
- 'theme/customization.css'

runtime.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7
1+
3.8

0 commit comments

Comments
 (0)