-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into from_thread_check_cancelled
# Conflicts: # trio/_tests/test_threads.py # trio/_threads.py # trio/from_thread.py
- Loading branch information
Showing
209 changed files
with
8,177 additions
and
3,579 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# sorting all imports with isort | ||
933f77b96f0092e1baab4474a9208fc2e379aa32 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.