Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency trio to ^0.28.0 #101

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 4, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
trio (changelog) ^0.22.2 -> ^0.28.0 age adoption passing confidence

Release Notes

python-trio/trio (trio)

v0.28.0

Compare Source

Full Changelog: python-trio/trio@v0.27.0...v0.28.0

Bugfixes

  • :func:inspect.iscoroutinefunction and the like now give correct answers when
    called on KI-protected functionhttps://github.com/python-trio/trio/issues/26702670)

  • 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
    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 trio.lowlevel.enable_ki_protection
    for more details and a workarounhttps://github.com/python-trio/trio/issues/31083108)

  • 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 worhttps://github.com/python-trio/trio/issues/31123112)

  • Ensure that Pyright recognizes our underscore prefixed attributes for attrs classes. (https://github.com/python-trio/trio/issues/3114)

  • Fix trio.testing.RaisesGroup's typing. (https://github.com/python-trio/trio/issues/3141)

Improved documentation

Removals without deprecations

Miscellaneous internal changes

v0.27.0

Compare Source

Full Changelog: python-trio/trio@v0.26.2...v0.27.0

Breaking changes

  • trio.move_on_after and trio.fail_after previously set the deadline relative to initialization time, instead of more intuitively upon entering the context manager. This might change timeouts if a program relied on this behavior. If you want to restore previous behavior you should instead use trio.move_on_at(trio.current_time() + ...).
    flake8-async has a new rule to catch this, in case you're supporting older trio versions. See ASYNC122. (https://github.com/python-trio/trio/issues/2512)

Features

  • CancelScope.relative_deadline and CancelScope.is_relative added, as well as a relative_deadline parameter to __init__. This allows initializing scopes ahead of time, but where the specified relative deadline doesn't count down until the scope is entered. (https://github.com/python-trio/trio/issues/2512)
  • trio.Lock and trio.StrictFIFOLock will now raise trio.BrokenResourceError when trio.Lock.acquire would previously stall due to the owner of the lock exiting without releasing the lock. (https://github.com/python-trio/trio/issues/3035)
  • trio.move_on_at, trio.move_on_after, trio.fail_at and trio.fail_after now accept shield as a keyword argument. If specified, it provides an initial value for the ~trio.CancelScope.shield attribute of the trio.CancelScope object created by the context manager. (https://github.com/python-trio/trio/issues/3052)
  • Added trio.lowlevel.add_parking_lot_breaker and trio.lowlevel.remove_parking_lot_breaker to allow creating custom lock/semaphore implementations that will break their underlying parking lot if a task exits unexpectedly. trio.lowlevel.ParkingLot.break_lot is also added, to allow breaking a parking lot intentionally. (https://github.com/python-trio/trio/issues/3081)

Bugfixes

Improved documentation

v0.26.2

Compare Source

Full Changelog: python-trio/trio@v0.26.1...v0.26.2

Bugfixes

v0.26.1

Compare Source

Full Changelog: python-trio/trio@v0.26.0...v0.26.1

Bugfixes

Miscellaneous internal changes

v0.26.0

Compare Source

Full Changelog: python-trio/trio@v0.25.1...v0.26.0

Features

  • Added an interactive interpreter python -m trio.

    This makes it easier to try things and experiment with trio in the a Python repl.
    Use the await keyword without needing to call trio.run()

$ python -m trio
Trio 0.26.0, Python 3.10.6
Use "await" directly instead of "trio.run()".
Type "help", "copyright", "credits" or "license" for more information.
>>> import trio
>>> await trio.sleep(1); print("hi")  # prints after one second
hi

See interactive debugging for further detail. (https://github.com/python-trio/trio/issues/2972)

  • trio.testing.RaisesGroup can now catch an unwrapped exception with unwrapped=True. This means that the behaviour of except* can be fully replicated in combination with flatten_subgroups=True (formerly strict=False). (https://github.com/python-trio/trio/issues/2989)

Bugfixes

  • Fixed a bug where trio.testing.RaisesGroup(..., strict=False) would check the number of exceptions in the raised ExceptionGroup before flattening subgroups, leading to incorrectly failed matches.
    It now properly supports end ($) regex markers in the match message, by no longer including " (x sub-exceptions)" in the string it matches against. (https://github.com/python-trio/trio/issues/2989)

Deprecations and removals

v0.25.1

Compare Source

Full Changelog: python-trio/trio@v0.25.0...v0.25.1

Bugfixes

v0.25.0

Compare Source

Full Changelog: python-trio/trio@v0.24.0...v0.25.0

Breaking changes

  • The strict_exception_groups parameter now defaults to True in trio.run and trio.lowlevel.start_guest_run. trio.open_nursery still defaults to the same value as was specified in trio.run/trio.lowlevel.start_guest_run, but if you didn't specify it there then all subsequent calls to trio.open_nursery will change.
    This is unfortunately very tricky to change with a deprecation period, as raising a DeprecationWarning whenever strict_exception_groups is not specified would raise a lot of unnecessary warnings.

    Notable side effects of changing code to run with strict_exception_groups==True

    • If an iterator raises StopAsyncIteration or StopIteration inside a nursery, then python will not recognize wrapped instances of those for stopping iteration.

    • trio.run_process is now documented that it can raise an ExceptionGroup. It previously could do this in very rare circumstances, but with strict_exception_groups set to True it will now do so whenever exceptions occur in deliver_cancel or with problems communicating with the subprocess.

      • Errors in opening the process is now done outside the internal nursery, so if code previously ran with strict_exception_groups=True there are cases now where an ExceptionGroup is no longer added.
    • trio.TrioInternalError .__cause__ might be wrapped in one or more ExceptionGroups <ExceptionGroup> (https://github.com/python-trio/trio/issues/2786)

Features

  • Add trio.testing.wait_all_threads_completed, which blocks until no threads are running tasks. This is intended to be used in the same way as trio.testing.wait_all_tasks_blocked. (https://github.com/python-trio/trio/issues/2937)

  • Path is now a subclass of pathlib.PurePath, allowing it to interoperate with other standard
    pathlib types.

    Instantiating Path now returns a concrete platform-specific subclass, one of PosixPath or
    WindowsPath, matching the behavior of pathlib.Path. (https://github.com/python-trio/trio/issues/2959)

Bugfixes

Miscellaneous internal changes

v0.24.0

Compare Source

Full Changelog: python-trio/trio@v0.23.2...v0.24.0

Features

Deprecations and removals

  • MultiError has been fully removed, and all relevant trio functions now raise ExceptionGroups instead. This should not affect end users that have transitioned to using except* or catching ExceptionGroup/BaseExceptionGroup. (https://github.com/python-trio/trio/issues/2891)

v0.23.2

Compare Source

Full Changelog: python-trio/trio@v0.23.1...v0.23.2

Features

  • TypeVarTuple is now used to fully type nursery.start_soon(), trio.run(), trio.to_thread.run_sync(), and other similar functions accepting (func, *args). This means type checkers will be able to verify types are used correctly. nursery.start() is not fully typed yet however. (https://github.com/python-trio/trio/issues/2881)

Bugfixes

Miscellaneous internal changes

v0.23.1

Compare Source

Full Changelog: python-trio/trio@v0.23.0...v0.23.1

Bugfixes

  • Don't crash on import in Anaconda interpreters. (#​2855)

v0.23.0

Compare Source

Full Changelog: python-trio/trio@v0.22.2...v0.23.0

Headline features

Features

  • When exiting a nursery block, the parent task always waits for child tasks to exit. This wait cannot be cancelled. However, previously, if you tried to cancel it, it would inject a Cancelled exception, even though it wasn't cancelled. Most users probably never noticed either way, but injecting a Cancelled here is not really useful, and in some rare cases caused confusion or problems, so Trio no longer does that. (#​1457)
  • If called from a thread spawned by trio.to_thread.run_sync, trio.from_thread.run and trio.from_thread.run_sync now reuse the task and cancellation status of the host task; this means that context variables and cancel scopes naturally propagate 'through' threads spawned by Trio. You can also use trio.from_thread.check_cancelled to efficiently check for cancellation without reentering the Trio thread. (#​2392)
  • trio.lowlevel.start_guest_run now does a bit more setup of the guest run before it returns to its caller, so that the caller can immediately make calls to trio.current_time, trio.lowlevel.spawn_system_task, trio.lowlevel.current_trio_token, etc. (#​2696)

Bugfixes

  • When a starting function raises before calling trio.TaskStatus.started, trio.Nursery.start will no longer wrap the exception in an undocumented ExceptionGroup. Previously, trio.Nursery.start would incorrectly raise an ExceptionGroup containing it when using trio.run(..., strict_exception_groups=True). (#​2611)

Deprecations and removals

  • To better reflect the underlying thread handling semantics, the keyword argument for trio.to_thread.run_sync that was previously called cancellable is now named abandon_on_cancel. It still does the same thing -- allow the thread to be abandoned if the call to trio.to_thread.run_sync is cancelled -- but since we now have other ways to propagate a cancellation without abandoning the thread, "cancellable" has become somewhat of a misnomer. The old cancellable name is now deprecated. (#​2841)
  • Deprecated support for math.inf for the backlog argument in open_tcp_listeners, making its docstring correct in the fact that only TypeError is raised if invalid arguments are passed. (#​2842)

Removals without deprecations

  • Drop support for Python3.7 and PyPy3.7/3.8. (#​2668)
  • Removed special MultiError traceback handling for IPython. As of version 8.15 ExceptionGroup is handled natively. (#​2702)

Miscellaneous internal changes

  • Trio now indicates its presence to sniffio using the sniffio.thread_local interface that is preferred since sniffio v1.3.0. This should be less likely than the previous approach to cause sniffio.current_async_library to return incorrect results due to unintended inheritance of contextvars. (#​2700)
  • On windows, if SIO_BASE_HANDLE failed and SIO_BSP_HANDLE_POLL didn't return a different socket, runtime error will now raise from the OSError that indicated the issue so that in the event it does happen it might help with debugging. (#​2807)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Contributor Author

renovate bot commented Nov 4, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
Updating dependencies
Resolving dependencies...

Creating virtualenv quiltplus-sE6xLoeL-py3.12 in /home/ubuntu/.cache/pypoetry/virtualenvs

Because un-yaml (0.3.1) depends on trio (>=0.22.0,<0.23.0)
 and no versions of un-yaml match >0.3.1, un-yaml (>=0.3.1) requires trio (>=0.22.0,<0.23.0).
So, because quiltplus depends on both trio (^0.25.0) and un-yaml (>=0.3.1), version solving failed.

Copy link

github-actions bot commented Nov 4, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ ACTION actionlint 2 0 0.02s
✅ JSON eslint-plugin-jsonc 2 0 0 0.93s
✅ JSON jsonlint 2 0 0.21s
✅ JSON prettier 2 1 0 0.37s
✅ JSON v8r 2 0 2.82s
✅ MAKEFILE checkmake 1 0 0.01s
✅ MARKDOWN markdownlint 3 0 0 0.51s
✅ MARKDOWN markdown-link-check 3 0 1.22s
✅ MARKDOWN markdown-table-formatter 3 0 0 0.28s
✅ PYTHON black 22 1 0 0.81s
✅ PYTHON flake8 22 0 0.53s
✅ PYTHON isort 22 1 0 0.3s
✅ PYTHON mypy 22 0 5.44s
✅ PYTHON ruff 22 1 0 0.03s
✅ REPOSITORY checkov yes no 14.78s
✅ REPOSITORY gitleaks yes no 0.32s
✅ REPOSITORY git_diff yes no 0.01s
✅ REPOSITORY trivy-sbom yes no 1.14s
✅ YAML prettier 2 2 0 0.45s
✅ YAML v8r 2 0 2.75s
✅ YAML yamllint 2 0 0.23s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@renovate renovate bot force-pushed the renovate/trio-0.x branch from e7d5168 to 89c4b41 Compare January 10, 2024 07:40
@renovate renovate bot changed the title fix(deps): update dependency trio to ^0.23.0 fix(deps): update dependency trio to ^0.24.0 Jan 10, 2024
@renovate renovate bot force-pushed the renovate/trio-0.x branch from 89c4b41 to 5de74ff Compare March 17, 2024 05:03
@renovate renovate bot changed the title fix(deps): update dependency trio to ^0.24.0 fix(deps): update dependency trio to ^0.25.0 Mar 17, 2024
@renovate renovate bot force-pushed the renovate/trio-0.x branch from 5de74ff to 6307e30 Compare July 5, 2024 07:33
@renovate renovate bot changed the title fix(deps): update dependency trio to ^0.25.0 fix(deps): update dependency trio to ^0.26.0 Jul 5, 2024
Copy link
Contributor Author

renovate bot commented Jul 5, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: poetry.lock
Updating dependencies
Resolving dependencies...

Creating virtualenv quiltplus-sE6xLoeL-py3.13 in /home/ubuntu/.cache/pypoetry/virtualenvs

Because un-yaml (0.3.1) depends on trio (>=0.22.0,<0.23.0)
 and no versions of un-yaml match >0.3.1, un-yaml (>=0.3.1) requires trio (>=0.22.0,<0.23.0).
So, because quiltplus depends on both trio (^0.28.0) and un-yaml (>=0.3.1), version solving failed.

@renovate renovate bot force-pushed the renovate/trio-0.x branch from 6307e30 to 143c038 Compare October 17, 2024 00:44
@renovate renovate bot changed the title fix(deps): update dependency trio to ^0.26.0 fix(deps): update dependency trio to ^0.27.0 Oct 17, 2024
@renovate renovate bot force-pushed the renovate/trio-0.x branch from 143c038 to 0e39a69 Compare December 25, 2024 20:18
@renovate renovate bot changed the title fix(deps): update dependency trio to ^0.27.0 fix(deps): update dependency trio to ^0.28.0 Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants