-
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into enable-flake8-return
- Loading branch information
Showing
80 changed files
with
1,574 additions
and
830 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,12 @@ name: CI | |
on: | ||
push: | ||
branches-ignore: | ||
- "dependabot/**" | ||
# these branches always have another event associated | ||
- gh-readonly-queue/** # GitHub's merge queue uses `merge_group` | ||
- autodeps/** # autodeps always makes a PR | ||
- pre-commit-ci-update-config # pre-commit.ci's updates always have a PR | ||
pull_request: | ||
merge_group: | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && format('-{0}', github.sha) || '' }} | ||
|
@@ -18,7 +22,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13'] | ||
python: ['3.9', '3.10', '3.11', '3.12', '3.13'] | ||
arch: ['x86', 'x64'] | ||
lsp: [''] | ||
lsp_extract_file: [''] | ||
|
@@ -34,6 +38,11 @@ jobs: | |
lsp: 'https://www.proxifier.com/download/legacy/ProxifierSetup342.exe' | ||
lsp_extract_file: '' | ||
extra_name: ', with IFS LSP' | ||
- python: 'pypy-3.10' | ||
arch: 'x64' | ||
lsp: '' | ||
lsp_extract_file: '' | ||
extra_name: '' | ||
#- python: '3.9' | ||
# arch: 'x64' | ||
# lsp: 'http://download.pctools.com/mirror/updates/9.0.0.2308-SDavfree-lite_en.exe' | ||
|
@@ -113,16 +122,10 @@ jobs: | |
uses: actions/checkout@v4 | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
if: "!endsWith(matrix.python, '-dev')" | ||
with: | ||
python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }} | ||
cache: pip | ||
cache-dependency-path: test-requirements.txt | ||
- name: Setup python (dev) | ||
uses: deadsnakes/[email protected] | ||
if: endsWith(matrix.python, '-dev') | ||
with: | ||
python-version: '${{ matrix.python }}' | ||
- name: Run tests | ||
run: ./ci.sh | ||
env: | ||
|
@@ -184,7 +187,8 @@ jobs: | |
# can't use setup-python because that python doesn't seem to work; | ||
# `python3-dev` (rather than `python:alpine`) for some ctypes reason, | ||
# `nodejs` for pyright (`node-env` pulls in nodejs but that takes a while and can time out the test). | ||
run: apk update && apk add python3-dev bash nodejs | ||
# `perl` for a platform independent `sed -i` alternative | ||
run: apk update && apk add python3-dev bash nodejs perl | ||
- name: Enter virtual environment | ||
run: python -m venv .venv | ||
- name: Run tests | ||
|
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
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
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 @@ | ||
:func:`inspect.iscoroutinefunction` and the like now give correct answers when | ||
called on KI-protected functions. |
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 @@ | ||
Improve error message when run after gevent's monkey patching. |
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 @@ | ||
Remove workaround for OpenSSL 1.1.1 DTLS ClientHello bug. |
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,26 @@ | ||
Rework KeyboardInterrupt protection to track code objects, rather than frames, | ||
as protected or not. The new implementation no longer needs to access | ||
``frame.f_locals`` dictionaries, so it won't artificially extend the lifetime of | ||
local variables. Since KeyboardInterrupt protection is now imposed statically | ||
(when a protected function is defined) rather than each time the function runs, | ||
its previously-noticeable performance overhead should now be near zero. | ||
The lack of a call-time wrapper has some other benefits as well: | ||
|
||
* :func:`inspect.iscoroutinefunction` and the like now give correct answers when | ||
called on KI-protected functions. | ||
|
||
* Calling a synchronous KI-protected function no longer pushes an additional stack | ||
frame, so tracebacks are clearer. | ||
|
||
* A synchronous KI-protected function invoked from C code (such as a weakref | ||
finalizer) is now guaranteed to start executing; previously there would be a brief | ||
window in which KeyboardInterrupt could be raised before the protection was | ||
established. | ||
|
||
One minor drawback of the new approach is that multiple instances of the same | ||
closure share a single KeyboardInterrupt protection state (because they share a | ||
single code object). That means that if you apply | ||
`@enable_ki_protection <trio.lowlevel.enable_ki_protection>` to some of them | ||
and not others, you won't get the protection semantics you asked for. See the | ||
documentation of `@enable_ki_protection <trio.lowlevel.enable_ki_protection>` | ||
for more details and a workaround. |
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,5 @@ | ||
Rework foreign async generator finalization to track async generator | ||
ids rather than mutating ``ag_frame.f_locals``. This fixes an issue | ||
with the previous implementation: locals' lifetimes will no longer be | ||
extended by materialization in the ``ag_frame.f_locals`` dictionary that | ||
the previous finalization dispatcher logic needed to access to do its work. |
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 @@ | ||
Ensure that Pyright recognizes our underscore prefixed attributes for attrs classes. |
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 @@ | ||
Improve type annotations in several places by removing `Any` usage. |
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 @@ | ||
Fix `trio.testing.RaisesGroup`'s typing. |
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
Oops, something went wrong.