Skip to content

Commit

Permalink
Merge branch 'master' into memory_channel_named_tuple
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Sep 8, 2023
2 parents 7e6191c + be39867 commit e7d1b91
Show file tree
Hide file tree
Showing 238 changed files with 14,827 additions and 5,966 deletions.
22 changes: 22 additions & 0 deletions .builds/alpine.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
image: alpine/latest
packages:
- curl
- gcc
- libffi-dev
- musl-dev
- openssl-dev
- python3-dev
# required to build cryptography
- rust
- cargo
sources:
- https://github.com/python-trio/trio
tasks:
- test: |
python3 -m venv venv
source venv/bin/activate
cd trio
CI_BUILD_ID=$JOB_ID CI_BUILD_URL=$JOB_URL ./ci.sh
environment:
CODECOV_TOKEN: 87cefb17-c44b-4f2f-8b30-1fff5769ce46
JOB_NAME: Alpine
15 changes: 15 additions & 0 deletions .builds/fedora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
image: fedora/rawhide
packages:
- python3-devel
- python3-pip
sources:
- https://github.com/python-trio/trio
tasks:
- test: |
python3 -m venv venv
source venv/bin/activate
cd trio
CI_BUILD_ID=$JOB_ID CI_BUILD_URL=$JOB_URL ./ci.sh
environment:
CODECOV_TOKEN: 87cefb17-c44b-4f2f-8b30-1fff5769ce46
JOB_NAME: Fedora
18 changes: 18 additions & 0 deletions .builds/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
image: freebsd/latest
packages:
- curl
- python39
- py39-sqlite3
- rust # required to build cryptography
sources:
- https://github.com/python-trio/trio
tasks:
- setup: sudo ln -s /usr/local/bin/bash /bin/bash
- test: |
python3.9 -m venv venv
source venv/bin/activate
cd trio
CI_BUILD_ID=$JOB_ID CI_BUILD_URL=$JOB_URL ./ci.sh
environment:
CODECOV_TOKEN: 87cefb17-c44b-4f2f-8b30-1fff5769ce46
JOB_NAME: FreeBSD
16 changes: 12 additions & 4 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,28 +1,36 @@
[run]
branch=True
source=trio
# For some reason coverage recording doesn't work for ipython_custom_exc.py,
# so leave it out of reports
omit=
setup.py
*/ipython_custom_exc.py
# Omit the generated files in trio/_core starting with _public_
# These are run in subprocesses, but still don't work. We follow
# coverage's documentation to no avail.
*/trio/_core/_tests/test_multierror_scripts/*
# Omit the generated files in trio/_core starting with _generated_
*/trio/_core/_generated_*
# Script used to check type completeness that isn't run in tests
*/trio/_tests/check_type_completeness.py
# The test suite spawns subprocesses to test some stuff, so make sure
# this doesn't corrupt the coverage files
parallel=True

[report]
precision = 1
skip_covered = True
exclude_lines =
pragma: no cover
abc.abstractmethod
if TYPE_CHECKING:
if _t.TYPE_CHECKING:
if t.TYPE_CHECKING:
@overload
class .*\bProtocol\b.*\):

partial_branches =
pragma: no branch
if not TYPE_CHECKING:
if not _t.TYPE_CHECKING:
if not t.TYPE_CHECKING:
if .* or not TYPE_CHECKING:
if .* or not _t.TYPE_CHECKING:
if .* or not t.TYPE_CHECKING:
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# sorting all imports with isort
933f77b96f0092e1baab4474a9208fc2e379aa32
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# For files generated by trio/_tools/gen_exports.py
trio/_core/_generated* linguist-generated=true
# Treat generated files as binary in git diff
trio/_core/_generated* -diff
82 changes: 82 additions & 0 deletions .github/workflows/autodeps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Autodeps

on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'

jobs:
Autodeps:
name: Autodeps
timeout-minutes: 10
runs-on: 'ubuntu-latest'
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#changing-github_token-permissions
permissions:
pull-requests: write
issues: write
repository-projects: write
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Bump dependencies
run: |
python -m pip install -U pip
python -m pip install -r test-requirements.txt
pip-compile -U test-requirements.in
pip-compile -U docs-requirements.in
- name: Black
run: |
# The new dependencies may contain a new black version.
# Commit any changes immediately.
python -m pip install -r test-requirements.txt
black setup.py trio
- name: Commit changes and create automerge PR
env:
GH_TOKEN: ${{ github.token }}
run: |
# setup git repo
git switch --force-create autodeps/bump_from_${GITHUB_SHA:0:6}
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
if ! git commit -am "Dependency updates"; then
echo "No changes to commit!"
exit 0
fi
git push --force --set-upstream origin autodeps/bump_from_${GITHUB_SHA:0:6}
# git push returns before github is ready for a pr, so we poll until success
for BACKOFF in 1 2 4 8 0; do
sleep $BACKOFF
if gh pr create \
--label dependencies --body "" \
--title "Bump dependencies from commit ${GITHUB_SHA:0:6}" \
; then
break
fi
done
if [ $BACKOFF -eq 0 ]; then
echo "Could not create the PR"
exit 1
fi
# gh pr create returns before the pr is ready, so we again poll until success
# https://github.com/cli/cli/issues/2619#issuecomment-1240543096
for BACKOFF in 1 2 4 8 0; do
sleep $BACKOFF
if gh pr merge --auto --squash; then
break
fi
done
if [ $BACKOFF -eq 0 ]; then
echo "Could not set automerge"
exit 1
fi
Loading

0 comments on commit e7d1b91

Please sign in to comment.