Skip to content

Commit 1a1459f

Browse files
authored
Merge branch 'master' into altendky-just_twisted
2 parents 8d7cd0a + 0cfdab8 commit 1a1459f

14 files changed

Lines changed: 264 additions & 182 deletions

File tree

.github/workflows/ci.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
Windows:
7+
name: 'Windows (${{ matrix.python }})'
8+
runs-on: 'windows-latest'
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
python: ['3.7', '3.8', '3.9', '3.10']
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v2
17+
- name: Setup python
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python }}
21+
cache: pip
22+
cache-dependency-path: test-requirements.txt
23+
- name: Run tests
24+
run: ./ci.sh
25+
shell: bash
26+
env:
27+
# Should match 'name:' up above
28+
JOB_NAME: 'Windows (${{ matrix.python }})'
29+
30+
Ubuntu:
31+
name: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
32+
timeout-minutes: 10
33+
runs-on: 'ubuntu-latest'
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
python: ['3.7', '3.8', '3.9', '3.10', '3.11-dev']
38+
check_formatting: ['0']
39+
extra_name: ['']
40+
include:
41+
- python: '3.10'
42+
check_formatting: '1'
43+
extra_name: ', check formatting'
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v2
47+
- name: Setup python
48+
uses: actions/setup-python@v2
49+
if: "!endsWith(matrix.python, '-dev')"
50+
with:
51+
python-version: ${{ matrix.python }}
52+
cache: pip
53+
cache-dependency-path: test-requirements.txt
54+
- name: Setup python (dev)
55+
uses: deadsnakes/[email protected]
56+
if: endsWith(matrix.python, '-dev')
57+
with:
58+
python-version: '${{ matrix.python }}'
59+
- name: Run tests
60+
run: ./ci.sh
61+
env:
62+
CHECK_FORMATTING: '${{ matrix.check_formatting }}'
63+
# Should match 'name:' up above
64+
JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
65+
66+
macOS:
67+
name: 'macOS (${{ matrix.python }})'
68+
timeout-minutes: 10
69+
runs-on: 'macos-latest'
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
python: ['3.7', '3.8', '3.9', '3.10']
74+
steps:
75+
- name: Checkout
76+
uses: actions/checkout@v2
77+
- name: Setup python
78+
uses: actions/setup-python@v2
79+
with:
80+
python-version: ${{ matrix.python }}
81+
cache: pip
82+
cache-dependency-path: test-requirements.txt
83+
- name: Run tests
84+
run: ./ci.sh
85+
env:
86+
# Should match 'name:' up above
87+
JOB_NAME: 'macOS (${{ matrix.python }})'

.mypy.ini

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[mypy]
2+
# Error codes can be used to write more specific `type: ignore` comments.
3+
show_error_codes = True
4+
5+
[mypy-curio.*]
6+
# Curio doesn't provide type hints.
7+
ignore_missing_imports = True
8+
9+
[mypy-pytest.*]
10+
# The version of pytest used doesn't provide type hints.
11+
ignore_missing_imports = True

.readthedocs.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ formats:
55

66
requirements_file: ci/rtd-requirements.txt
77

8-
# Currently RTD's default image only has 3.5
9-
# This gets us 3.6 (and hopefully 3.7 in the future)
10-
# https://docs.readthedocs.io/en/latest/yaml-config.html#build-image
11-
build:
12-
image: latest
13-
148
python:
159
version: 3
1610
pip_install: True

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

ci.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
MYPY_VERSION=0.782
6+
YAPF_VERSION=0.22.0
7+
8+
9+
pip install -U pip setuptools wheel
10+
11+
if [ "$CHECK_FORMATTING" = "1" ]; then
12+
pip install yapf==${YAPF_VERSION}
13+
if ! yapf -rpd setup.py sniffio; then
14+
cat <<EOF
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17+
18+
Formatting problems were found (listed above). To fix them, run
19+
20+
pip install yapf==${YAPF_VERSION}
21+
yapf -rpi setup.py sniffio
22+
23+
in your local checkout.
24+
25+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
26+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27+
EOF
28+
exit 1
29+
fi
30+
pip install mypy==${MYPY_VERSION}
31+
if ! mypy --pretty sniffio; then
32+
cat <<EOF
33+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
34+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
35+
36+
Type checking problems were found (listed above).
37+
38+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
39+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
40+
EOF
41+
exit 1
42+
fi
43+
exit 0
44+
fi
45+
46+
python setup.py sdist --formats=zip
47+
pip install dist/*.zip
48+
49+
# Actual tests
50+
pip install -Ur test-requirements.txt
51+
52+
mkdir empty
53+
cd empty
54+
55+
pytest -W error -ra -v --pyargs sniffio --cov=sniffio --cov-config=../.coveragerc --verbose
56+
57+
bash <(curl -s https://codecov.io/bash)

ci/travis.sh

Lines changed: 0 additions & 100 deletions
This file was deleted.

docs/source/history.rst

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,32 @@ Release history
55

66
.. towncrier release notes start
77
8-
Sniffio 1.1.0 (2019-04-19)
8+
sniffio 1.3.0 (2022-09-01)
9+
--------------------------
10+
11+
Features
12+
~~~~~~~~
13+
14+
- Add support for Python 3.9 and 3.10. (`#29 <https://github.com/python-trio/sniffio/pull/29>`__)
15+
- Provide ``sniffio.thread_local.name`` for coroutine libraries to set (`#23 <https://github.com/python-trio/sniffio/pull/23>`__)
16+
17+
18+
Deprecations and Removals
19+
~~~~~~~~~~~~~~~~~~~~~~~~~
20+
21+
- Drop support for Python 3.5 and 3.6. (`#29 <https://github.com/python-trio/sniffio/pull/29>`__)
22+
23+
24+
sniffio 1.2.0 (2020-10-11)
25+
--------------------------
26+
27+
Features
28+
~~~~~~~~
29+
30+
- Include type hints (`#17 <https://github.com/python-trio/sniffio/pull/17>`__)
31+
32+
33+
sniffio 1.1.0 (2019-04-19)
934
--------------------------
1035

1136
Features

0 commit comments

Comments
 (0)